Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dcbdd3b

Browse filesBrowse files
authored
fix(google-auth): Drop support for Python 3.8 and 3.9 (googleapis#16946)
This PR updates `google-auth` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `setup.py` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.7, 3.8, and 3.9. * Documentation: Updated `README.rst` and `CONTRIBUTING.rst` to state that Python 3.10 is the minimum. * Cleanup: Removed EOL warning code from source and tests. * Constraints: Transferred lower bounds to `constraints-3.10.txt` and dropped 3.8/3.9 files. > [!NOTE] > During local testing with Docker, 7 async tests failed on Python 3.10 inside `tests_async/transport/test_aiohttp_requests.py` (though all tests passed successfully on 3.11 - 3.14). We are pushing to see if these failures replicate on GitHub Actions or if they are just a local environment quirk. Fixes internal issue: http://b/482126936 🦕
1 parent cdc5dd5 commit dcbdd3b
Copy full SHA for dcbdd3b

10 files changed

+17-147Lines changed: 17 additions & 147 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/google-auth/CONTRIBUTING.rst‎

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 numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A few notes on making changes to ``google-auth-library-python``.
1919
using ``nox -s docs``.
2020

2121
- 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.
2323

2424
- The codebase *must* have 100% test statement coverage after each commit.
2525
You can test coverage via ``nox -e cover``.
Collapse file

‎packages/google-auth/README.rst‎

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 numberDiff line numberDiff line change
@@ -35,18 +35,7 @@ Note that the extras pyopenssl and enterprise_cert should not be used together b
3535

3636
Supported Python Versions
3737
^^^^^^^^^^^^^^^^^^^^^^^^^
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
5039

5140
Unsupported Python Versions
5241
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Collapse file

‎packages/google-auth/google/auth/__init__.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/__init__.py
-23Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"""Google Auth Library for Python."""
1616

1717
import logging
18-
import sys
19-
import warnings
2018

2119
from google.auth import version as google_auth_version
2220
from google.auth._default import (
@@ -32,26 +30,5 @@
3230
__all__ = ["default", "load_credentials_from_file", "load_credentials_from_dict"]
3331

3432

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-
5633
# Set default logging handler to avoid "No handler found" warnings.
5734
logging.getLogger(__name__).addHandler(logging.NullHandler())
Collapse file

‎packages/google-auth/google/oauth2/__init__.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/google/oauth2/__init__.py
-25Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,3 @@
1313
# limitations under the License.
1414

1515
"""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

‎packages/google-auth/noxfile.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/noxfile.py
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@
3434

3535
DEFAULT_PYTHON_VERSION = "3.14"
3636
UNIT_TEST_PYTHON_VERSIONS = [
37-
"3.8",
38-
"3.9",
3937
"3.10",
4038
"3.11",
4139
"3.12",
4240
"3.13",
4341
"3.14",
4442
]
4543
ALL_PYTHON = UNIT_TEST_PYTHON_VERSIONS.copy()
46-
ALL_PYTHON.extend(["3.7"])
4744

4845
# Error if a python version is missing
4946
nox.options.error_on_missing_interpreters = True
@@ -151,8 +148,6 @@ def mypy(session):
151148
def unit(session, install_deprecated_extras):
152149
# Install all test dependencies, then install this package in-place.
153150

154-
if session.python in ("3.7",):
155-
session.skip("Python 3.7 is no longer supported")
156151
min_py, max_py = UNIT_TEST_PYTHON_VERSIONS[0], UNIT_TEST_PYTHON_VERSIONS[-1]
157152
if not install_deprecated_extras and session.python not in (min_py, max_py):
158153
# only run double tests on first and last supported versions
Collapse file

‎packages/google-auth/setup.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/setup.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
requests_extra_require = ["requests >= 2.20.0, < 3.0.0"]
3131

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]
3333

3434
pyjwt_extra_require = ["pyjwt>=2.0"]
3535

@@ -112,13 +112,11 @@
112112
package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]},
113113
install_requires=DEPENDENCIES,
114114
extras_require=extras,
115-
python_requires=">=3.8",
115+
python_requires=">=3.10",
116116
license="Apache 2.0",
117117
keywords="google auth oauth client",
118118
classifiers=[
119119
"Programming Language :: Python :: 3",
120-
"Programming Language :: Python :: 3.8",
121-
"Programming Language :: Python :: 3.9",
122120
"Programming Language :: Python :: 3.10",
123121
"Programming Language :: Python :: 3.11",
124122
"Programming Language :: Python :: 3.12",
Collapse file
+13-1Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
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

‎packages/google-auth/testing/constraints-3.8.txt‎

Copy file name to clipboardExpand all lines: packages/google-auth/testing/constraints-3.8.txt
-13Lines changed: 0 additions & 13 deletions
This file was deleted.
Collapse file

‎packages/google-auth/testing/constraints-3.9.txt‎

Copy file name to clipboardExpand all lines: packages/google-auth/testing/constraints-3.9.txt
Whitespace-only changes.
Collapse file

‎packages/google-auth/tests/test_version_warnings.py‎

Copy file name to clipboardExpand all lines: packages/google-auth/tests/test_version_warnings.py
-63Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.