FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104783: locale.getlocale() calls sys.getfilesystemencoding() by vstinner · Pull Request #105401 · python/cpython · GitHub

/ cpython Public

gh-104783: locale.getlocale() calls sys.getfilesystemencoding() - #105401

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:locale_getencoding_call
Jun 6, 2023
Merged

gh-104783: locale.getlocale() calls sys.getfilesystemencoding()#105401
vstinner merged 1 commit into
python:mainfrom
vstinner:locale_getencoding_call

Conversation

vstinner commented Jun 6, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

locale.getlocale() always calls sys.getfilesystemencoding(), instead of calling it only once.

locale.getlocale() always calls sys.getfilesystemencoding(), instead
of calling it only once.

vstinner commented Jun 6, 2023

Copy link
Copy Markdown
Member Author

@methane: I added _encoding variable to be able to calle locale.getencoding() during Python finalization, when modules attributes are set to None. But maybe it's not needed. By the way, Python tries to keep sys attributes as long as posible. So I wrote this PR to change it :-)

vstinner enabled auto-merge (squash) June 6, 2023 18:07
vstinner merged commit 221d703 into python:main Jun 6, 2023
vstinner deleted the locale_getencoding_call branch June 14, 2023 15:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL