Skip to content

Commit c164a47

Browse files
feat: Add support for Python 3.14 (#380)
This PR adds Python 3.14 as a supported version, and fixed tests for the new version This PR also adds a dependency bound to pandas, as the [upcoming 3.0.0 version is incompatible](#381)
1 parent 5163c1c commit c164a47

File tree

14 files changed

+114
-18
lines changed

14 files changed

+114
-18
lines changed

.github/workflows/compliance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python: ['3.13']
11+
python: ['3.14']
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v5
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python: ['3.13']
32+
python: ['3.14']
3333
steps:
3434
- name: Checkout
3535
uses: actions/checkout@v5

.github/workflows/unittest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
15+
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
strategy:
4242
matrix:
43-
python: ['3.13']
43+
python: ['3.14']
4444
steps:
4545
- name: Checkout
4646
uses: actions/checkout@v4
@@ -68,7 +68,7 @@ jobs:
6868
runs-on: ubuntu-latest
6969
strategy:
7070
matrix:
71-
python: ['3.13']
71+
python: ['3.14']
7272
steps:
7373
- name: Checkout
7474
uses: actions/checkout@v4
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-db-dtypes-pandas/.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-db-dtypes-pandas/.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+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
7+
8+
env_vars: {
9+
key: "TRAMPOLINE_BUILD_FILE"
10+
value: "github/python-db-dtypes-pandas/.kokoro/test-samples-against-head.sh"
11+
}
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: "False"
6+
}
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+
}

CONTRIBUTING.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows.
25+
3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
7272

7373
- To run a single unit test::
7474

75-
$ nox -s unit-3.13 -- -k <name of test>
75+
$ nox -s unit-3.14 -- -k <name of test>
7676

7777

7878
.. note::
@@ -228,6 +228,7 @@ We support:
228228
- `Python 3.11`_
229229
- `Python 3.12`_
230230
- `Python 3.13`_
231+
- `Python 3.14`_
231232

232233
.. _Python 3.7: https://docs.python.org/3.7/
233234
.. _Python 3.8: https://docs.python.org/3.8/
@@ -236,6 +237,7 @@ We support:
236237
.. _Python 3.11: https://docs.python.org/3.11/
237238
.. _Python 3.12: https://docs.python.org/3.12/
238239
.. _Python 3.13: https://docs.python.org/3.13/
240+
.. _Python 3.14: https://docs.python.org/3.14/
239241

240242

241243
Supported versions can be found in our ``noxfile.py`` `config`_.

noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"3.11",
4242
"3.12",
4343
"3.13",
44+
"3.14",
4445
]
4546
UNIT_TEST_STANDARD_DEPENDENCIES = [
4647
"mock",
@@ -218,14 +219,11 @@ def prerelease(session, tests_path):
218219
"--upgrade",
219220
"pyarrow",
220221
)
221-
# Avoid pandas==2.2.0rc0 as this version causes PyArrow to fail. Once newer
222-
# prerelease comes out, this constraint can be removed. See
223-
# https://github.com/googleapis/python-db-dtypes-pandas/issues/234
224222
session.install(
225223
"--prefer-binary",
226224
"--pre",
227225
"--upgrade",
228-
"pandas!=2.2.0rc0",
226+
"pandas<3.0.0rc0",
229227
)
230228
session.install(
231229
"mock",

samples/snippets/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
92+
ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

0 commit comments

Comments
 (0)