From 0f1f1c70752db18478fdece378fe85b6d3ac2141 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 17:17:32 +0000 Subject: [PATCH 1/4] feat: Add support for Python 3.14 --- .github/sync-repo-settings.yaml | 39 ------------------- .github/workflows/lint.yml | 2 +- .github/workflows/unittest.yml | 4 +- .kokoro/continuous/prerelease-deps-3.13.cfg | 7 ---- ...ease-deps.cfg => prerelease-deps-3.14.cfg} | 2 +- .kokoro/continuous/prerelease-deps-3.8.cfg | 7 ---- .kokoro/presubmit/prerelease-deps-3.10.cfg | 7 ---- .kokoro/presubmit/prerelease-deps-3.12.cfg | 7 ---- .kokoro/presubmit/prerelease-deps-3.13.cfg | 7 ---- .../prerelease-deps-3.14.cfg} | 2 +- .kokoro/presubmit/prerelease-deps-3.9.cfg | 7 ---- .kokoro/presubmit/prerelease-deps.cfg | 7 ---- .kokoro/presubmit/system-3.10.cfg | 7 ---- .kokoro/presubmit/system-3.13.cfg | 7 ---- .../{system-3.12.cfg => system-3.14.cfg} | 2 +- CONTRIBUTING.rst | 10 +++-- noxfile.py | 22 ++++++++--- owlbot.py | 7 ++-- setup.py | 3 ++ 19 files changed, 35 insertions(+), 121 deletions(-) delete mode 100644 .github/sync-repo-settings.yaml delete mode 100644 .kokoro/continuous/prerelease-deps-3.13.cfg rename .kokoro/continuous/{prerelease-deps.cfg => prerelease-deps-3.14.cfg} (77%) delete mode 100644 .kokoro/continuous/prerelease-deps-3.8.cfg delete mode 100644 .kokoro/presubmit/prerelease-deps-3.10.cfg delete mode 100644 .kokoro/presubmit/prerelease-deps-3.12.cfg delete mode 100644 .kokoro/presubmit/prerelease-deps-3.13.cfg rename .kokoro/{continuous/prerelease-deps-3.11.cfg => presubmit/prerelease-deps-3.14.cfg} (77%) delete mode 100644 .kokoro/presubmit/prerelease-deps-3.9.cfg delete mode 100644 .kokoro/presubmit/prerelease-deps.cfg delete mode 100644 .kokoro/presubmit/system-3.10.cfg delete mode 100644 .kokoro/presubmit/system-3.13.cfg rename .kokoro/presubmit/{system-3.12.cfg => system-3.14.cfg} (82%) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 53c7479..0000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings -# Rules for main branch protection -branchProtectionRules: -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `main` -- pattern: main - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true - requiredStatusCheckContexts: - - 'cla/google' - - 'OwlBot Post Processor' - - 'lint' - - 'Kokoro system-3.9' - - 'Kokoro system-3.11 (noextras)' - - 'Kokoro system-3.13' - - 'docs' - - 'unit (3.9)' - - 'unit (3.12)' - - 'unit (3.13)' - - 'cover' - - 'Samples - Lint' - - 'Samples - Python 3.9' - - 'Samples - Python 3.11' - - 'Samples - Python 3.12' -permissionRules: - - team: actools-python - permission: admin - - team: actools - permission: admin - - team: api-bigquery - permission: push - - team: api-bigquery-dataframe - permission: push - - team: yoshi-python - permission: push - - team: python-samples-owners - permission: push - - team: python-samples-reviewers - permission: push diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1051da0..3ed755f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.14" - name: Install nox run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 2ff94d3..8e6fd55 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: ['3.9', '3.11', '3.12', '3.13'] + python: ['3.9', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout uses: actions/checkout@v4 @@ -45,7 +45,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.14" - name: Install coverage run: | python -m pip install --upgrade setuptools pip wheel diff --git a/.kokoro/continuous/prerelease-deps-3.13.cfg b/.kokoro/continuous/prerelease-deps-3.13.cfg deleted file mode 100644 index 99a1e71..0000000 --- a/.kokoro/continuous/prerelease-deps-3.13.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "prerelease_deps-3.13" -} diff --git a/.kokoro/continuous/prerelease-deps.cfg b/.kokoro/continuous/prerelease-deps-3.14.cfg similarity index 77% rename from .kokoro/continuous/prerelease-deps.cfg rename to .kokoro/continuous/prerelease-deps-3.14.cfg index 3595fb4..bf3534b 100644 --- a/.kokoro/continuous/prerelease-deps.cfg +++ b/.kokoro/continuous/prerelease-deps-3.14.cfg @@ -3,5 +3,5 @@ # Only run this nox session. env_vars: { key: "NOX_SESSION" - value: "prerelease_deps" + value: "prerelease_deps-3.14" } diff --git a/.kokoro/continuous/prerelease-deps-3.8.cfg b/.kokoro/continuous/prerelease-deps-3.8.cfg deleted file mode 100644 index fabe3e3..0000000 --- a/.kokoro/continuous/prerelease-deps-3.8.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "prerelease_deps-3.8" -} diff --git a/.kokoro/presubmit/prerelease-deps-3.10.cfg b/.kokoro/presubmit/prerelease-deps-3.10.cfg deleted file mode 100644 index 0c6c446..0000000 --- a/.kokoro/presubmit/prerelease-deps-3.10.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" -value: "prerelease_deps-3.10" -} diff --git a/.kokoro/presubmit/prerelease-deps-3.12.cfg b/.kokoro/presubmit/prerelease-deps-3.12.cfg deleted file mode 100644 index ece962a..0000000 --- a/.kokoro/presubmit/prerelease-deps-3.12.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "prerelease_deps-3.12" -} diff --git a/.kokoro/presubmit/prerelease-deps-3.13.cfg b/.kokoro/presubmit/prerelease-deps-3.13.cfg deleted file mode 100644 index 99a1e71..0000000 --- a/.kokoro/presubmit/prerelease-deps-3.13.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "prerelease_deps-3.13" -} diff --git a/.kokoro/continuous/prerelease-deps-3.11.cfg b/.kokoro/presubmit/prerelease-deps-3.14.cfg similarity index 77% rename from .kokoro/continuous/prerelease-deps-3.11.cfg rename to .kokoro/presubmit/prerelease-deps-3.14.cfg index 1e19f12..bf3534b 100644 --- a/.kokoro/continuous/prerelease-deps-3.11.cfg +++ b/.kokoro/presubmit/prerelease-deps-3.14.cfg @@ -3,5 +3,5 @@ # Only run this nox session. env_vars: { key: "NOX_SESSION" - value: "prerelease_deps-3.11" + value: "prerelease_deps-3.14" } diff --git a/.kokoro/presubmit/prerelease-deps-3.9.cfg b/.kokoro/presubmit/prerelease-deps-3.9.cfg deleted file mode 100644 index 48d07dd..0000000 --- a/.kokoro/presubmit/prerelease-deps-3.9.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" -value: "prerelease_deps-3.9" -} diff --git a/.kokoro/presubmit/prerelease-deps.cfg b/.kokoro/presubmit/prerelease-deps.cfg deleted file mode 100644 index 3595fb4..0000000 --- a/.kokoro/presubmit/prerelease-deps.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "prerelease_deps" -} diff --git a/.kokoro/presubmit/system-3.10.cfg b/.kokoro/presubmit/system-3.10.cfg deleted file mode 100644 index f1c7c56..0000000 --- a/.kokoro/presubmit/system-3.10.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "system-3.10" -} \ No newline at end of file diff --git a/.kokoro/presubmit/system-3.13.cfg b/.kokoro/presubmit/system-3.13.cfg deleted file mode 100644 index f66fd95..0000000 --- a/.kokoro/presubmit/system-3.13.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Only run this nox session. -env_vars: { - key: "NOX_SESSION" - value: "system-3.13" -} diff --git a/.kokoro/presubmit/system-3.12.cfg b/.kokoro/presubmit/system-3.14.cfg similarity index 82% rename from .kokoro/presubmit/system-3.12.cfg rename to .kokoro/presubmit/system-3.14.cfg index 789455b..7390414 100644 --- a/.kokoro/presubmit/system-3.12.cfg +++ b/.kokoro/presubmit/system-3.14.cfg @@ -3,5 +3,5 @@ # Only run this nox session. env_vars: { key: "NOX_SESSION" - value: "system-3.12" + value: "system-3.14" } diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 40bdd5d..3182cf5 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.11, 3.12 and 3.13 on both UNIX and Windows. + 3.9, 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.11, 3.12 and 3.13. + System tests are only configured to run under Python 3.9, 3.11, 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 @@ -225,11 +225,13 @@ 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.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 4c5dbd6..7214457 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,9 +32,9 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "bigquery_magics", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.10" +DEFAULT_PYTHON_VERSION = "3.14" -UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13", "3.14"] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", @@ -67,9 +67,14 @@ "bigframes", "geopandas", ], + "3.14": [ + "bqstorage", + "bigframes", + "geopandas", + ], } -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.11", "3.12", "3.13", "3.14"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -99,6 +104,11 @@ "bigframes", "geopandas", ], + "3.14": [ + "bqstorage", + "bigframes", + "geopandas", + ], } CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -208,7 +218,7 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # 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( @@ -408,7 +418,7 @@ def docfx(session): ) -@nox.session(python="3.13") +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -416,7 +426,7 @@ 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 54aa282..150e845 100644 --- a/owlbot.py +++ b/owlbot.py @@ -38,10 +38,11 @@ "3.11": [], "3.12": extras_storage + extras_spanner, "3.13": extras_bf, + "3.14": extras_bf, } templated_files = common.py_library( - unit_test_python_versions=["3.9", "3.11", "3.12", "3.13"], - system_test_python_versions=["3.9", "3.11", "3.12", "3.13"], + unit_test_python_versions=["3.9", "3.11", "3.12", "3.13", "3.14"], + system_test_python_versions=["3.9", "3.11", "3.12", "3.13", "3.14"], cov_level=100, unit_test_extras_by_python=extras_by_python, unit_test_external_dependencies=["google-cloud-testutils"], @@ -50,7 +51,7 @@ "pandas": "https://pandas.pydata.org/pandas-docs/stable/", "pydata-google-auth": "https://pydata-google-auth.readthedocs.io/en/latest/", }, - default_python_version="3.10", + default_python_version="3.14", ) s.move( templated_files, diff --git a/setup.py b/setup.py index 5fb9599..570e6c1 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,8 @@ "packaging >= 20.0.0", "pandas>=1.2.0", "pyarrow >= 3.0.0", + # See https://arrow.apache.org/release/22.0.0.html + "pyarrow >= 22.0.0; python_version >= '3.14'", "pydata-google-auth >=1.5.0", "tqdm >= 4.7.4, <5.0.0", ] @@ -110,6 +112,7 @@ "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 :: Internet", ], From d8cb86d9e73bed32ecb90e3a68ae74ef5e5885de Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 17:22:20 +0000 Subject: [PATCH 2/4] add constraints file --- testing/constraints-3.14.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testing/constraints-3.14.txt diff --git a/testing/constraints-3.14.txt b/testing/constraints-3.14.txt new file mode 100644 index 0000000..e69de29 From 52f26eb6b7ec59fc244ed55a350e96cc2b6edd88 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 17:23:15 +0000 Subject: [PATCH 3/4] lint --- noxfile.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 7214457..84f58f3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -218,7 +218,12 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"): + 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( @@ -426,7 +431,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", "3.14"): + 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 From 8e82d56343262544ba0e2d147522105b3168ed3b Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 4 Nov 2025 17:26:51 +0000 Subject: [PATCH 4/4] lint --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 84f58f3..9b62dc0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -178,7 +178,7 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) 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")