Unicodedata backport updated to the latest Unicode version.
Maintained. Last release 2 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and security practices.
pip install unicodedata2unicodedata2
unicodedata backport/updates. Currently supports Unicode 18.0.0.
Requires Python 3.9 or newer.
The versions of this package match Unicode versions, so unicodedata2==13.0.0 is data from Unicode 13.0.0.
Pre-compiled wheel packages are available on PyPI and can be installed via pip.
Testing
We run the tests using tox. This can be installed as usual with pip install tox,
or with pip install --group dev (pip 25.1 or newer) to pick it up from
pyproject.toml.
Tox and CI download the version-matched Unicode normalization data before
running tests. Download failures stop the run. Before running pytest directly,
run python tests/download_test_data.py once. The downloaded files are not
included in source distributions or wheels.
Without any options, tox will run the tests against all of the library's
target Python versions. Any missing versions will be skipped.
To run tests against a specific python version you can use the -e option followed by
a tox environment name. E.g. -e py39 will run tests against Python 3.9.
For more info, check tox's documentation.
Changelog
18.0.0
- Upgrade to Unicode 18.0.0
- Backport algorithmic character names from CPython, including Tangut, Jurchen, and Small Seal.
- Backport CPython's faster canonical ordering, also fixing Unicode normalization on PyPy.
- Require Python 3.9 or newer; drop Python 3.8 support.
- Fix historical numeric values in the Unicode 3.2 database.
- Make Hangul syllable lookup case-insensitive.
- Return algorithmic Hangul syllable mappings from decomposition().
- Always return an exact str from normalize(), including for str subclasses.