|
27 | 27 | "rsa>=3.1.4,<5", |
28 | 28 | ) |
29 | 29 |
|
| 30 | +# TODO(https://github.com/googleapis/google-auth-library-python/issues/1737): Unit test fails with |
| 31 | +# `No module named 'cryptography.hazmat.backends.openssl.x509' for Python 3.7``. |
| 32 | +cryptography_base_require = [ |
| 33 | + "cryptography >= 38.0.3", |
| 34 | + "cryptography < 39.0.0; python_version < '3.8'", |
| 35 | +] |
| 36 | + |
| 37 | +requests_extra_require = ["requests >= 2.20.0, < 3.0.0"] |
| 38 | + |
| 39 | +aiohttp_extra_require = ["aiohttp >= 3.6.2, < 4.0.0", *requests_extra_require] |
| 40 | + |
| 41 | +pyjwt_extra_require = ["pyjwt>=2.0", *cryptography_base_require] |
| 42 | + |
| 43 | +reauth_extra_require = ["pyu2f>=0.1.5"] |
| 44 | + |
| 45 | +# TODO(https://github.com/googleapis/google-auth-library-python/issues/1738): Add bounds for cryptography and pyopenssl dependencies. |
| 46 | +enterprise_cert_extra_require = ["cryptography", "pyopenssl"] |
| 47 | + |
| 48 | +pyopenssl_extra_require = ["pyopenssl>=20.0.0", cryptography_base_require] |
| 49 | + |
| 50 | +# TODO(https://github.com/googleapis/google-auth-library-python/issues/1739): Add bounds for urllib3 and packaging dependencies. |
| 51 | +urllib3_extra_require = ["urllib3", "packaging"] |
| 52 | + |
| 53 | +# Unit test requirements. |
| 54 | +testing_extra_require = [ |
| 55 | + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1735): Remove `grpcio` from testing requirements once an extra is added for `grpcio` dependency. |
| 56 | + "grpcio", |
| 57 | + "flask", |
| 58 | + "freezegun", |
| 59 | + "mock", |
| 60 | + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1736): Remove `oauth2client` from testing requirements once an extra is added for `oauth2client` dependency. |
| 61 | + "oauth2client", |
| 62 | + *pyjwt_extra_require, |
| 63 | + "pytest", |
| 64 | + "pytest-cov", |
| 65 | + "pytest-localserver", |
| 66 | + *pyopenssl_extra_require, |
| 67 | + *reauth_extra_require, |
| 68 | + "responses", |
| 69 | + *urllib3_extra_require, |
| 70 | + # Async Dependencies |
| 71 | + *aiohttp_extra_require, |
| 72 | + "aioresponses", |
| 73 | + "pytest-asyncio", |
| 74 | + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1665): Remove the pinned version of pyopenssl |
| 75 | + # once `TestDecryptPrivateKey::test_success` is updated to remove the deprecated `OpenSSL.crypto.sign` and |
| 76 | + # `OpenSSL.crypto.verify` methods. See: https://www.pyopenssl.org/en/latest/changelog.html#id3. |
| 77 | + "pyopenssl < 24.3.0", |
| 78 | + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1722): `test_aiohttp_requests` depend on |
| 79 | + # aiohttp < 3.10.0 which is a bug. Investigate and remove the pinned aiohttp version. |
| 80 | + "aiohttp < 3.10.0", |
| 81 | +] |
| 82 | + |
30 | 83 | extras = { |
31 | | - "aiohttp": ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"], |
32 | | - "pyopenssl": ["pyopenssl>=20.0.0", "cryptography>=38.0.3"], |
33 | | - "requests": "requests >= 2.20.0, < 3.0.0.dev0", |
34 | | - "reauth": "pyu2f>=0.1.5", |
35 | | - "enterprise_cert": ["cryptography", "pyopenssl"], |
36 | | - "pyjwt": ["pyjwt>=2.0", "cryptography>=38.0.3"], |
| 84 | + "aiohttp": aiohttp_extra_require, |
| 85 | + "enterprise_cert": enterprise_cert_extra_require, |
| 86 | + "pyopenssl": pyopenssl_extra_require, |
| 87 | + "pyjwt": pyjwt_extra_require, |
| 88 | + "reauth": reauth_extra_require, |
| 89 | + "requests": requests_extra_require, |
| 90 | + "testing": testing_extra_require, |
| 91 | + "urllib3": urllib3_extra_require, |
| 92 | + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1735): Add an extra for `grpcio` dependency. |
| 93 | + # TODO(https://github.com/googleapis/google-auth-library-python/issues/1736): Add an extra for `oauth2client` dependency. |
37 | 94 | } |
38 | 95 |
|
39 | 96 | with io.open("README.rst", "r") as fh: |
|
0 commit comments