You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
1.18.0 (2026-10-12)
Changed
Failure reasons (#506): METADATA.regexp of 14
computed-checksum classes (AUS Medicare Number and Tax File Number, BGR Unified Identification Code, CHL National
Unique Role Number, COL Unique Personal ID, GRC Tax Identity Number, HKG Hong Kong Identity Card Number, IRN National
ID Number, ISR Identity Number, JPN My Number, LVA Personal Code, TUR National ID Number, UKR Legal Entity ID Number
and Taxpayer ID Number) now names the check character(s) with a checksum group, so failure_reason() reports checksum_mismatch instead of validation_failed for a definite check-character mismatch. The unified validate() and parse_id_info() report it too for the nine classes that are their country's primary ID (CHL, COL,
HKG, IRN, ISR, JPN, LVA, TUR and the UKR Taxpayer ID Number); they select only the primary ID, so the other five
(AUS Medicare Number and Tax File Number, BGR Unified Identification Code, GRC Tax Identity Number and UKR Legal
Entity ID Number) are reached through failure_reason(id_class, number). Accepted and rejected inputs, parsed
results and checksum() values are unchanged. The Australian tax file number's checksum() returns a remainder
rather than a check digit, so a remainder equal to the last digit keeps the generic reason.
Other fixes
Parity sync script (#564): construct failed-rollback reports
before bytecode cleanup and test that a failed restore after KeyboardInterrupt or SystemExit reports both errors
and the tracked paths with exit code 2; successful rollback still propagates the original interrupt.
Registry tests (#566): exercise every slow key lookup path
in the concurrency helper and check the portable non-iterable alias error fragment without changing registry behavior.
Release tests (#559): cover rejection of a bare
mismatched-version dist-info entry and an absolute package path in wheels; release guard behavior is unchanged.
Documentation
Contributor guide (#551): AGENTS.md documents the
120-column line-length convention and its exceptions (whole URLs on their own line, Markdown tables and generated
guides); the 1.17.0 DOM entry now uses python-stdnum's own wording.
Contributor guide (#561): specify that the re-export
exemption applies to from .util import ..., not from . import util; only the rule's wording changes.
Display format (#557): clarify that capital-letter field
names are outside {...} and D usually denotes a day, with widths and meanings defined per class; formats and
validity are unchanged.
EGY national ID number (#555): distinguish the Node
sister project's reported Luhn failure from its unproven weighted mod-11 hypothesis in the docstring; the research
note is not an official source, and validity is unchanged.
Mask vocabulary (#570): explain Sweden's retained +
exception to slot-count matching, with a synthetic layout example; preferred input-mask patterns still use literal -, and formatting behavior is unchanged.
Unified API tests (#568): document the hostile
representation helpers with class docstrings; test behavior is unchanged.