From ddea16f5c773ede0b192ed357fc42b4e5a628500 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Fri, 24 Oct 2025 06:17:42 -0400 Subject: [PATCH 01/10] feat(ci): Add Python 3.14 support to owlbot.py --- owlbot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/owlbot.py b/owlbot.py index af02b0af..767da60b 100644 --- a/owlbot.py +++ b/owlbot.py @@ -26,6 +26,7 @@ templated_files = common.py_library( microgenerator=True, cov_level=100, + unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], ) s.move( templated_files, From 6997ae744c790aae91d2ff79c34caf30f235922a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 24 Oct 2025 10:27:01 +0000 Subject: [PATCH 02/10] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index c66b757c..e381a05f 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.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f6f9ad50..5f1f4179 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.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. + 3.8, 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:: @@ -221,21 +221,21 @@ Supported Python Versions We support: -- `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ - `Python 3.10`_ - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ +- `Python 3.14`_ -.. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _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`_. @@ -243,7 +243,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-cloud-core/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.7. +We also explicitly decided to support Python 3 beginning with version 3.8. Reasons for this include: - Encouraging use of newest versions of Python 3 From f11fc3156fc49e0c68926880caae5b12e209d35a Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Fri, 24 Oct 2025 06:46:41 -0400 Subject: [PATCH 03/10] feat(ci): Add Python 3.14 support to core files --- .github/sync-repo-settings.yaml | 2 ++ noxfile.py | 2 +- setup.py | 4 +++- testing/constraints-3.14.txt | 0 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 testing/constraints-3.14.txt diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index eeac2657..c1d81b99 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -17,6 +17,8 @@ branchProtectionRules: - 'unit (3.10)' - 'unit (3.11)' - 'unit (3.12)' + - 'unit (3.13)' + - 'unit (3.14)' - 'cover' - 'docs' - 'docfx' diff --git a/noxfile.py b/noxfile.py index 70ba2b24..e1a1c953 100644 --- a/noxfile.py +++ b/noxfile.py @@ -96,7 +96,7 @@ def default(session): ) -@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]) +@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]) def unit(session): """Default unit test session.""" default(session) diff --git a/setup.py b/setup.py index d25a8801..8e7dd9da 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,8 @@ ] extras = { "grpc": [ - "grpcio >= 1.38.0, < 2.0.0", + "grpcio >= 1.38.0, < 2.0.0; python_version < '3.14'", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "grpcio-status >= 1.38.0, < 2.0.0", ], } @@ -82,6 +83,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", ], diff --git a/testing/constraints-3.14.txt b/testing/constraints-3.14.txt new file mode 100644 index 00000000..e69de29b From 8faaaeedc8d12e901890c050321b00e34686a6be Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Fri, 24 Oct 2025 07:26:50 -0400 Subject: [PATCH 04/10] Apply suggestion from @chalmerlowe 3.7 is not supported in this repo. --- .github/sync-repo-settings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index c1d81b99..2061e89c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -12,7 +12,7 @@ branchProtectionRules: - 'mypy' - 'lint' - 'unit (3.7)' - - 'unit (3.8)' +- 'unit (3.8)' - 'unit (3.9)' - 'unit (3.10)' - 'unit (3.11)' From 36e5de1f2d60d4eebde075152c3b82166dd2c605 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Fri, 24 Oct 2025 07:27:11 -0400 Subject: [PATCH 05/10] Apply suggestion from @chalmerlowe --- .github/sync-repo-settings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 2061e89c..c1d81b99 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -12,7 +12,7 @@ branchProtectionRules: - 'mypy' - 'lint' - 'unit (3.7)' -- 'unit (3.8)' + - 'unit (3.8)' - 'unit (3.9)' - 'unit (3.10)' - 'unit (3.11)' From 6e154604fb7b4ba9bb2532854437a2b887bc832e Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Fri, 24 Oct 2025 07:29:16 -0400 Subject: [PATCH 06/10] Apply suggestion from @chalmerlowe 3.7 is not supported in this repo. From 9dfdbb7483dfa19eeb012583d14e302351a0e194 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Fri, 24 Oct 2025 07:32:57 -0400 Subject: [PATCH 07/10] fix(ci): Remove unit (3.7) from required checks --- .github/sync-repo-settings.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index c1d81b99..bdd4cb7e 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -11,7 +11,6 @@ branchProtectionRules: # No Kokoro: the following are Github actions - 'mypy' - 'lint' - - 'unit (3.7)' - 'unit (3.8)' - 'unit (3.9)' - 'unit (3.10)' From 353b642cfe0846ab130abbba819eaa59eb954942 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Fri, 24 Oct 2025 08:09:31 -0400 Subject: [PATCH 08/10] fix(coverage): Remove obsolete Python < 3.8 import logic --- google/cloud/obsolete/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/google/cloud/obsolete/__init__.py b/google/cloud/obsolete/__init__.py index 854110ef..5e9f7795 100644 --- a/google/cloud/obsolete/__init__.py +++ b/google/cloud/obsolete/__init__.py @@ -16,12 +16,7 @@ import sys import warnings - - -if sys.version_info < (3, 8): - import importlib_metadata as metadata -else: - import importlib.metadata as metadata +import importlib.metadata as metadata def complain(distribution_name): From 8dc13e3ceed4f21b09c97da2a378c29ec83f4978 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Fri, 24 Oct 2025 08:15:37 -0400 Subject: [PATCH 09/10] fix(coverage): Add no cover pragma for api_key import --- google/cloud/client/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google/cloud/client/__init__.py b/google/cloud/client/__init__.py index 1396486c..f55bd68f 100644 --- a/google/cloud/client/__init__.py +++ b/google/cloud/client/__init__.py @@ -34,8 +34,9 @@ import google.auth.api_key HAS_GOOGLE_AUTH_API_KEY = True -except ImportError: - HAS_GOOGLE_AUTH_API_KEY = False +except ImportError: # pragma: no cover + HAS_GOOGLE_AUTH_API_KEY = False # pragma: no cover + # TODO: Investigate adding a test for google.auth.api_key ImportError (https://github.com/googleapis/python-cloud-core/issues/334) _GOOGLE_AUTH_CREDENTIALS_HELP = ( From 953fffb2d98e2e19e056f09b7a97d751043a5550 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Fri, 24 Oct 2025 08:23:12 -0400 Subject: [PATCH 10/10] fix(ci): Correct lint errors and coverage pragma case --- google/cloud/client/__init__.py | 4 ++-- google/cloud/obsolete/__init__.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/google/cloud/client/__init__.py b/google/cloud/client/__init__.py index f55bd68f..27d1a4c3 100644 --- a/google/cloud/client/__init__.py +++ b/google/cloud/client/__init__.py @@ -34,8 +34,8 @@ import google.auth.api_key HAS_GOOGLE_AUTH_API_KEY = True -except ImportError: # pragma: no cover - HAS_GOOGLE_AUTH_API_KEY = False # pragma: no cover +except ImportError: # pragma: NO COVER + HAS_GOOGLE_AUTH_API_KEY = False # pragma: NO COVER # TODO: Investigate adding a test for google.auth.api_key ImportError (https://github.com/googleapis/python-cloud-core/issues/334) diff --git a/google/cloud/obsolete/__init__.py b/google/cloud/obsolete/__init__.py index 5e9f7795..552f7555 100644 --- a/google/cloud/obsolete/__init__.py +++ b/google/cloud/obsolete/__init__.py @@ -14,9 +14,8 @@ """Helpers for deprecated code and modules.""" -import sys -import warnings import importlib.metadata as metadata +import warnings def complain(distribution_name):