Skip to content

Resolve deprecated short unit identifiers through their replacements - #1408

Open
jdotc1 wants to merge 1 commit into
python-babel:masterfrom
jdotc1:fix/deprecated-short-unit-aliases-20261027
Open

jdotc1 wants to merge 1 commit into
python-babel:masterfrom
jdotc1:fix/deprecated-short-unit-aliases-20261027

Conversation

@jdotc1

@jdotc1 jdotc1 commented Oct 27, 2026

Copy link
Copy Markdown

The deprecated short unit identifiers permillion, portion, and portion-per-1e9 emit a deprecation warning but then fail lookup. The exact-name lookup uses the replacement ID, while the suffix lookup still uses the deprecated name.

Continue suffix matching with the replacement ID. Tests cover all six deprecated IDs through both format_unit and get_unit_name, check that each lookup emits exactly one warning, and compare results with the replacement IDs.

Validation: 30 unit tests passed; 40 tests passed when including the unit-module doctests. Ruff lint/format and git diff --check pass. The three short-alias cases fail against the original source.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant