Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
bpo-46659: Deprecate locale.getdefaultlocale()#31206
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The locale.getdefaultlocale() function is deprecated and will beremoved in Python 3.13. Use locale.setlocale(),locale.getpreferredencoding(False) and locale.getlocale() functionsinstead.
Locale is too difficult to me, so I can not say LGTM. |
vstinner commentedFeb 11, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The function is convenient until you fall into a case where it doesn't work as expected. It's similar to mixing Python 2 str and unicode types. It works in most cases, until someone enters a name with a single non-ASCII character, and then suddently everything fall apart. |
Uh oh!
There was an error while loading.Please reload this page.
The locale.getdefaultlocale() function is deprecated and will be removed in
Python 3.13. Use locale.setlocale(),
locale.getpreferredencoding(False) and locale.getlocale() functions
instead.
https://bugs.python.org/issue46659