From 6934834bee0fca1bd742ab3360e504f3d9b02c25 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 19:52:20 +0000 Subject: [PATCH 1/3] feat: Add support for Python 3.14 --- CONTRIBUTING.rst | 10 ++++++---- noxfile.py | 36 ++++++++++++++++++++++++++++-------- owlbot.py | 5 +++-- setup.py | 3 ++- testing/constraints-3.14.txt | 0 5 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 testing/constraints-3.14.txt diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 538a10eb..3d141082 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.9, 3.10, 3.11, 3.12, and 3.13 on both UNIX and Windows. + 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -72,7 +72,7 @@ We use `nox `__ to instrument our tests. - To run a single unit test:: - $ nox -s unit-3.13 -- -k + $ nox -s unit-3.14 -- -k .. note:: @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.13 -- -k + $ nox -s system-3.14 -- -k .. note:: - System tests are only configured to run under Python 3.9, 3.12, and 3.13. + System tests are only configured to run under Python 3.9, 3.12, and 3.14. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local @@ -226,12 +226,14 @@ We support: - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ +- `Python 3.14`_ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ .. _Python 3.11: https://docs.python.org/3.11/ .. _Python 3.12: https://docs.python.org/3.12/ .. _Python 3.13: https://docs.python.org/3.13/ +.. _Python 3.14: https://docs.python.org/3.14/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/noxfile.py b/noxfile.py index 98e341ec..803d759d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -41,9 +41,9 @@ "setup.py", ] -DEFAULT_PYTHON_VERSION = "3.10" +DEFAULT_PYTHON_VERSION = "3.14" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.10", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -73,9 +73,14 @@ "geography", "bqstorage", ], + "3.14": [ + "tests", + "geography", + "bqstorage", + ], } -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.12", "3.13", "3.14"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -98,6 +103,11 @@ "geography", "bqstorage", ], + "3.14": [ + "tests", + "geography", + "bqstorage", + ], } CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -234,7 +244,12 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation, install_extras=True): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -242,7 +257,7 @@ def unit(session, protobuf_implementation, install_extras=True): ) install_unittest_dependencies(session, "-c", constraints_path) - if install_extras and session.python in ["3.11", "3.12", "3.13"]: + if install_extras and session.python in ["3.11", "3.12", "3.13", "3.14"]: install_target = ".[geography,alembic,tests,bqstorage]" elif install_extras: install_target = ".[all]" @@ -419,7 +434,7 @@ def compliance(session): "-c", constraints_path, ) - if session.python in ["3.12", "3.13"]: + if session.python in ["3.12", "3.13", "3.14"]: extras = "[tests,geography,alembic]" else: extras = "[tests]" @@ -549,7 +564,7 @@ def docfx(session): ) -@nox.session(python="3.13") +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -558,7 +573,12 @@ def docfx(session): def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/owlbot.py b/owlbot.py index b79babb4..e5e1d8b4 100644 --- a/owlbot.py +++ b/owlbot.py @@ -34,10 +34,11 @@ "3.11": ["tests", "geography", "bqstorage"], "3.12": ["tests", "geography", "bqstorage"], "3.13": ["tests", "geography", "bqstorage"], + "3.14": ["tests", "geography", "bqstorage"], } templated_files = common.py_library( - unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"], - system_test_python_versions=["3.9", "3.12", "3.13"], + unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], + system_test_python_versions=["3.9", "3.12", "3.13", "3.14"], cov_level=100, unit_test_extras=extras, unit_test_extras_by_python=extras_by_python, diff --git a/setup.py b/setup.py index 472c8fa0..2357b26e 100644 --- a/setup.py +++ b/setup.py @@ -105,6 +105,7 @@ def readme(): "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Database :: Front-Ends", ], @@ -120,7 +121,7 @@ def readme(): "sqlalchemy>=1.4.16,<3.0.0", ], extras_require=extras, - python_requires=">=3.8, <3.14", + python_requires=">=3.8, <3.15", tests_require=["packaging", "pytz"], entry_points={ "sqlalchemy.dialects": ["bigquery = sqlalchemy_bigquery:BigQueryDialect"] diff --git a/testing/constraints-3.14.txt b/testing/constraints-3.14.txt new file mode 100644 index 00000000..e69de29b From f9112a8c625d81f676cb0fbc9ad076b9911d090e Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 20:35:36 +0000 Subject: [PATCH 2/3] lint --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 803d759d..d4fd895b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -203,7 +203,7 @@ def format(session): @_calculate_duration def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" - session.install("docutils", "pygments") + session.install("docutils", "pygments", "setuptools") session.run("python", "setup.py", "check", "--restructuredtext", "--strict") From 55ba6989885d2e187020bfee2f3866c6f37b04a0 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 17:30:49 -0500 Subject: [PATCH 3/3] bump grpcio for Python 3.14 --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2357b26e..fbc319bd 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,8 @@ def readme(): # grpc.Channel.close() method isn't added until 1.32.0. # https://github.com/grpc/grpc/pull/15254 "grpcio >= 1.47.0, < 2.0.0", - "grpcio >= 1.49.1, < 2.0.0; python_version>='3.11'", + "grpcio >= 1.49.1, < 2.0.0; python_version =='3.11'", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "pyarrow >= 5.0.0", ], }