-
Fixed the typing annotation of the
close()
function ofMySQLConnectionAbstract
and also madedisconnect()
an alias ofclose()
, to improve clarity and consistency of the connection API.Thanks, Parul Gupta, for the contribution. (Bug #117347, Bug #37541353)
The deprecated cursors of the buffered raw type and all the named tuple types have now been removed from Connector/Python. Using them now results in a
ValueError
orTypeError
depending on the invalid arguments passed. (WL #16327)-
The following methods of the Connector/Python API have been deprecated, with some of them replaced by new property methods:
MySQLConnection.get_server_version() replaced by the server_version property.
MySQLConnection.get_server_info() replaced by the server_info property.
MySQLConnection.is_connected() replaced by the connected property.
MySQLConnection.set_client_flags() replaced by the client_flags property.
MySQLConnection.set_unicode() replaced by the use_unicode property.
MySQLConnection.set_converter_class() replaced by the converter_class property.
MySQLCursor.fetchwarnings() replaced by the warnings property.
MySQLCursor.getlastrowid() replaced by the already existing lastrowid property.
MySQLCursor.stored_results() is simply deprecated for now.
(WL #16752)
When executing a
LOAD DATA LOCAL INFILE
statement, Connector/Python now validates that the name of the client data file requested by the server (as part of the server's response) matches exactly the file name in the original statement sent by the client, or an error is raised. (Bug #37418436)A memory leak occurred when using prepared statements with the Connector/Python C extension. (Bug #37399636)
When the C extension was used, exceptions with prepared statements caused a
MySQLInterfaceError
to be thrown. With this fix, the proper type of exception is thrown for each type of errors. (Bug #37275524)It was not possible to escape the string "%s" used in a query when it should not be treated as a parameter marker. This patch adds proper regular expression checks to escape the "%s" parameter marker when "%%s" is used in the query. (Bug #117087, Bug #37447394)
The source distribution of Connector/Python on the PyPI repository was missing the
setup.py
file, which has now been added back to make the package buildable with pip. (Bug #113396, Bug #36098290)An unformatted error message was emitted for an unreachable host when a connection could not be established using a Unix socket. (Bug #113396, Bug #36098290)