Description:
I receive the following error with Python 3.12:
```
File "/usr/lib/python3/dist-packages/mysql/connector/__init__.py", line 173, in connect
return MySQLConnection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/mysql/connector/connection.py", line 102, in __init__
self.connect(**kwargs)
File "/usr/lib/python3/dist-packages/mysql/connector/abstracts.py", line 735, in connect
self._open_connection()
File "/usr/lib/python3/dist-packages/mysql/connector/connection.py", line 250, in _open_connection
self._do_auth(self._user, self._password,
File "/usr/lib/python3/dist-packages/mysql/connector/connection.py", line 155, in _do_auth
self._socket.switch_to_ssl(ssl_options.get('ca'),
File "/usr/lib/python3/dist-packages/mysql/connector/network.py", line 427, in switch_to_ssl
self.sock = ssl.wrap_socket(
^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'
```
This is due to Python 3.12 having removed the ssl.wrap_socket() function (see
https://docs.python.org/3.12/whatsnew/3.12.html#ssl).
How to repeat:
Just use the Python version of the connector with Python 3.12+. The affected code is still present in version 9.0.0 and thus still fails with the same error.
Description: I receive the following error with Python 3.12: ``` File "/usr/lib/python3/dist-packages/mysql/connector/__init__.py", line 173, in connect return MySQLConnection(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mysql/connector/connection.py", line 102, in __init__ self.connect(**kwargs) File "/usr/lib/python3/dist-packages/mysql/connector/abstracts.py", line 735, in connect self._open_connection() File "/usr/lib/python3/dist-packages/mysql/connector/connection.py", line 250, in _open_connection self._do_auth(self._user, self._password, File "/usr/lib/python3/dist-packages/mysql/connector/connection.py", line 155, in _do_auth self._socket.switch_to_ssl(ssl_options.get('ca'), File "/usr/lib/python3/dist-packages/mysql/connector/network.py", line 427, in switch_to_ssl self.sock = ssl.wrap_socket( ^^^^^^^^^^^^^^^ AttributeError: module 'ssl' has no attribute 'wrap_socket' ``` This is due to Python 3.12 having removed the ssl.wrap_socket() function (see https://docs.python.org/3.12/whatsnew/3.12.html#ssl). How to repeat: Just use the Python version of the connector with Python 3.12+. The affected code is still present in version 9.0.0 and thus still fails with the same error.