gh-155009: Fix argparse test on non-UTF-8 locales like Raspbian - #155227
Open
hugovk wants to merge 1 commit into
Open
gh-155009: Fix argparse test on non-UTF-8 locales like Raspbian#155227hugovk wants to merge 1 commit into
hugovk wants to merge 1 commit into
Conversation
Member
Author
|
!buildbot ARM64 Raspbian |
|
🤖 New build scheduled with the buildbot fleet by @hugovk for commit be68e22 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F155227%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
encukou
reviewed
Aug 5, 2026
| self.make_script(self.dirname, basename) | ||
| # The filesystem encoding may be non-UTF-8, | ||
| # but the runner runs in UTF-8 mode | ||
| modulename = os.fsencode(modulename).decode("utf-8", "surrogateescape") |
Member
There was a problem hiding this comment.
Does it run in UTF-8 mode? Should this be locale.getpreferredencoding(), to handle PYTHONUTF8=0 ?
But it's in test-only code, so this shouldn't block the release.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for #155199 (comment)
argparsereportspython -mfor programmatic module-as-main execution #155009