Repository navigation
Release 1.16.0
Added
-
CRI cédula de identidad (#329): add the 9-digit Costa Rica
identity card numberP-TTTT-AAAA(province 1-9, tomo, asiento), with optional hyphens and no check digit;
parse()returns the province, its name, the tomo and the asiento. python-stdnum's 10-digit0P-TTTT-AAAAform is
not accepted. -
DOM cédula de identidad y electoral (#330): add the
11-digit Dominican Republic identity and electoral card numberNNN-NNNNNNN-Cwith optional hyphens and a Luhn
check digit;parse()returns the series, the sequence and the check digit. python-stdnum's list of issued numbers
that fail Luhn is not accepted (#517). -
ECU cédula de identidad (#331): add the 10-digit Ecuador
identity card number: province 01-24 or 30 (registered abroad), a third digit 0-6 (4 or 5 for province 30) and a
mod-10 check digit, with an optional hyphen before the check digit;parse()returns the province, the sequence
number and the check digit. -
EGY national ID number (#332): add the 14-digit Egypt
national numberCYYMMDDGGSSSSV(Executive Regulations of the Civil Status Law, Art. 3): century 2 or 3 and a real
birth date are validated; the governorate code, the serial and the final digit are not (no official code table or
check-digit algorithm is published).parse()returns the birth date, the governorate code, the serial and the
final digit. -
GTM Código Único de Identificación / DPI (#333): add
structure-only validation of compact 13-digit CUI numbers (department 01-22, municipality 01-99).parse()
preserves the eight-digit correlative, unverified check digit, department and municipality as strings. No
checksum or per-department municipality table is enforced; whitespace and separators are rejected. -
RUS internal passport (#334): add structure-only
validation of a four-digit series and six-digit number, rejecting all-zero fields by maintainer policy.
Accept only compact ASCII digits,SSSS NNNNNNor printedSS SS NNNNNNwith single ASCII spaces;
parse()preserves series and number as strings. No checksum or issuance/authenticity check is performed. -
SAU national ID / Iqama (#335): add structure-only
validation of the 10-digit Saudi Arabia national ID and resident identity (Iqama) number: the first digit is 1
(citizen) or 2 (resident), per the NPHIES Patient profile.parse()returns the citizenship. No check digit is
verified, because the Luhn rule is unconfirmed by any authoritative source; only compact ASCII digits are
accepted.
Changed
- Release workflows (#468): update the version-bump and
documentation actions to Node.js 24 runtimes and pin Ubuntu 24.04, preserving the bot PR and docs deployment
contracts and the existing release authentication routes. - Metadata (#501): the official names of COL (NUIP), CYP
(ΑΦΤ) and IRN (شماره ملی) are corrected against official sources.display_formatnow uses[...]for an optional
part and{...}for exactly one of the listed characters, and keeps parentheses as printed characters (BGR, HKG,
IRL, AUS Medicare and FIN).docs/nationalid/METADATA.mddocuments both, and thatmasksare the preferred layouts
the class accepts, not necessarily every layout it accepts. - Packaging (#484): the wheel no longer installs the
repository's top-leveltoolspackage or the<prefix>/version/VERSIONdata file; it now ships only the
idnumberspackage. The source distribution is unchanged, and the library API is unaffected. The release check
rejects a wheel with any other top-level entry.
Other fixes
- Tests (#503): treat an empty Hypothesis storage override
as unset, keeping ancillary caches in temporary storage while preserving the original environment value. - Registry (#496):
register()no longer drops aliases
passed as a one-shot iterable such as a generator, andaliasesis now typedIterable[str];resolve_country(),
and soget_country()andget_validator(), no longer raises for astrsubclass that overridesisascii()or
upper()or for an object that fakes its__class__;register()rejects a blank name and gives a missing
alpha-2 code its own error message. - Scan tool (#501):
tools.scan_ids.collect_ids()lists only
the ID classes defined in itspackage_nameargument, which it used to ignore, and raisesValueErrorwhen the
package defines none. The defaultidnumbers.nationalidoutput is unchanged. - Unified API (#499):
validate()andparse_id_info()no
longer raise when the country'srepr()raises or when the exception of a validator or parser can't be turned into
text, and the unsupported-country message shortens a long country value to 80 characters. TheValidationResult
andParseSuccessdocs say that a result with parsed data isn't hashable.