unstale

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 init

@unstale/cli 0.2.1 on npm

pymysql 113 changes

Breaking changes 1

  • Non-finite decimal query parameters, including NaN, sNaN, and ±Infinity, are rejected.

    1.2.0release notes

Security 1

Deprecations 4

  • The reconnect parameter of Connection.ping() is deprecated.

    1.2.0release notes

  • Connection.set_charset() is deprecated at runtime and emits a warning.

    1.2.0release notes

  • The db parameter is deprecated again.

    1.2.0release notes

  • The passwd parameter is deprecated again.

    1.2.0release notes

New APIs and options 1

  • MySQL protocol exceptions expose SQLSTATE without changing exception formatting.

    1.2.0release notes

Performance 1

Behavior and default changes 1

  • TLS options now implement PREFERRED and REQUIRED SSL mode behavior.

    1.2.0release notes

Fixes and other changes 4

  • Restores the ability to import this function for compatibility with aiomysql.

    1.2.2release notes

  • Fixes an issue in the PyMySQL authentication state machine.

    1.2.1release notes

  • Fixes escaping of negative timedelta values.

    1.2.1release notes

  • The executemany INSERT regex supports MySQL 8 row/column alias syntax.

    1.2.0release notes