MySQL Connector/Python Release Notes
When a connection disabled SSL Mode using
ssl_disabled=True
(or with
ssl-mode='DISABLED'
for X Protocol
connections), specifying other TLS or SSL connection options
caused Connector/Python to throw an error. For example, defining
tls_version
with
ssl_disabled=True
raised such an error. Now,
disabling SSL now means that additional TLS and SSL connection
options are ignored.
(WL #14852)
The Connector/Python C extension now supports FIDO pluggable authentication
(see FIDO Pluggable Authentication), and adds
a new fido_callback
connection option.
(WL #14860)
The version of protobuf
used by the C
extension is updated to version 3.19.4.
(WL #15080)
Removed support for Python 3.6.
On EL7, EL8, and SUSE Linux: A
python3-protobuf
RPM package is not available
for Python 3.8 on these platforms, so the dependency was removed
from the RPM specification; instead this package must be
installed manually with pip install protobuf
or similar.
(WL #14824)
Expanded Kerberos Authentication Protocol support to include Windows clients using the pure Python implementation of Connector/Python. (WL #14665)
Django support now allows a custom class for data type
conversion in the Django backend, typically used to convert
non-default data types. This is implemented as a subclass of
mysql.connector.django.base.DjangoMySQLConverter
.
(WL #14679)
Microsoft Windows:
When using the C extension with prepared=True
,
BIGINT
data was seen as
MYSQL_TYPE_LONG
instead of
MYSQL_TYPE_LONGLONG
, which raised overflow
errors with values greater than 2147483647.
(Bug #96588, Bug #105254, Bug #30203754, Bug #33481203)
Upon connecting to the server, Connector/Python executed a number of
SHOW [SESSION]
VARIABLES
statements to retrieve system variable
values. Such statements involve locking in the server, so they
are now avoided in favor of SELECT
@@
.
(Bug #33861549)var_name
When using the C extension, an expression used as a column without an alias raised a UnicodeDecodeError error. (Bug #33747585)
The deprecated utf8mb3
character set is now
recognized because the utf8
alias shows
utf8mb3
in the Information Schema and
SHOW
statements in MySQL 8.0.28 and later.
For additional information, see
The utf8 Character Set (Deprecated alias for utf8mb3).
(Bug #33729842)
With consume_results=True, the C extension implementation threw an error with some methods such as cmd_refresh(), reset_session() and commit() if there were pending results to fetch. Now, unread results are handled and consumed. (Bug #21528553)
When connecting to MySQL Server versions previous to 5.7.35,
servers failed to execute change_user
commands due to the default collation used by Connector/Python, a problem
which affected connection pooling functionality by raising an
exception when closing a pooled connection. Now Connector/Python reconnects
instead of emitting the exception.
(Bug #104569, Bug #33203161)
Previously, unsuccessful decoding a byte array raised a UnicodeDecodeError error. Now in such the raw bytes or byte array is returned instead.
Thanks to Meik Milevczik for the contribution. (Bug #93065, Bug #28877987)
Added support for Decimal parsing. Thanks to Luke Weber for the patch. (Bug #81571, Bug #23338623)
Added a context manager to open files in the optionfiles module to be closed correctly. Thanks to Vilnis Termanis for the patch. (Bug #81519, Bug #23324748)
Attempts to insert Python ByteArray
data into
binary table columns failed when using the c-extension
implementation of Connector/Python.
(Bug #77822, Bug #21498719)
Added support for NaN in the float to MySQL conversion; it's now set to None. (Bug #74934, Bug #20065830)