Skip to content

Commit 2e8194f

Browse files
chalmerlowegcf-owl-bot[bot]parthea
authored
chore(python): Add support for Python 3.14 (#644)
This PR adds support for Python 3.14 to the library. Key changes include: - Update to `.github/workflows` files to account for Python runtimes both 3.14 and 3.8. - Adding Python 3.14 to the test matrix in `.github/workflows/unittest.yml`, etc. - Updating `.github/sync-repo-settings.yaml` to include 3.14 unit tests in required checks. - Update to `.kokoro/presubmit` files to update the system test and `presubmit.cfg` - Adding `testing/constraints-3.14.txt`. - Updates `CONTRIBUTING.rst` to list Python 3.14 as a supported version. - Updates `mypy.ini` to suppress several known type hinting errors in two files. - Updating `noxfile.py` to include 3.14 sessions. - Updates to `owlbot.py` to include Python 3.14. - Updating `setup.py` to include the Python 3.14 classifier and add conditional dependencies for `grpcio`. --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 2ada500 commit 2e8194f

File tree

22 files changed

+131
-168
lines changed

22 files changed

+131
-168
lines changed

packages/google-cloud-datastore/.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:710b70faff81151657d89db6e028c23a1051787598c8276bdd8eef25c92da8ab
17-
# created: 2025-04-10T17:48:54.829145676Z
16+
digest: sha256:fbbc8db67afd8b7d71bf694c5081a32da0c528eba166fbcffb3b6e56ddf907d5

packages/google-cloud-datastore/.github/sync-repo-settings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ branchProtectionRules:
3030
- 'unit (3.11)'
3131
- 'unit (3.12)'
3232
- 'unit (3.13)'
33+
- 'unit (3.14)'
3334
- 'cover'
3435
- 'mypy'
3536
# List of explicit permissions to add (additive only)

packages/google-cloud-datastore/.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.8"
15+
python-version: "3.14"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

packages/google-cloud-datastore/.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.8"
15+
python-version: "3.14"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

packages/google-cloud-datastore/.github/workflows/unittest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
14-
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
14+
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
4545
- name: Setup Python
4646
uses: actions/setup-python@v5
4747
with:
48-
python-version: "3.8"
48+
python-version: "3.14"
4949
- name: Install coverage
5050
run: |
5151
python -m pip install --upgrade setuptools pip wheel

packages/google-cloud-datastore/.kokoro/presubmit/presubmit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "RUN_SYSTEM_TESTS"
66
value: "false"
77
}
8+
9+
env_vars: {
10+
key: "NOX_SESSION"
11+
value: "blacken doctests format"
12+
}

packages/google-cloud-datastore/.kokoro/presubmit/system-3.8.cfg renamed to packages/google-cloud-datastore/.kokoro/presubmit/system-3.12.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Only run this nox session.
44
env_vars: {
55
key: "NOX_SESSION"
6-
value: "system-3.8"
6+
value: "system-3.12"
77
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "system-3.14"
7+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "py-3.14"
14+
}
15+
16+
# Declare build specific Cloud project.
17+
env_vars: {
18+
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19+
value: "python-docs-samples-tests-314"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/python-datastore/.kokoro/test-samples.sh"
25+
}
26+
27+
# Configure the docker image for kokoro-trampoline.
28+
env_vars: {
29+
key: "TRAMPOLINE_IMAGE"
30+
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
31+
}
32+
33+
# Download secrets for samples
34+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
35+
36+
# Download trampoline resources.
37+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
38+
39+
# Use the trampoline script to run in docker.
40+
build_file: "python-datastore/.kokoro/trampoline_v2.sh"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}

0 commit comments

Comments
 (0)