Skip to content

Commit 386eecb

Browse files
committed
address unit test failures
1 parent 1cb2682 commit 386eecb

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

setup.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,39 @@
2727
"rsa>=3.1.4,<5",
2828
)
2929

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+
]
3036

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+
]
3443

3544
requests_extra_require = ["requests >= 2.20.0, < 3.0.0.dev0"]
3645

3746
aiohttp_extra_require = ["aiohttp >= 3.6.2, < 4.0.0.dev0", *requests_extra_require]
3847

3948
pyjwt_extra_require = [
4049
"pyjwt>=2.0",
41-
*base_cryptography_require,
42-
*python38_cryptography_require,
50+
*cryptography_base_require,
4351
]
4452

4553
reauth_extra_require = ["pyu2f>=0.1.5"]
4654

4755
enterprise_cert_extra_require = [
4856
"cryptography",
4957
"pyopenssl",
50-
*python38_cryptography_require,
5158
]
5259

5360
pyopenssl_extra_require = [
5461
"pyopenssl>=20.0.0",
55-
*base_cryptography_require,
56-
*python38_cryptography_require,
62+
cryptography_base_require,
5763
]
5864

5965
# Unit test requirements.

0 commit comments

Comments
 (0)