Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the locale alias mapping #129646

Closed
serhiy-storchaka opened this issue Feb 4, 2025 · 2 comments
Closed

Update the locale alias mapping #129646

serhiy-storchaka opened this issue Feb 4, 2025 · 2 comments
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes stdlib Python modules in the Lib dir

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Feb 4, 2025

locale_alias mapping in the locale module is manually generated from the locale.aliases file from X.org distribution and the supported locales list from glibc. As these files are changed, we need to update locale_alias from time to time. Last time it was updated in 3.8. There are not much changes since then, but they are.

Other issue is that "univ" and "universal" map to non-existing locale "en_US.utf" (should be "en_US.UTF-8"), as was noticed in #122877. locale.aliases no longer contains such aliases, it only contains aliases "univ.utf8" and "universal.utf8@ucs4".

Linked PRs

@serhiy-storchaka serhiy-storchaka added 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes stdlib Python modules in the Lib dir labels Feb 4, 2025
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Feb 4, 2025
malemburg pushed a commit that referenced this issue Feb 4, 2025
* gh-129646: Update the locale alias mapping

* Add a NEWS file.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 4, 2025
* pythongh-129646: Update the locale alias mapping

* Add a NEWS file.
(cherry picked from commit f61afca)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this issue Feb 4, 2025
)

(cherry picked from commit f61afca)

Co-authored-by: Serhiy Storchaka <[email protected]>
@serhiy-storchaka
Copy link
Member Author

I backported this to 3.13 which is still in early stage of its life, but I am not so sure about 3.12. Perhaps it is not worth a hassle.

@malemburg
Copy link
Member

I don't think it's worth it. Besides: Depending on you see this, adding new mappings and changing existing ones can be regarded as a new feature and not a bug fix.

@serhiy-storchaka serhiy-storchaka removed the 3.12 bugs and security fixes label Feb 4, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Locale issues Feb 4, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Feb 7, 2025
* pythongh-129646: Update the locale alias mapping

* Add a NEWS file.
cmaloney pushed a commit to cmaloney/cpython that referenced this issue Feb 8, 2025
* pythongh-129646: Update the locale alias mapping

* Add a NEWS file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes stdlib Python modules in the Lib dir
Projects
Status: Done
Development

No branches or pull requests

2 participants