From 7023aeafdc42c7a16eafe22d0e2957a953b0f7c7 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 7 Jul 2026 17:02:10 +0000 Subject: [PATCH 1/3] fix(google-auth): add bounds for urllib3 and packaging dependencies (#1739) --- packages/google-auth/setup.py | 6 ++++-- packages/google-auth/testing/constraints-3.10.txt | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/google-auth/setup.py b/packages/google-auth/setup.py index 6b62efbb0b59..24b0ae7a9e04 100644 --- a/packages/google-auth/setup.py +++ b/packages/google-auth/setup.py @@ -37,8 +37,10 @@ enterprise_cert_extra_require = cryptography_base_require -# TODO(https://github.com/googleapis/google-auth-library-python/issues/1739): Add bounds for urllib3 and packaging dependencies. -urllib3_extra_require = ["urllib3", "packaging"] +urllib3_extra_require = [ + "urllib3 >= 1.21.1, < 3.0.0", + "packaging >= 20.0", +] rsa_extra_require = ["rsa>=3.1.4,<5"] diff --git a/packages/google-auth/testing/constraints-3.10.txt b/packages/google-auth/testing/constraints-3.10.txt index a01df7144a17..e0b7f0206515 100644 --- a/packages/google-auth/testing/constraints-3.10.txt +++ b/packages/google-auth/testing/constraints-3.10.txt @@ -11,4 +11,6 @@ cryptography==38.0.3 aiohttp==3.8.0 requests==2.20.0 pyjwt==2.0 -grpcio==1.59.0 \ No newline at end of file +grpcio==1.59.0 +urllib3==1.21.1 +packaging==20.0 From 38bc4629b02de71af003b2b6e1ec7f6dadc33ab9 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 7 Jul 2026 17:13:06 +0000 Subject: [PATCH 2/3] fix: set requests and urllib3 lower bounds for Python 3.10+ compatibility --- packages/google-auth/setup.py | 8 ++++++-- packages/google-auth/testing/constraints-3.10.txt | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/google-auth/setup.py b/packages/google-auth/setup.py index 24b0ae7a9e04..59294f9108a8 100644 --- a/packages/google-auth/setup.py +++ b/packages/google-auth/setup.py @@ -27,7 +27,10 @@ *cryptography_base_require, ) -requests_extra_require = ["requests >= 2.20.0, < 3.0.0"] +requests_extra_require = [ + "requests >= 2.20.0, < 3.0.0; python_version < '3.10'", + "requests >= 2.30.0, < 3.0.0; python_version >= '3.10'", +] aiohttp_extra_require = ["aiohttp >= 3.8.0, < 4.0.0", *requests_extra_require] @@ -38,7 +41,8 @@ enterprise_cert_extra_require = cryptography_base_require urllib3_extra_require = [ - "urllib3 >= 1.21.1, < 3.0.0", + "urllib3 >= 1.21.1, < 3.0.0; python_version < '3.10'", + "urllib3 >= 1.26.15, < 3.0.0; python_version >= '3.10'", "packaging >= 20.0", ] diff --git a/packages/google-auth/testing/constraints-3.10.txt b/packages/google-auth/testing/constraints-3.10.txt index e0b7f0206515..8cff9687ae59 100644 --- a/packages/google-auth/testing/constraints-3.10.txt +++ b/packages/google-auth/testing/constraints-3.10.txt @@ -9,8 +9,8 @@ pyasn1-modules==0.2.1 setuptools==40.3.0 cryptography==38.0.3 aiohttp==3.8.0 -requests==2.20.0 +requests==2.30.0 pyjwt==2.0 grpcio==1.59.0 -urllib3==1.21.1 +urllib3==1.26.15 packaging==20.0 From 465a6d04954c46fc0bb49b171dfc68fa9c697432 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 7 Jul 2026 17:16:07 +0000 Subject: [PATCH 3/3] fix: clean up setup.py bounds for Python 3.10+ --- packages/google-auth/setup.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-auth/setup.py b/packages/google-auth/setup.py index 59294f9108a8..87e7c2502196 100644 --- a/packages/google-auth/setup.py +++ b/packages/google-auth/setup.py @@ -27,10 +27,7 @@ *cryptography_base_require, ) -requests_extra_require = [ - "requests >= 2.20.0, < 3.0.0; python_version < '3.10'", - "requests >= 2.30.0, < 3.0.0; python_version >= '3.10'", -] +requests_extra_require = ["requests >= 2.30.0, < 3.0.0"] aiohttp_extra_require = ["aiohttp >= 3.8.0, < 4.0.0", *requests_extra_require] @@ -41,8 +38,7 @@ enterprise_cert_extra_require = cryptography_base_require urllib3_extra_require = [ - "urllib3 >= 1.21.1, < 3.0.0; python_version < '3.10'", - "urllib3 >= 1.26.15, < 3.0.0; python_version >= '3.10'", + "urllib3 >= 1.26.15, < 3.0.0", "packaging >= 20.0", ]