]> 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:48 +0000 (13:55 -0400)
commitfeeb76a80a1d9e5712e93b07ccdd2f9a301b058c
tree62e4cc0e257dd0ac2f006b794a982c9bf50f7f68
parent528d86a7c65477e89da1a1e4e7ffba1afb3f6e94
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
(cherry picked from commit b3b8d88d1e4cec04c2dceb9c374631e9b692ba58)
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