pypi / idna
idna
What changed in idna 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
5 breaking2 security1 deprecations2 new APIs and options1 performance1 behavior and defaults2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initidna 314 changes
Breaking changes 5
Reject A-labels that are not the canonical Punycode encoding of their U-label.
The deprecated transitional argument is now completely ignored.
Label helper functions and the incremental codec consistently raise IDNAError for empty labels and non-ASCII bytes.
CONTEXTJ violations now raise IDNAError instead of InvalidCodepointContext.
Restore the std3_rules option; direct callers now again have input containing non-LDH ASCII characters rejected, and STD3 rules are enabled by default.
Security 2
The incremental codec better enforces the domain length limit.
Internationalized Domain Names in Applications (IDNA): Specially crafted inputs to idna.encode() can bypass CVE-2024-3651 fix
Deprecations 1
The deprecated transitional argument is now completely ignored and gives a deprecation warning.
New APIs and options 2
Expose the Unicode version used by the generated tables.
Add code, text, codepoint, and position attributes so callers can identify the failed rule and offending character without parsing the exception message.
Performance 1
UTS #46 mapping is faster, particularly for ASCII-only domains.
Behavior and default changes 1
The version command now shows the Unicode version of the generated tables.
Fixes and other changes 2
Adds support for Python 3.15.
Unicode data is updated to Unicode 18.0.0.