Langcodes

Latest version: v3.4.0

Safety actively analyzes 623807 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

3.3

- Updated to CLDR v40.

- Updated the IANA subtag registry to version 2021-08-06.

- Bug fix: recognize script codes that appear in the IANA registry even if
they're missing from CLDR for some reason. 'cu-Cyrs' is valid, for example.

- Switched the build system from `setuptools` to `poetry`.

3.3.0

3.2.1

Corrected cases where the parser accepted ill-formed language tags:

- All subtags must be made of between 1 and 8 alphanumeric ASCII characters
- Tags with two extension 'singletons' in a row (`en-a-b-ccc`) should be rejected

3.2.0

- Added the top-level function `tag_is_valid(tag)`, for determining if a string
is a valid language tag without having to parse it first.

- Added the top-level function `closest_supported_match(desired, supported)`,
which is similar to `closest_match` but with a simpler return value. It
returns the language tag of the closest match, or None if no match is close
enough.

- Bug fix: a lot of well-formed but invalid language codes appeared to be
valid, such as 'aaj' or 'en-Latnx', because the regex could match a prefix of
a subtag. The validity regex is now required to match completely.

- Bug fixes that address some edge cases of validity:

- A language tag that is entirely private use, like 'x-private', is valid
- A language tag that uses the same extension twice, like 'en-a-bbb-a-ccc', is invalid
- A language tag that uses the same variant twice, like 'de-1901-1901', is invalid
- A language tag with two extlangs, like 'sgn-ase-bfi', is invalid

- Updated dependencies so they are compatible with Python 3.10.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.