Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit d6ec87f

Browse files
committed
made cryptography into required dependency
1 parent a9027c4 commit d6ec87f

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

setup.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,30 @@
1919
from setuptools import setup
2020

2121

22-
DEPENDENCIES = ("pyasn1-modules>=0.2.1",)
22+
DEPENDENCIES = (
23+
"pyasn1-modules>=0.2.1",
24+
"cryptography >= 38.0.3",
25+
# TODO: remove rsa from dependencies in next release (replaced with cryptography)
26+
"rsa>=3.1.4,<5",
27+
)
2328

24-
cryptography_base_require = [
29+
# Note: cryptography was made into a required dependency. Extra is kept for backwards compatibility
30+
cryptography_extra_require = [
2531
"cryptography >= 38.0.3",
2632
]
2733

28-
# TODO: rsa is archived. Remove optional dependency in future release
29-
rsa_extra_require = ["rsa>=3.1.4,<5"]
30-
3134
requests_extra_require = ["requests >= 2.20.0, < 3.0.0"]
3235

3336
aiohttp_extra_require = ["aiohttp >= 3.6.2, < 4.0.0", *requests_extra_require]
3437

35-
pyjwt_extra_require = ["pyjwt>=2.0", *cryptography_base_require]
38+
pyjwt_extra_require = ["pyjwt>=2.0"]
3639

3740
reauth_extra_require = ["pyu2f>=0.1.5"]
3841

3942
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1738): Add bounds for cryptography and pyopenssl dependencies.
4043
enterprise_cert_extra_require = ["cryptography", "pyopenssl"]
4144

42-
pyopenssl_extra_require = ["pyopenssl>=20.0.0", cryptography_base_require]
45+
pyopenssl_extra_require = ["pyopenssl>=20.0.0"]
4346

4447
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1739): Add bounds for urllib3 and packaging dependencies.
4548
urllib3_extra_require = ["urllib3", "packaging"]
@@ -71,12 +74,10 @@
7174
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1722): `test_aiohttp_requests` depend on
7275
# aiohttp < 3.10.0 which is a bug. Investigate and remove the pinned aiohttp version.
7376
"aiohttp < 3.10.0",
74-
*rsa_extra_require,
7577
]
7678

7779
extras = {
78-
"cryptography": cryptography_base_require,
79-
"rsa": rsa_extra_require,
80+
"cryptography": cryptography_extra_require,
8081
"aiohttp": aiohttp_extra_require,
8182
"enterprise_cert": enterprise_cert_extra_require,
8283
"pyopenssl": pyopenssl_extra_require,

0 commit comments

Comments
 (0)