# What changed in pymysql

> 13 changes in pymysql 1 from its official release notes, upgrade guides and advisories: 1 breaking, 4 deprecations, 1 security, 1 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/pypi/pymysql/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## pymysql 1

### Breaking changes

- Non-finite decimal query parameters, including NaN, sNaN, and ±Infinity, are rejected. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)

### Security

- Escapes the procedure name in callproc. (1.1.3) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.1.3)

### Deprecations

- The reconnect parameter of Connection.ping() is deprecated. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)
- Connection.set_charset() is deprecated at runtime and emits a warning. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)
- The db parameter is deprecated again. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)
- The passwd parameter is deprecated again. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)

### New APIs and options

- MySQL protocol exceptions expose SQLSTATE without changing exception formatting. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)

### Performance

- Optimizes packet reading and parsing. (1.2.1) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.1)

### Behavior and default changes

- TLS options now implement PREFERRED and REQUIRED SSL mode behavior. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)

### Fixes and other changes

- Restores the ability to import this function for compatibility with aiomysql. (1.2.2) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.2)
- Fixes an issue in the PyMySQL authentication state machine. (1.2.1) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.1)
- Fixes escaping of negative timedelta values. (1.2.1) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.1)
- The executemany INSERT regex supports MySQL 8 row/column alias syntax. (1.2.0) — [release notes](https://github.com/PyMySQL/PyMySQL/releases/tag/v1.2.0)
