Changelog
All notable changes to the utf8-locale project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
1.0.4 - 2025-01-18
Fixes
- Point to the Ringlet homepage instead of the GitLab repo as appropriate
- Correct the project name in the "Contact" section of the documentation
- Python implementation:
- assorted fixes suggested by Ruff
- bump the required hatchling version to support Python 3.13+ and the PEP 639 license specification
- Rust implementation:
- assorted fixes suggested by Clippy
Additions
- Python implementation:
- tentatively declare Python 3.14 as supported
- uncomment the "Changes" URL in
pyproject.toml
- Test suite:
- let
tests/full.shhonor theTOX_STAGESenvironment variable so that an alternative one, e.g. one that usesuv, may be used
- let
Other changes
- Python implementation:
- switch to a PEP 639 license specification
- Rust implementation:
- use
//comments for the SPDX copyright and license tags - allow
thiserror2.x - use
serde_deriveexplicitly - reorganize the source files, push all Rust-related files into
the
rust/subdirectory, and the source files torust/src/ - switch from
getoptstoclapfor theu8loctool
- use
- Test suite:
- use
@docsas a separate Tox stages tag - use reuse 4.x and switch from
.reuse/dep5toREUSE.toml - vendor-import vetox 0.2.1
- Ruff:
- use Ruff 0.9.2
- reorganize the Ruff configuration: move some settings to
the
pyproject.tomlfile and the rest toruff-base.toml - use concise output even in preview mode
- Nix:
- drop Python 3.8 from all the Python tests, it is no longer present in nixpkgs/unstable
- drop Python 3.9 from the Tox test, nixpkgs/unstsable no longer support that
- run the pytest and vetox tests on Python 3.14, too
- make sure the tests are run with the correct version of Python
- use
1.0.3 - 2024-02-28
Fixes
- Manual page:
- fix the formatting of the
--featureslong option
- fix the formatting of the
- Python implementation:
- fixes suggested by Ruff:
- sort the
__all__exported symbols list - use a set for tests using the
inoperator - add a forgotten
fprefix to an f-string - add some trailing commas in complex function calls
- sort the
- fixes suggested by Ruff:
Additions
- Start some MkDocs-based documentation
- Python implementation:
- declare Python 3.12 and (tentatively) 3.13 as supported
- Test suite:
- Nix:
- add the
python-vetoxexpression and therun-vetox.shhelper
- add the
- Nix:
Other changes
- C implementation:
- bump the minimum CMake version to 3.16.0
- Python implementation:
- switch to the Ruff source code formatter
- use dataclasses instead of named tuples
- minor refactoring of the type-checking imports
- Test suite:
- add the temporary test directories to the
.gitignorefile - move the
cleanpy.shtool from thenix/directory to thetests/one tests/full.sh:- use
tox-stagesinstead oftox-delayfor the Tox-based tests - use our
cleanpy.shtool to clean more Python-related files
- use
- Python:
- run the
ruff,reuse, andformattests before themypyanddocsones - use
tox.minversion, nottox.min_version, to allow Tox 3.x to bootstrap 4.x - break some Tox environment requirements into separate files
- include pytest 8.x in the allowed versions
- Ruff:
- use a single
ruffTox environment with a pinned Ruff version - gather the Ruff configuration files in the common
python/config/ruff/directory - test with Ruff 0.2.2 in preview mode, adapt some overrides
- use a single
- run the
- Rust:
- add more
clippyoverrides, synced with Rust 1.74
- add more
- Nix:
python-tox: drop thetomlidependency, thetoxpackage was fixed- only run Tox on Python 3.9 through 3.11
- use
gitMinimalinstead ofgitfor thereuseTox test
- add the temporary test directories to the
1.0.1 - 2023-06-29
Fixes
- Python:
- do not pass the
python_versionoption to mypy - correctly annotate a test function that returns a
mock.patch()object - many minor changes suggested by Ruff
- do not pass the
- Rust:
- a couple of minor changes suggested by Clippy
Additions
- Add a Nix expression to only run the Python unit tests using
pytest - Add two shell helpers for running the Nix expressions with several versions of Python
- Python:
- add a Ruff Tox test environment
- add Tox environment tags for the
tox-stagestool - add a manually-invoked
pyupgradeTox test environment
Other changes
- Convert this changelog to the "Keep a Changelog" format.
- Drop the years from my copyright notices.
- Switch to SPDX copyright and license tags and add a "reuse" Tox environment for validating the SPDX tags
- Python:
- drop Python 3.7 support
- add the
ruffandruff-allTox testing environments, test with Ruff 0.0.275 - drop the
pep8andpylintTox testing environments, Ruff does most of that - order the Tox environment list a bit more logically
- adapt the
tox.inifile format for Tox 4.x - use black 23.x and mypy 1.x with no changes
- use Pytest's own data-driven testing functions instead of the
ddtlibrary - switch to
hatchlingfor the PEP 517 build - use Ruff's isort implementation
- move the mypy configuration to the
pyproject.tomlfile - use
functools.lru_cache()in the test suite
- Rust:
- use variables inline in
format!()strings, declare MSRV 1.58 - silence clippy's complaints about using blanket restrictions and using the question mark operator
- use variables inline in
1.0.0 - 2022-10-30
Incompatible changes
- Rust:
- the
get_preferred_languages()function now accepts a reference to the environment variables, since it does not need to modify them - mark the public enums and structs as non-exhaustive
- all functions now return errors instead of exiting the program
- use our own error type instead of returning
Box<dyn error>
- the
New features
- Add a Nix expression for running the Python tests in a clean environment
- Rust:
- allow hashmaps to be constructed with different hashers
- keep the
Cargo.lockfile under version control
Fixes
- C:
- use
regerror()more robustly; thanks, John Scott - when freeing a list, free the correct pointer
- add a missed
free()in an error handling case - allow C++ programs to use the
utf8_locale.hheader file - do not use reserved identifiers as an include guard
- use
- Python:
- specify both lower and upper version constraints for the libraries used in the test environments
- Rust:
- actually run the preferred language test with real data, not with an empty array
Other changes
- Python:
- use pylint 2.14, drop some message overrides
- type annotations: use the standard
dict,list, etc, types instead of thetypinggenerics - list Python 3.10 and 3.11 as supported versions
- drop the
flake8+hackingTox test environment
- Rust:
- mark some functions as
const,inline, andmust-use - document the errors returned by the library functions
- use the
thiserrorandanyhowlibraries for error handling instead of thequick-errorone - use the
once_celllibrary for initializing static values instead of thelazy_staticone - fix many minor issues reported by the
clippytool and add therun-clippytool to run some stringent checks - refactor the internal
build_weights()function to avoid integer arithmetic; when we mean to use the number of items in a hashmap, use the number of items in the hashmap - explicitly override some of the
clippydiagnostics
- mark some functions as
0.3.0 - 2022-02-20
Incompatible changes
- Rust:
- the individual functions are no longer visible by default in the top-level namespace; the new builder interface is preferred
New features
- Add a new object-oriented interface for the Python and Rust
implementations: configure a
Utf8DetectorLanguagesDetectobject, and invoke their.detect()method instead of invoking the individual functions. - Add a C implementation: a
libutf8_localelibrary and au8locexecutable built using CMake. - Add the
tests/full.shdevelopment helper tool that rebuilds all the implementations and runs their respective tests. - Python:
- move the languages test data to the
tests/data.jsondefinitions, too - add an object-oriented builder interface
- move the languages test data to the
- Rust:
- add an object-oriented builder interface
- add the beginnings of a unit test suite using the JSON test definitions
Fixes
- Fix the functional test's behavior if the u8loc executable does not advertise the query-preferred feature.
Other changes
- Add
*.c,*.h, and*.1file definitions to the EditorConfig file. - Python:
- drop the
b0suffix from theblacktool versioned dependencies; theblacktool is no longer in beta since version 22
- drop the
- Rust:
- use the
lazy_staticcrate to only compile regular expressions once - import struct names directly as a more idiomatic style
- use the
0.2.0 - 2022-02-01
New features
- The "C" language is now appended to the end of the list returned by
the
get_preferred_languages()function if it is not already there! - Add the
get_utf8_vars()function returning an environment-like dictionary that only contains the variables that need to be set, i.e.LC_ALLandLANGUAGE. - Add the
u8loccommand-line tool to the Python implementation. - Add the
u8loc.1manual page. - Add the
tests/functional.pyfunctional testing tool. - Add an EditorConfig definitions file.
- Add a Rust implementation.
Other changes
- Bring the Python build infrastructure somewhat more up to date.
- Require Python 3.7 for dataclasses support.
- Push the Python implementation into a
python/source subdirectory.
0.1.1 - 2021-04-05
New features
- Add a manifest file for the source distribution.
Fixes
- Ignore locales with weird names instead of erroring out.
- Ignore the type of a
subprocess.check_output()mock in the test suite.
0.1.0 - 2021-01-04
Started
- First public release.