mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-104783: locale.getlocale() calls sys.getfilesystemencoding() (#105401)
locale.getlocale() always calls sys.getfilesystemencoding(), instead of calling it only once.
This commit is contained in:
parent
2b8e6e5712
commit
221d703498
1 changed files with 1 additions and 2 deletions
|
@ -618,9 +618,8 @@ try:
|
|||
except ImportError:
|
||||
# When _locale.getencoding() is missing, locale.getencoding() uses the
|
||||
# Python filesystem encoding.
|
||||
_encoding = sys.getfilesystemencoding()
|
||||
def getencoding():
|
||||
return _encoding
|
||||
return sys.getfilesystemencoding()
|
||||
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue