Skip to content

gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' #135347

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

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jun 10, 2025

@Yhg1s Yhg1s enabled auto-merge (squash) June 10, 2025 13:14
Copy link
Member

@malemburg malemburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@malemburg
Copy link
Member

Note that we have had the 'c.utf8' mapping for a long time in the past (Python 3.4 - 3.11). It was changed to map to 'C.UTF-8' in Python 3.12.

With the PR, the mapping will be removed again, but the normalization will still go from 'c.utf8' to 'C.UTF-8', just via a different code path.

For consistency and to make this a bug fix, rather than a new feature, it's probably better to keep the 'c.utf8' -> 'C.UTF-8' mapping in the table and enforce this, but I'll leave that for you to decide.

@malemburg
Copy link
Member

See #14925 for some additional context.

@Yhg1s Yhg1s merged commit 0f866cb into python:main Jun 10, 2025
49 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 10, 2025
…-8' (pythonGH-135347)

(cherry picked from commit 0f866cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 10, 2025

GH-135349 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 10, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 10, 2025
…-8' (pythonGH-135347)

(cherry picked from commit 0f866cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 10, 2025

GH-135350 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 10, 2025
serhiy-storchaka added a commit that referenced this pull request Jun 11, 2025
…F-8' (GH-135347) (GH-135349)

(cherry picked from commit 0f866cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jun 11, 2025
…F-8' (GH-135347) (GH-135350)

(cherry picked from commit 0f866cb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot iOS ARM64 Simulator 3.14 (tier-3) has failed when building commit 30494cc.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1722/builds/246) and take a look at the build logs.
  4. Check if the failure is related to this commit (30494cc) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1722/builds/246

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 14, done.        
remote: Counting objects:  11% (1/9)        
remote: Counting objects:  22% (2/9)        
remote: Counting objects:  33% (3/9)        
remote: Counting objects:  44% (4/9)        
remote: Counting objects:  55% (5/9)        
remote: Counting objects:  66% (6/9)        
remote: Counting objects:  77% (7/9)        
remote: Counting objects:  88% (8/9)        
remote: Counting objects: 100% (9/9)        
remote: Counting objects: 100% (9/9), done.        
remote: Compressing objects:  12% (1/8)        
remote: Compressing objects:  25% (2/8)        
remote: Compressing objects:  37% (3/8)        
remote: Compressing objects:  50% (4/8)        
remote: Compressing objects:  62% (5/8)        
remote: Compressing objects:  75% (6/8)        
remote: Compressing objects:  87% (7/8)        
remote: Compressing objects: 100% (8/8)        
remote: Compressing objects: 100% (8/8), done.        
remote: Total 14 (delta 1), reused 1 (delta 1), pack-reused 5 (from 2)        
From https://github.com/python/cpython
 * branch                    3.14       -> FETCH_HEAD
Note: switching to '30494cc72c2b5e0c1d9df5f944fadbb82595497d'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 30494cc72c2 [3.14] gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (GH-135347) (GH-135349)
Switched to and reset branch '3.14'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

make: *** [testios] Terminated: 15

@Yhg1s
Copy link
Member

Yhg1s commented Jun 11, 2025

@malemburg auto-merge went through before anyone could address your comment, I think. Do you think it's worth making that change in a follow-up?

@malemburg
Copy link
Member

@malemburg auto-merge went through before anyone could address your comment, I think. Do you think it's worth making that change in a follow-up?

It would be good to readd the mapping to the table, since this will get added back in the next run of the Tools/i18n/makelocalealias.py tool anyway and could then cause questions popping up, since Sergey added the comment to the table saying that the mapping was removed.

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.

4 participants