-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Default locale logical compatibility with Python 3.12 #1054
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1054 +/- ##
==========================================
- Coverage 99.27% 99.26% -0.02%
==========================================
Files 135 135
Lines 17600 17602 +2
Branches 3592 3593 +1
==========================================
Hits 17472 17472
- Misses 119 120 +1
- Partials 9 10 +1 ☔ View full report in Codecov by Sentry. |
Ties to #1102; my only concern with this PR is it over-rides Python versions less than 3.12 which the test works fine for. I think this PR may be a okay work-around for now but i'm not sure if fixing the language to Consider this tweak but even then i still don't accept my own answer 🙂 # Based on patch already here...
import sys
if lang == 'C' and sys.version_info[0] == 3 and sys.version_info[1] == 12:
# Alternatively sys.version_info[1] >=3
lang = 'en_US' # I still question the hard-coded assignment to english. There are discussions in the following spots that state that
I wonder if it would be better to just support
That would handle the ambiguity i can't seem to let go of 😉 . In the past, when building on different operating systems in different countries (Pre Python 3.12) when Edit: Revisiting the code and the change made, i realize i'm already choosing |
Thank you @liushuyu for this PR, and sorry i took so long to merge it in. I do appreciate it! Thank you for also letting me have my "old man yelling at cloud" moment! 🙂 |
Sorry for the late reply.
No problem! I could understand the underlying Python change must be a headache for the project.
Just add to this, I think the new Python behavior is more "correct": many other languages use |
Description:
Related issue (if applicable): N/A
This pull request fixes the behavioural differences on Python 3.12, where if the default locale is unspecified, the new Python defaults to
C.UTF-8
instead ofen_US.UTF-8
on Unix systems.Checklist
flake8
)Testing
Anyone can help test this source code as follows: