Skip to content

Commit 12fb820

Browse files
committed
feat: Add support for Python 3.14
1 parent 9478f4b commit 12fb820

File tree

5 files changed

+38
-14
lines changed

5 files changed

+38
-14
lines changed

CONTRIBUTING.rst

Lines changed: 6 additions & 4 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.9, 3.10, 3.11, 3.12, and 3.13 on both UNIX and Windows.
25+
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::
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

145145
# Run a single system test
146-
$ nox -s system-3.13 -- -k <name of test>
146+
$ nox -s system-3.14 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.9, 3.12, and 3.13.
151+
System tests are only configured to run under Python 3.9, 3.12, and 3.14.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local
@@ -226,12 +226,14 @@ We support:
226226
- `Python 3.11`_
227227
- `Python 3.12`_
228228
- `Python 3.13`_
229+
- `Python 3.14`_
229230

230231
.. _Python 3.9: https://docs.python.org/3.9/
231232
.. _Python 3.10: https://docs.python.org/3.10/
232233
.. _Python 3.11: https://docs.python.org/3.11/
233234
.. _Python 3.12: https://docs.python.org/3.12/
234235
.. _Python 3.13: https://docs.python.org/3.13/
236+
.. _Python 3.14: https://docs.python.org/3.14/
235237

236238

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

noxfile.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"setup.py",
4242
]
4343

44-
DEFAULT_PYTHON_VERSION = "3.10"
44+
DEFAULT_PYTHON_VERSION = "3.14"
4545

46-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.10", "3.11", "3.12", "3.13"]
46+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
4747
UNIT_TEST_STANDARD_DEPENDENCIES = [
4848
"mock",
4949
"asyncmock",
@@ -73,9 +73,14 @@
7373
"geography",
7474
"bqstorage",
7575
],
76+
"3.14": [
77+
"tests",
78+
"geography",
79+
"bqstorage",
80+
],
7681
}
7782

78-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.12", "3.13"]
83+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.12", "3.13", "3.14"]
7984
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
8085
"mock",
8186
"pytest",
@@ -98,6 +103,11 @@
98103
"geography",
99104
"bqstorage",
100105
],
106+
"3.14": [
107+
"tests",
108+
"geography",
109+
"bqstorage",
110+
],
101111
}
102112

103113
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
@@ -234,15 +244,20 @@ def install_unittest_dependencies(session, *constraints):
234244
def unit(session, protobuf_implementation, install_extras=True):
235245
# Install all test dependencies, then install this package in-place.
236246

237-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
247+
if protobuf_implementation == "cpp" and session.python in (
248+
"3.11",
249+
"3.12",
250+
"3.13",
251+
"3.14",
252+
):
238253
session.skip("cpp implementation is not supported in python 3.11+")
239254

240255
constraints_path = str(
241256
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
242257
)
243258
install_unittest_dependencies(session, "-c", constraints_path)
244259

245-
if install_extras and session.python in ["3.11", "3.12", "3.13"]:
260+
if install_extras and session.python in ["3.11", "3.12", "3.13", "3.14"]:
246261
install_target = ".[geography,alembic,tests,bqstorage]"
247262
elif install_extras:
248263
install_target = ".[all]"
@@ -419,7 +434,7 @@ def compliance(session):
419434
"-c",
420435
constraints_path,
421436
)
422-
if session.python in ["3.12", "3.13"]:
437+
if session.python in ["3.12", "3.13", "3.14"]:
423438
extras = "[tests,geography,alembic]"
424439
else:
425440
extras = "[tests]"
@@ -549,7 +564,7 @@ def docfx(session):
549564
)
550565

551566

552-
@nox.session(python="3.13")
567+
@nox.session(python=DEFAULT_PYTHON_VERSION)
553568
@nox.parametrize(
554569
"protobuf_implementation",
555570
["python", "upb", "cpp"],
@@ -558,7 +573,12 @@ def docfx(session):
558573
def prerelease_deps(session, protobuf_implementation):
559574
"""Run all tests with prerelease versions of dependencies installed."""
560575

561-
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
576+
if protobuf_implementation == "cpp" and session.python in (
577+
"3.11",
578+
"3.12",
579+
"3.13",
580+
"3.14",
581+
):
562582
session.skip("cpp implementation is not supported in python 3.11+")
563583

564584
# Install all dependencies

owlbot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
"3.11": ["tests", "geography", "bqstorage"],
3535
"3.12": ["tests", "geography", "bqstorage"],
3636
"3.13": ["tests", "geography", "bqstorage"],
37+
"3.14": ["tests", "geography", "bqstorage"],
3738
}
3839
templated_files = common.py_library(
39-
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"],
40-
system_test_python_versions=["3.9", "3.12", "3.13"],
40+
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"],
41+
system_test_python_versions=["3.9", "3.12", "3.13", "3.14"],
4142
cov_level=100,
4243
unit_test_extras=extras,
4344
unit_test_extras_by_python=extras_by_python,

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def readme():
105105
"Programming Language :: Python :: 3.11",
106106
"Programming Language :: Python :: 3.12",
107107
"Programming Language :: Python :: 3.13",
108+
"Programming Language :: Python :: 3.14",
108109
"Operating System :: OS Independent",
109110
"Topic :: Database :: Front-Ends",
110111
],

testing/constraints-3.14.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)