diff --git a/packages/google-cloud-core/CONTRIBUTING.rst b/packages/google-cloud-core/CONTRIBUTING.rst index 7295bcacf2a2..f4ec66686af0 100644 --- a/packages/google-cloud-core/CONTRIBUTING.rst +++ b/packages/google-cloud-core/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, 3.13 and 3.14 on both UNIX and Windows. + 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 @@ -197,14 +197,12 @@ Supported Python Versions We support: -- `Python 3.9`_ - `Python 3.10`_ - `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/ @@ -217,17 +215,6 @@ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py -We also explicitly decided to support Python 3 beginning with version 3.9. -Reasons for this include: - -- Encouraging use of newest versions of Python 3 -- Taking the lead of `prominent`_ open-source `projects`_ -- `Unicode literal support`_ which allows for a cleaner codebase that - works in both Python 2 and Python 3 - -.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django -.. _projects: http://flask.pocoo.org/docs/0.10/python3/ -.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ ********** Versioning diff --git a/packages/google-cloud-core/README.rst b/packages/google-cloud-core/README.rst index bfd89a74e64c..ede55e346a10 100644 --- a/packages/google-cloud-core/README.rst +++ b/packages/google-cloud-core/README.rst @@ -32,9 +32,8 @@ to `Python Development Environment Setup Guide`_ for Google Cloud Platform. Supported Python Versions ------------------------- -Python >= 3.9 +Python >= 3.10 Unsupported Python Versions --------------------------- - -Python <= 3.8 +Python <= 3.9 diff --git a/packages/google-cloud-core/docs/README.rst b/packages/google-cloud-core/docs/README.rst index bfd89a74e64c..ede55e346a10 100644 --- a/packages/google-cloud-core/docs/README.rst +++ b/packages/google-cloud-core/docs/README.rst @@ -32,9 +32,8 @@ to `Python Development Environment Setup Guide`_ for Google Cloud Platform. Supported Python Versions ------------------------- -Python >= 3.9 +Python >= 3.10 Unsupported Python Versions --------------------------- - -Python <= 3.8 +Python <= 3.9 diff --git a/packages/google-cloud-core/google/cloud/obsolete/__init__.py b/packages/google-cloud-core/google/cloud/obsolete/__init__.py index 1588ea53b770..628c1a2d6f67 100644 --- a/packages/google-cloud-core/google/cloud/obsolete/__init__.py +++ b/packages/google-cloud-core/google/cloud/obsolete/__init__.py @@ -14,11 +14,7 @@ """Helpers for deprecated code and modules.""" -try: - import importlib.metadata as metadata -except ImportError: - # For Python 3.7 compatibility - import importlib_metadata as metadata # type: ignore[no-redef] +import importlib.metadata as metadata import warnings diff --git a/packages/google-cloud-core/noxfile.py b/packages/google-cloud-core/noxfile.py index 400a0235d6a4..18c0e1afa8d5 100644 --- a/packages/google-cloud-core/noxfile.py +++ b/packages/google-cloud-core/noxfile.py @@ -25,7 +25,6 @@ DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS = [ - "3.9", "3.10", "3.11", "3.12", @@ -342,7 +341,7 @@ def core_deps_from_source(session, protobuf_implementation): f"{CURRENT_DIRECTORY}/../google-api-core", f"{CURRENT_DIRECTORY}/../google-auth", f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1", - f"{CURRENT_DIRECTORY}/../proto-plus" + f"{CURRENT_DIRECTORY}/../proto-plus", ] for dep in core_dependencies_from_source: diff --git a/packages/google-cloud-core/pytest.ini b/packages/google-cloud-core/pytest.ini index dd32e71aa024..06dab82feb88 100644 --- a/packages/google-cloud-core/pytest.ini +++ b/packages/google-cloud-core/pytest.ini @@ -4,11 +4,9 @@ filterwarnings = error # Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning - # Remove after support for Python 3.7 is dropped - ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning # Remove once the minimum supported version of `google-api-core` is 2.15.0 ignore:.*pkg_resources.declare_namespace:DeprecationWarning ignore:.*pkg_resources is deprecated as an API:DeprecationWarning - # Remove after support for Python 3.8, 3.9 and/or 3.10+ is dropped + # Remove after support for Python 3.10+ is dropped ignore:\s*You are using a (non-supported )?Python version \(?3\.(8|9|1[0-9]+):DeprecationWarning ignore:\s*You are using a (non-supported )?Python version \(?3\.(8|9|1[0-9]+):FutureWarning diff --git a/packages/google-cloud-core/setup.py b/packages/google-cloud-core/setup.py index 556bf4a4ec5a..360fdf4cccb5 100644 --- a/packages/google-cloud-core/setup.py +++ b/packages/google-cloud-core/setup.py @@ -33,9 +33,9 @@ ] extras = { "grpc": [ - "grpcio >= 1.38.0, < 2.0.0; python_version < '3.14'", + "grpcio >= 1.47.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", + "grpcio-status >= 1.47.0, < 2.0.0", ], } @@ -75,7 +75,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -88,7 +87,7 @@ packages=packages, install_requires=dependencies, extras_require=extras, - python_requires=">=3.9", + python_requires=">=3.10", include_package_data=True, zip_safe=False, ) diff --git a/packages/google-cloud-core/testing/constraints-3.10.txt b/packages/google-cloud-core/testing/constraints-3.10.txt index e69de29bb2d1..b6e9a0b1f23b 100644 --- a/packages/google-cloud-core/testing/constraints-3.10.txt +++ b/packages/google-cloud-core/testing/constraints-3.10.txt @@ -0,0 +1,13 @@ +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List *all* library dependencies and extras in this file. +# Pin the version to the lower bound. +# +# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-api-core==2.11.0 +google-auth==2.14.1 +grpcio==1.47.0 +grpcio-status==1.47.0 +# cryptography is a direct dependency of google-auth +cryptography==38.0.3 diff --git a/packages/google-cloud-core/testing/constraints-3.9.txt b/packages/google-cloud-core/testing/constraints-3.9.txt deleted file mode 100644 index d3737a8c2731..000000000000 --- a/packages/google-cloud-core/testing/constraints-3.9.txt +++ /dev/null @@ -1,12 +0,0 @@ -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List *all* library dependencies and extras in this file. -# Pin the version to the lower bound. -# -# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", -# Then this file should have foo==1.14.0 -google-api-core==2.11.0 -google-auth==2.14.1 -grpcio==1.38.0 -# cryptography is a direct dependency of google-auth -cryptography==38.0.3