-
Notifications
You must be signed in to change notification settings - Fork 332
[Python 3.12] AttributeError: module 'ssl' has no attribute 'wrap_socket' #795
Copy link
Copy link
Closed
Description
Hello, Fedora is rebuilding all Python packages with upcoming Python 3.12. Eventlet fails with AttributeError: module 'ssl' has no attribute 'wrap_socket'. This happens because of a change in Python.
From What's new:
Remove the ssl.wrap_socket() function, deprecated in Python 3.7: instead, create a ssl.SSLContext object and call its ssl.SSLContext.wrap_socket method. Any package that still uses ssl.wrap_socket() is broken and insecure. The function neither sends a SNI TLS extension nor validates server hostname. Code is subject to CWE-295: Improper Certificate Validation. (Contributed by Victor Stinner in gh-94199.)
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/sphinx/config.py", line 350, in eval_config_file
exec(code, namespace)
File "/builddir/build/BUILD/eventlet-0.33.3/doc/conf.py", line 52, in <module>
import eventlet
File "/builddir/build/BUILD/eventlet-0.33.3/eventlet/__init__.py", line 17, in <module>
from eventlet import convenience
File "/builddir/build/BUILD/eventlet-0.33.3/eventlet/convenience.py", line 7, in <module>
from eventlet.green import socket
File "/builddir/build/BUILD/eventlet-0.33.3/eventlet/green/socket.py", line 21, in <module>
from eventlet.support import greendns
File "/builddir/build/BUILD/eventlet-0.33.3/eventlet/support/greendns.py", line 45, in <module>
from eventlet.green import ssl
File "/builddir/build/BUILD/eventlet-0.33.3/eventlet/green/ssl.py", line 25, in <module>
_original_wrap_socket = __ssl.wrap_socket
^^^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'
Reactions are currently unavailable