diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index eeac2657..bdd4cb7e 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -11,12 +11,13 @@ branchProtectionRules: # No Kokoro: the following are Github actions - 'mypy' - 'lint' - - 'unit (3.7)' - 'unit (3.8)' - 'unit (3.9)' - 'unit (3.10)' - 'unit (3.11)' - 'unit (3.12)' + - 'unit (3.13)' + - 'unit (3.14)' - 'cover' - 'docs' - 'docfx' 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 diff --git a/google/cloud/client/__init__.py b/google/cloud/client/__init__.py index 1396486c..27d1a4c3 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 = ( diff --git a/google/cloud/obsolete/__init__.py b/google/cloud/obsolete/__init__.py index 854110ef..552f7555 100644 --- a/google/cloud/obsolete/__init__.py +++ b/google/cloud/obsolete/__init__.py @@ -14,16 +14,10 @@ """Helpers for deprecated code and modules.""" -import sys +import importlib.metadata as metadata import warnings -if sys.version_info < (3, 8): - import importlib_metadata as metadata -else: - import importlib.metadata as metadata - - def complain(distribution_name): """Issue a warning if `distribution_name` is installed. 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/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, 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