pyOpenSSL version 23.0.0 does not work with recent cryptography 39.0.0
sbernatsky opened this issue ยท 5 comments
sbernatsky commented
In recent version of cryptography (39.0.0) the x509
module was removed. This results in ModuleNotFoundError
:
File "~/shared/venv/lib/python3.9/site-packages/urllib3/contrib/pyopenssl.py", line 53, in <module>
from cryptography.hazmat.backends.openssl.x509 import _Certificate
ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509'
The problem is with the way how releases are pinned against cryptography major versions to prevent future breakage.
It should be cryptography [required: >=38.0.0,<39]
instead of current cryptography [required: >=38.0.0,<40]
.
alex commented
The line of code you're referencing is in urllib3, not pyOpenSSL.
โฆOn Tue, Jan 3, 2023, 12:27 PM sbernatsky ***@***.***> wrote:
In recent version of cryptography (39.0.0) the x509 module was removed.
This results in ModuleNotFoundError:
File "~/shared/venv/lib/python3.9/site-packages/urllib3/contrib/pyopenssl.py", line 53, in <module>
from cryptography.hazmat.backends.openssl.x509 import _Certificate
ModuleNotFoundError: No module named 'cryptography.hazmat.backends.openssl.x509'
The problem is with the way how releases are pinned against cryptography
major versions to prevent future breakage.
It should be cryptography [required: >=38.0.0,<39] instead of current cryptography
[required: >=38.0.0,<40].
โ
Reply to this email directly, view it on GitHub
<#1178>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBBAA27DAVBJHG52LVDWQRORFANCNFSM6AAAAAATP5KJDM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
sbernatsky commented
My fault. Saw pyopenssl.py
and decided it is in pyopenssl library. After updating urllib3
to the recent version all is fine.
Please close this issue.
alex commented
Glad you found a resolution.
fredmanre commented
Better for now is:
pip install pyopenssl==22.1.0
works fine!
quvonchbek-dev commented
@fredmanre thank you!