|
27 | 27 | "rsa>=3.1.4,<5", |
28 | 28 | ) |
29 | 29 |
|
| 30 | +# TODO(https://github.com/googleapis/google-auth-library-python/issues/1440): 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 | +] |
30 | 36 |
|
31 | | -base_cryptography_require = ["cryptography>=38.0.3"] |
32 | | - |
33 | | -python38_cryptography_require = ["cryptography < 39.0.0; python_version <= '3.8'"] |
| 37 | +# TODO(https://github.com/googleapis/google-auth-library-python/issues/1665): Remove `pyopenssl_testing_require` once |
| 38 | +# `TestDecryptPrivateKey::test_success` is updated to remove the deprecated `OpenSSL.crypto.sign` and |
| 39 | +# `OpenSSL.crypto.verify` methods. See: https://www.pyopenssl.org/en/latest/changelog.html#id3. |
| 40 | +pyopenssl_testing_require = [ |
| 41 | + "pyopenssl < 24.3.0", |
| 42 | +] |
34 | 43 |
|
35 | 44 | requests_extra_require = ["requests >= 2.20.0, < 3.0.0.dev0"] |
36 | 45 |
|
37 | 46 | aiohttp_extra_require = ["aiohttp >= 3.6.2, < 4.0.0.dev0", *requests_extra_require] |
38 | 47 |
|
39 | 48 | pyjwt_extra_require = [ |
40 | 49 | "pyjwt>=2.0", |
41 | | - *base_cryptography_require, |
42 | | - *python38_cryptography_require, |
| 50 | + *cryptography_base_require, |
43 | 51 | ] |
44 | 52 |
|
45 | 53 | reauth_extra_require = ["pyu2f>=0.1.5"] |
46 | 54 |
|
47 | 55 | enterprise_cert_extra_require = [ |
48 | 56 | "cryptography", |
49 | 57 | "pyopenssl", |
50 | | - *python38_cryptography_require, |
51 | 58 | ] |
52 | 59 |
|
53 | 60 | pyopenssl_extra_require = [ |
54 | 61 | "pyopenssl>=20.0.0", |
55 | | - *base_cryptography_require, |
56 | | - *python38_cryptography_require, |
| 62 | + cryptography_base_require, |
57 | 63 | ] |
58 | 64 |
|
59 | 65 | # Unit test requirements. |
|
0 commit comments