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

Remove locale.resetlocale() function in Python 3.13 #104783

Closed
vstinner opened this issue May 23, 2023 · 6 comments
Closed

Remove locale.resetlocale() function in Python 3.13 #104783

vstinner opened this issue May 23, 2023 · 6 comments

Comments

@vstinner
Copy link
Member

vstinner commented May 23, 2023

Remove locale.getdefaultlocale() and locale.resetlocale() functions deprecated in Python 3.11: see issue #90817 for the rationale and the deprecation.

Linked PRs

vstinner pushed a commit to vstinner/cpython that referenced this issue May 23, 2023
locale.getencoding() now uses sys.getfilesystemencoding() if
_locale.getencoding() is missing.
vstinner pushed a commit to vstinner/cpython that referenced this issue May 23, 2023
Remove locale.getdefaultlocale() and locale.resetlocale() functions.

locale.getencoding() now uses sys.getfilesystemencoding() if
_locale.getencoding() is missing.
vstinner pushed a commit to vstinner/cpython that referenced this issue May 23, 2023
Remove locale.getdefaultlocale() and locale.resetlocale() functions.

locale.getencoding() now uses sys.getfilesystemencoding() if
_locale.getencoding() is missing.
@vstinner vstinner changed the title Remove locale.getdefaultlocale() and locale.resetlocale() Remove locale.resetlocale() function in Python 3.13 Jun 6, 2023
@vstinner
Copy link
Member Author

vstinner commented Jun 6, 2023

@methane asked me to keep locale.getdefaultlocale(): #104784 (comment)

@vstinner
Copy link
Member Author

vstinner commented Jun 6, 2023

Ok, let's start with removing locale.resetlocale(). The locale.getdefaultlocale() function can stay a little bit longer thanks to @methane :-)

@vstinner vstinner closed this as completed Jun 6, 2023
vstinner added a commit to vstinner/cpython that referenced this issue Jun 6, 2023
The locale.getencoding() function now uses
sys.getfilesystemencoding() if _locale.getencoding() is missing,
instead of calling locale.getdefaultlocale().
vstinner added a commit that referenced this issue Jun 6, 2023
The locale.getencoding() function now uses
sys.getfilesystemencoding() if _locale.getencoding() is missing,
instead of calling locale.getdefaultlocale().
vstinner added a commit to vstinner/cpython that referenced this issue Jun 6, 2023
locale.getlocale() always calls sys.getfilesystemencoding(), instead
of calling it only once.
vstinner added a commit that referenced this issue Jun 6, 2023
)

locale.getlocale() always calls sys.getfilesystemencoding(), instead
of calling it only once.
@hugovk
Copy link
Member

hugovk commented Oct 20, 2023

Ok, let's start with removing locale.resetlocale(). The locale.getdefaultlocale() function can stay a little bit longer thanks to @methane :-)

https://docs.python.org/3.13/library/locale.html#locale.getdefaultlocale says:

Deprecated since version 3.11, removed in version 3.13.

@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?

@vstinner
Copy link
Member Author

You should ask @methane who was against removing it.

@methane
Copy link
Member

methane commented Oct 22, 2023

My gut feeling is +2 years.
When Python 3.15 is released, Python 3.10 become EOL.

@hugovk
Copy link
Member

hugovk commented Oct 22, 2023

3.15 sounds reasonable.

Please see issue #111187 and PR #111188 to bump removal to 3.15.

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

No branches or pull requests

3 participants