Skip to content

Commit 6da41e8

Browse files
authored
fix(google-auth): add gRPC extra and clean up obsolete TODOs (#17644)
- Added `grpc` extra (`"grpc": ["grpcio"]`) and updated `testing_extra_require` to use `*grpc_extra_require`. - Removed obsolete TODO comments for `grpcio`, `oauth2client`, and `urllib3` bounds. Fixes #1735 Fixes #1736 Fixes #1739
1 parent 1838c35 commit 6da41e8

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

packages/google-auth/setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@
4242

4343
rsa_extra_require = ["rsa>=3.1.4,<5"]
4444

45+
grpc_extra_require = [
46+
"grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'",
47+
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
48+
]
49+
4550
# Unit test requirements.
4651
testing_extra_require = [
47-
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1735): Remove `grpcio` from testing requirements once an extra is added for `grpcio` dependency.
48-
"grpcio",
52+
*grpc_extra_require,
4953
"flask",
5054
"freezegun",
5155
*pyjwt_extra_require,
@@ -74,8 +78,7 @@
7478
"testing": testing_extra_require,
7579
"urllib3": urllib3_extra_require,
7680
"rsa": rsa_extra_require,
77-
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1735): Add an extra for `grpcio` dependency.
78-
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1736): Add an extra for `oauth2client` dependency.
81+
"grpc": grpc_extra_require,
7982
}
8083

8184
with io.open("README.rst", "r") as fh:

packages/google-auth/testing/constraints-3.10.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ setuptools==40.3.0
1010
cryptography==38.0.3
1111
aiohttp==3.8.0
1212
requests==2.20.0
13-
pyjwt==2.0
13+
pyjwt==2.0
14+
grpcio==1.59.0

0 commit comments

Comments
 (0)