ssl.wrap_socket() function, deprecated in Python 3.7

Hi,

With Python 3.12. https://docs.python.org/3.12/whatsnew/3.12.html

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.)

results in:

test/test_managesieve.py:14: in <module>
    import managesieve
managesieve.py:24: in <module>
    ssl_wrap_socket = ssl.wrap_socket
E   AttributeError: module 'ssl' has no attribute 'wrap_socket'
______________________ ERROR collecting test/test_res.py _______________________
test/test_res.py:12: in <module>
    from managesieve import Oknobye
managesieve.py:24: in <module>
    ssl_wrap_socket = ssl.wrap_socket
E   AttributeError: module 'ssl' has no attribute 'wrap_socket'
Assignee Loading
Time tracking Loading