]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
robustly handle reconnect param across all pymysql variants
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 19 May 2026 13:40:01 +0000 (09:40 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 19 May 2026 17:55:11 +0000 (13:55 -0400)
commitee9c8625bad11f4dedfa2a610914cebdcf55fec7
tree827e56592a103ca35df8a906fa3b1fd100cb5bc6
parentcb3e0ccbe372cb12a103115618c01ac3c1f2c8b7
robustly handle reconnect param across all pymysql variants

Fixed issue in aiomysql and asyncmy dialects that appears as of using
pymysql 1.2.0; the dialects were not properly taking into account logic
that detects the argument signature of pymysql's ``ping()`` method which
was added as part of :ticket:`10492`.

We add a "does ping have reconnect" check for all three DBAPIs
individually.  To suit asyncmy's use of cython we also needed to
adjust vendored getargspec() routines.

Fixes: #13306
Change-Id: Iad90ec6cfe9ee3b99736dd2153264090e7f76be1
doc/build/changelog/unreleased_20/13306.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/aiomysql.py
lib/sqlalchemy/dialects/mysql/asyncmy.py
lib/sqlalchemy/dialects/mysql/pymysql.py
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/langhelpers.py
test/dialect/mysql/test_dialect.py