googleapis / google-auth-library-python

Google Auth Python Library
https://googleapis.dev/python/google-auth/latest/
Apache License 2.0
771 stars 304 forks source link

Unit tests fail with `cryptography >= 39.0.0` when using python 3.7 #1440

Open parthea opened 8 months ago

parthea commented 8 months ago

See build log here where python 3.7 unit tests fail when using cryptography >= 39.0.0

============================= test session starts ==============================
platform linux -- Python 3.7.17, pytest-7.4.3, pluggy-1.2.0
rootdir: /tmpfs/src/github/google-auth-library-python
plugins: asyncio-0.21.1, localserver-0.8.1, cov-4.1.0
asyncio: mode=strict
collected 1253 items / 1 error

==================================== ERRORS ====================================
_________ ERROR collecting tests/transport/test__custom_tls_signer.py __________
ImportError while importing test module '/tmpfs/src/github/google-auth-library-python/tests/transport/test__custom_tls_signer.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/transport/test__custom_tls_signer.py:21: in 
    import urllib3.contrib.pyopenssl  # type: ignore
.nox/unit-3-7/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py:49: in 
    from cryptography.hazmat.backends.openssl.x509 import _Certificate
E   ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509'
=============================== warnings summary ===============================
clundin25 commented 8 months ago

@parthea Since we have entered a release freeze until Jan 2nd, maybe we can just remove the Python 3.7 jobs? The deprecation indicates it can be removed on Jan 1st.