bpo-40275: Remove duplicate import of locale module#19761
bpo-40275: Remove duplicate import of locale module#19761vstinner merged 6 commits intopython:masterfrom
Conversation
vstinner
left a comment
There was a problem hiding this comment.
This PR goes somehow against https://bugs.python.org/issue40275 goal. I would prefer to move the top-level "import locale" into skip_if_buggy_ucrt_strfptime().
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
make sense, I updated this PR. |
|
Oh, the gate of macos failed randomly (no generated log file) |
|
It does not help. For the purpose of bpo-40275 the changes should reduce the list of imported modules. |
Maybe we could attempt to make locale import lazy in gettext, or make gettext import lazy in argparse. Or just give up because locale is less heavy than asyncio for example :-) |
I try to make local import lazy in gettext. I don't make gettext import lazy in argparse, because much function will call gettext in argpase(it's looks untidy). |
|
|
||
|
|
||
| import locale | ||
| import os |
There was a problem hiding this comment.
Please write a separated PR for gettext, and keep this PR for test.support.
This reverts commit 58d39a3.
|
https://bugs.python.org/issue40275