-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Remove locale.resetlocale() function in Python 3.13 #104783
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
Comments
locale.getencoding() now uses sys.getfilesystemencoding() if _locale.getencoding() is missing.
Remove locale.getdefaultlocale() and locale.resetlocale() functions. locale.getencoding() now uses sys.getfilesystemencoding() if _locale.getencoding() is missing.
Remove locale.getdefaultlocale() and locale.resetlocale() functions. locale.getencoding() now uses sys.getfilesystemencoding() if _locale.getencoding() is missing.
@methane asked me to keep locale.getdefaultlocale(): #104784 (comment) |
Ok, let's start with removing locale.resetlocale(). The locale.getdefaultlocale() function can stay a little bit longer thanks to @methane :-) |
The locale.getencoding() function now uses sys.getfilesystemencoding() if _locale.getencoding() is missing, instead of calling locale.getdefaultlocale().
The locale.getencoding() function now uses sys.getfilesystemencoding() if _locale.getencoding() is missing, instead of calling locale.getdefaultlocale().
locale.getlocale() always calls sys.getfilesystemencoding(), instead of calling it only once.
https://docs.python.org/3.13/library/locale.html#locale.getdefaultlocale says:
@vstinner We need to change that "3.13". Do you have an idea how much longer it can stay? Shall we bump it a release or two? Or delete the planned removal version? |
You should ask @methane who was against removing it. |
My gut feeling is +2 years. |
Remove locale.getdefaultlocale() and locale.resetlocale() functions deprecated in Python 3.11: see issue #90817 for the rationale and the deprecation.
Linked PRs
The text was updated successfully, but these errors were encountered: