We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When calling locale.getencoding() while _locale.getencoding() is not available, it shows looking-recursive deprecation warnings.
locale.getencoding()
_locale.getencoding()
../Lib/locale.py:657: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
This is happening because python version locale.getencoding() is calling locale.getdefaultlocale() https://github.com/python/cpython/blob/v3.12.0a5/Lib/locale.py#L642
locale.getdefaultlocale()
and locale.getdefaultlocale warns regardless where the call came from
locale.getdefaultlocale
https://github.com/python/cpython/blob/v3.12.0a5/Lib/locale.py#L544-L547
The text was updated successfully, but these errors were encountered:
gh-103085: Fix python locale.getencoding not to emit deprecation warn…
21e9de3
…ing (gh-103086)
pythongh-103085: Fix python locale.getencoding not to emit deprecatio…
65efc81
…n warning (pythongh-103086)
No branches or pull requests
Bug report
When calling
locale.getencoding()
while_locale.getencoding()
is not available, it shows looking-recursive deprecation warnings.This is happening because python version
locale.getencoding()
is callinglocale.getdefaultlocale()
https://github.com/python/cpython/blob/v3.12.0a5/Lib/locale.py#L642and
locale.getdefaultlocale
warns regardless where the call came fromhttps://github.com/python/cpython/blob/v3.12.0a5/Lib/locale.py#L544-L547
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: