Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jun 15, 2018

Fix "LC_ALL=C python3.7 -V": fix code parsing command line arguments when
the encoding changes when reading the Python configuration.

Fix pymain_read_conf(): use memset(0) to reset properly cmdline.

https://bugs.python.org/issue33824

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the problem, thanks! The NEWS item is a little unclear, though. Maybe don't use two "when"s?

Fix "LC_ALL=C python3.7 -V": reset properly the command line parser
when the encoding changes after reading the Python configuration.

Fix pymain_read_conf(): use memset(0) to reset properly cmdline.
@vstinner
Copy link
Member Author

I rephrased the NEWS entry.

@vstinner vstinner merged commit 6c5a4b3 into python:master Jun 15, 2018
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@vstinner vstinner deleted the fix_pymain_read_conf branch June 15, 2018 22:06
@bedevere-bot
Copy link

GH-7730 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2018
Fix "LC_ALL=C python3.7 -V": reset properly the command line parser
when the encoding changes after reading the Python configuration.

Fix pymain_read_conf(): use memset(0) to reset properly cmdline.
(cherry picked from commit 6c5a4b3)

Co-authored-by: Victor Stinner <[email protected]>
miss-islington added a commit that referenced this pull request Jun 15, 2018
Fix "LC_ALL=C python3.7 -V": reset properly the command line parser
when the encoding changes after reading the Python configuration.

Fix pymain_read_conf(): use memset(0) to reset properly cmdline.
(cherry picked from commit 6c5a4b3)

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants