mirror of https://github.com/python/cpython
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
|
@ -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…
Reference in New Issue