]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
revise argument to mysqlclient/pymysql ping
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Oct 2023 22:54:23 +0000 (18:54 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Oct 2023 13:28:58 +0000 (09:28 -0400)
commite15323ccf6de6b3820c02c8c947b876ab399aa14
tree9c5a5a56d1ff52d6f86f63ced4602d591a2b4a74
parent3ac3f074266f85694de8b2a73d2f93968554004f
revise argument to mysqlclient/pymysql ping

Repaired a new incompatibility in the MySQL "pre-ping" routine where the
``False`` argument passed to ``connection.ping()``, which is intended to
disable an unwanted "automatic reconnect" feature,  is being deprecated in
MySQL drivers and backends, and is producing warnings for some versions of
MySQL's native client drivers.  It's removed for mysqlclient, whereas for
PyMySQL and drivers based on PyMySQL, the parameter will be deprecated and
removed at some point, so API introspection is used to future proof against
these various stages of removal.

Fixes: #10492
Change-Id: I8a52428c6f93a03b66a605cb0b85cc5924803d6d
references: #10489
(cherry picked from commit 0790c612b3d13761b04b55a5fdd7f6affd852320)
doc/build/changelog/unreleased_14/10492.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/mysqldb.py
lib/sqlalchemy/dialects/mysql/pymysql.py