unstale

pypi / pyotp

pyotp

What changed in pyotp 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-27.

3 breaking1 security2 new APIs and options1 performance6 fixes and other

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

npx @unstale/cli init

@unstale/cli on npm

pyotp 213 changes

Breaking changes 3

Security 1

New APIs and options 2

  • Subclasses can override the minimum secret length.

    2.12.1release notes

  • Adds a TOTP method that verifies and returns the matching timecode.

    2.11.0release notes

Performance 1

Fixes and other changes 6

  • OTP configuration and URI parameters are validated, helping developers catch invalid values.

    2.11.2release notes

  • Respects initial_count=0 when generating an HOTP provisioning URI.

    2.11.0release notes

  • Fixes DST rollbacks and normalizes TOTP timestamp inputs.

    2.11.0release notes

  • The digest function is checked to prevent errors during OTP generation.

    2.10.0release notes

  • Non-standard otpauth parameters are ignored.

    2.10.0release notes

  • Fixes mis-parsing of encoded colons in issuer/account names.

    2.10.0release notes