Skip to content

Release 1.16.0

Choose a tag to compare

@AngusHsu AngusHsu released this 11 Oct 15:45
b327bba

Added

  • CRI cédula de identidad (#329): add the 9-digit Costa Rica
    identity card number P-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-digit 0P-TTTT-AAAA form is
    not accepted.

  • DOM cédula de identidad y electoral (#330): add the
    11-digit Dominican Republic identity and electoral card number NNN-NNNNNNN-C with 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 number CYYMMDDGGSSSSV (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 NNNNNN or printed SS SS NNNNNN with 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_format now 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.md documents both, and that masks are the preferred layouts
    the class accepts, not necessarily every layout it accepts.
  • Packaging (#484): the wheel no longer installs the
    repository's top-level tools package or the <prefix>/version/VERSION data file; it now ships only the
    idnumbers package. 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, and aliases is now typed Iterable[str]; resolve_country(),
    and so get_country() and get_validator(), no longer raises for a str subclass that overrides isascii() 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 its package_name argument, which it used to ignore, and raises ValueError when the
    package defines none. The default idnumbers.nationalid output is unchanged.
  • Unified API (#499): validate() and parse_id_info() no
    longer raise when the country's repr() 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. The ValidationResult
    and ParseSuccess docs say that a result with parsed data isn't hashable.

Documentation

  • Add a local rendered API href checker and hermetic regressions for complete parenthesized URLs, fragments and
    explicit-target continuations (#463).

  • Document the explicit re-export form for country modules and the pinned coverage version in AGENTS.md
    (#487).