diff --git a/packages/google-auth/setup.py b/packages/google-auth/setup.py index c9976a301cb5..3e5b010febd5 100644 --- a/packages/google-auth/setup.py +++ b/packages/google-auth/setup.py @@ -42,10 +42,14 @@ rsa_extra_require = ["rsa>=3.1.4,<5"] +grpc_extra_require = [ + "grpcio >= 1.59.0, < 2.0.0; python_version < '3.14'", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", +] + # Unit test requirements. testing_extra_require = [ - # TODO(https://github.com/googleapis/google-auth-library-python/issues/1735): Remove `grpcio` from testing requirements once an extra is added for `grpcio` dependency. - "grpcio", + *grpc_extra_require, "flask", "freezegun", *pyjwt_extra_require, @@ -77,8 +81,7 @@ "testing": testing_extra_require, "urllib3": urllib3_extra_require, "rsa": rsa_extra_require, - # TODO(https://github.com/googleapis/google-auth-library-python/issues/1735): Add an extra for `grpcio` dependency. - # TODO(https://github.com/googleapis/google-auth-library-python/issues/1736): Add an extra for `oauth2client` dependency. + "grpc": grpc_extra_require, } with io.open("README.rst", "r") as fh: diff --git a/packages/google-auth/testing/constraints-3.10.txt b/packages/google-auth/testing/constraints-3.10.txt index 31094f0391cb..a01df7144a17 100644 --- a/packages/google-auth/testing/constraints-3.10.txt +++ b/packages/google-auth/testing/constraints-3.10.txt @@ -10,4 +10,5 @@ setuptools==40.3.0 cryptography==38.0.3 aiohttp==3.8.0 requests==2.20.0 -pyjwt==2.0 \ No newline at end of file +pyjwt==2.0 +grpcio==1.59.0 \ No newline at end of file