pypi / pymysql
pymysql
What changed in pymysql 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
1 breaking1 security4 deprecations1 new APIs and options1 performance1 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpymysql 113 changes
Breaking changes 1
Non-finite decimal query parameters, including NaN, sNaN, and ±Infinity, are rejected.
Security 1
Escapes the procedure name in callproc.
Deprecations 4
The reconnect parameter of Connection.ping() is deprecated.
Connection.set_charset() is deprecated at runtime and emits a warning.
The db parameter is deprecated again.
The passwd parameter is deprecated again.
New APIs and options 1
MySQL protocol exceptions expose SQLSTATE without changing exception formatting.
Performance 1
Optimizes packet reading and parsing.
Behavior and default changes 1
TLS options now implement PREFERRED and REQUIRED SSL mode behavior.
Fixes and other changes 4
Restores the ability to import this function for compatibility with aiomysql.
Fixes an issue in the PyMySQL authentication state machine.
Fixes escaping of negative timedelta values.
The executemany INSERT regex supports MySQL 8 row/column alias syntax.