GeezerVison is showing github.com — fix(google-auth): Drop support for Python 3.8 and 3.9 (#16946) · googleapis/google-cloud-python@dcbdd3b
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/CONTRIBUTING.rst +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,7 @@ A few notes on making changes to ``google-auth-library-python``. | 19 | 19 | using ``nox -s docs``. | 20 | 20 |
| 21 | 21 | - The change must work fully on the following CPython versions: | 22 | | - 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 across macOS, Linux, and Windows. | | 22 | + 3.10, 3.11, 3.12, 3.13 and 3.14 across macOS, Linux, and Windows. | 23 | 23 |
| 24 | 24 | - The codebase *must* have 100% test statement coverage after each commit. | 25 | 25 | You can test coverage via ``nox -e cover``. | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/README.rst +1-12Lines changed: 1 addition & 12 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -35,18 +35,7 @@ Note that the extras pyopenssl and enterprise_cert should not be used together b | 35 | 35 |
| 36 | 36 | Supported Python Versions | 37 | 37 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | 38 | | -Python >= 3.8 | 39 | | - | 40 | | -**NOTE**: | 41 | | -Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in | 42 | | -October 2024 and October 2025, respectively. | 43 | | -We recommend that all developers upgrade to Python 3.10 and newer as soon as | 44 | | -they can. Support for end-of-life Python runtimes will be removed from this | 45 | | -library in future updates. | 46 | | -Previous releases that support end-of-life Python versions will continue to be available | 47 | | -for download, but future releases will only target supported versions. | 48 | | - | 49 | | -.. _unsupported: https://devguide.python.org/versions/#unsupported-versions | | 38 | +Python >= 3.10 | 50 | 39 |
| 51 | 40 | Unsupported Python Versions | 52 | 41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/__init__.py -23Lines changed: 0 additions & 23 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 15 | 15 | """Google Auth Library for Python.""" | 16 | 16 |
| 17 | 17 | import logging | 18 | | -import sys | 19 | | -import warnings | 20 | 18 |
| 21 | 19 | from google.auth import version as google_auth_version | 22 | 20 | from google.auth._default import ( | | 32 | 30 | __all__ = ["default", "load_credentials_from_file", "load_credentials_from_dict"] | 33 | 31 |
| 34 | 32 |
| 35 | | -class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER | 36 | | - """ | 37 | | - Deprecation warning raised when Python 3.7 runtime is detected. | 38 | | - Python 3.7 support will be dropped after January 1, 2024. | 39 | | - """ | 40 | | - | 41 | | - pass | 42 | | - | 43 | | - | 44 | | -# Raise warnings for deprecated versions | 45 | | -eol_message = ( | 46 | | - "You are using a Python version {} past its end of life. Google will update " | 47 | | - "google-auth with critical bug fixes on a best-effort basis, but not " | 48 | | - "with any other fixes or features. Please upgrade your Python version, " | 49 | | - "and then update google-auth." | 50 | | -) | 51 | | -if sys.version_info.major == 3 and sys.version_info.minor == 8: # pragma: NO COVER | 52 | | - warnings.warn(eol_message.format("3.8"), FutureWarning) | 53 | | -elif sys.version_info.major == 3 and sys.version_info.minor == 9: # pragma: NO COVER | 54 | | - warnings.warn(eol_message.format("3.9"), FutureWarning) | 55 | | - | 56 | 33 | # Set default logging handler to avoid "No handler found" warnings. | 57 | 34 | logging.getLogger(__name__).addHandler(logging.NullHandler()) |
Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/google/oauth2/__init__.py -25Lines changed: 0 additions & 25 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | # limitations under the License. | 14 | 14 |
| 15 | 15 | """Google OAuth 2.0 Library for Python.""" | 16 | | - | 17 | | -import sys | 18 | | -import warnings | 19 | | - | 20 | | - | 21 | | -class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER | 22 | | - """ | 23 | | - Deprecation warning raised when Python 3.7 runtime is detected. | 24 | | - Python 3.7 support will be dropped after January 1, 2024. | 25 | | - """ | 26 | | - | 27 | | - pass | 28 | | - | 29 | | - | 30 | | -# Raise warnings for deprecated versions | 31 | | -eol_message = ( | 32 | | - "You are using a Python version {} past its end of life. Google will update " | 33 | | - "google-auth with critical bug fixes on a best-effort basis, but not " | 34 | | - "with any other fixes or features. Please upgrade your Python version, " | 35 | | - "and then update google-auth." | 36 | | -) | 37 | | -if sys.version_info.major == 3 and sys.version_info.minor == 8: # pragma: NO COVER | 38 | | - warnings.warn(eol_message.format("3.8"), FutureWarning) | 39 | | -elif sys.version_info.major == 3 and sys.version_info.minor == 9: # pragma: NO COVER | 40 | | - warnings.warn(eol_message.format("3.9"), FutureWarning) |
Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/noxfile.py -5Lines changed: 0 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 34 | 34 |
| 35 | 35 | DEFAULT_PYTHON_VERSION = "3.14" | 36 | 36 | UNIT_TEST_PYTHON_VERSIONS = [ | 37 | | - "3.8", | 38 | | - "3.9", | 39 | 37 | "3.10", | 40 | 38 | "3.11", | 41 | 39 | "3.12", | 42 | 40 | "3.13", | 43 | 41 | "3.14", | 44 | 42 | ] | 45 | 43 | ALL_PYTHON = UNIT_TEST_PYTHON_VERSIONS.copy() | 46 | | -ALL_PYTHON.extend(["3.7"]) | 47 | 44 |
| 48 | 45 | # Error if a python version is missing | 49 | 46 | nox.options.error_on_missing_interpreters = True | @@ -151,8 +148,6 @@ def mypy(session): | 151 | 148 | def unit(session, install_deprecated_extras): | 152 | 149 | # Install all test dependencies, then install this package in-place. | 153 | 150 |
| 154 | | - if session.python in ("3.7",): | 155 | | - session.skip("Python 3.7 is no longer supported") | 156 | 151 | min_py, max_py = UNIT_TEST_PYTHON_VERSIONS[0], UNIT_TEST_PYTHON_VERSIONS[-1] | 157 | 152 | if not install_deprecated_extras and session.python not in (min_py, max_py): | 158 | 153 | # only run double tests on first and last supported versions | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/setup.py +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 29 | 29 |
| 30 | 30 | requests_extra_require = ["requests >= 2.20.0, < 3.0.0"] | 31 | 31 |
| 32 | | -aiohttp_extra_require = ["aiohttp >= 3.6.2, < 4.0.0", *requests_extra_require] | | 32 | +aiohttp_extra_require = ["aiohttp >= 3.8.0, < 4.0.0", *requests_extra_require] | 33 | 33 |
| 34 | 34 | pyjwt_extra_require = ["pyjwt>=2.0"] | 35 | 35 |
| | 112 | 112 | package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, | 113 | 113 | install_requires=DEPENDENCIES, | 114 | 114 | extras_require=extras, | 115 | | - python_requires=">=3.8", | | 115 | + python_requires=">=3.10", | 116 | 116 | license="Apache 2.0", | 117 | 117 | keywords="google auth oauth client", | 118 | 118 | classifiers=[ | 119 | 119 | "Programming Language :: Python :: 3", | 120 | | - "Programming Language :: Python :: 3.8", | 121 | | - "Programming Language :: Python :: 3.9", | 122 | 120 | "Programming Language :: Python :: 3.10", | 123 | 121 | "Programming Language :: Python :: 3.11", | 124 | 122 | "Programming Language :: Python :: 3.12", | |
Collapse file Copy file name to clipboard +13-1Lines changed: 13 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -urllib3<2.0.0 | | 1 | +# This constraints file is used to check that lower bounds | | 2 | +# are correct in setup.py | | 3 | +# List *all* library dependencies and extras in this file. | | 4 | +# Pin the version to the lower bound. | | 5 | +# | | 6 | +# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", | | 7 | +# Then this file should have foo==1.14.0 | | 8 | +pyasn1-modules==0.2.1 | | 9 | +setuptools==40.3.0 | | 10 | +cryptography==38.0.3 | | 11 | +aiohttp==3.8.0 | | 12 | +requests==2.20.0 | | 13 | +pyjwt==2.0 |
Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/testing/constraints-3.8.txt -13Lines changed: 0 additions & 13 deletions Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/testing/constraints-3.9.txt Collapse file Copy file name to clipboardExpand all lines: packages/google-auth/tests/test_version_warnings.py -63Lines changed: 0 additions & 63 deletions
|