unstale

pypi / pymysql

pymysql

What changed in pymysql 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

9 breaking2 security6 deprecations4 new APIs and options1 performance1 behavior and defaults6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

pymysql 129 changes

Breaking changes 9

  • Fractional seconds now require a decimal point.

    1.2.4release notes

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

    1.2.0release notes

  • connect() now uses keyword-only arguments, so callers must pass arguments by keyword.

    1.0.0release notes

  • escape_dict was removed from the pymysql module but remains available in pymysql.converters.

    1.0.0release notes

  • escape_sequence was removed from the pymysql module but remains available in pymysql.converters.

    1.0.0release notes

  • escape_string was removed from the pymysql module but remains available in pymysql.converters.

    1.0.0release notes

  • MySQL 5.5 and MariaDB 5.5 are no longer officially supported, though they may still work.

    1.0.0release notes

  • The old_password authentication method is no longer supported.

    1.0.0release notes

  • Python 2.7 and 3.5 are no longer supported.

    1.0.0release notes

Security 2

  • When ssl_verify_identity is set, the server certificate is checked.

    1.2.4release notes

  • Escapes the procedure name in callproc.

    1.1.3release notes

Deprecations 6

  • 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

  • The db keyword argument is deprecated; use database instead.

    1.0.0release notes

  • The passwd keyword argument is deprecated; use password instead.

    1.0.0release notes

New APIs and options 4

  • Adds two password-change error codes to the error constants.

    1.2.4release notes

  • MySQL protocol exceptions expose SQLSTATE without changing exception formatting.

    1.2.0release notes

  • Connections now support the context manager API; __exit__ closes the connection.

    1.0.0release notes

  • MySQL Connector/Python compatible TLS options were added.

    1.0.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 6

  • Adds a missing return statement in caching_sha2_password.

    1.2.4release notes

  • Fixes handling of escaped percent signs in executemany postfixes.

    1.2.4release notes

  • 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