Skip to content

bpo-34604: Fix possible mojibake in pwd.getpwnam and grp.getgrnam#9098

Merged
vstinner merged 2 commits into
python:masterfrom
william-gr:grp-pwd-mojibake
Sep 7, 2018
Merged

bpo-34604: Fix possible mojibake in pwd.getpwnam and grp.getgrnam#9098
vstinner merged 2 commits into
python:masterfrom
william-gr:grp-pwd-mojibake

Conversation

@william-gr

@william-gr william-gr commented Sep 7, 2018

Copy link
Copy Markdown

@william-gr

Copy link
Copy Markdown
Author

@vstinner here is the follow up PR as discussed in #7081

Please let me know if thats what you were meaning.

Thanks!

@william-gr

william-gr commented Sep 7, 2018

Copy link
Copy Markdown
Author

The build failed probably because I changed pwd.getpwnam signature from arg: unicode to name: unicode, however I am unsure how to fix that. Investigating.

@@ -0,0 +1,2 @@
Fix possible mojibake in `pwd.getpwnam` and `grp.getgrnam`. Patch by William

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would you mind to add "... in the error message." to clarify that it doesn't affect the regular case?

@william-gr

Copy link
Copy Markdown
Author

@vstinner sure, updated.

Thanks

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @william-gr for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @william-gr for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @william-gr and @vstinner, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 28658485a54ad5f9df52ecc12d9046269f1654ec 3.6

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @william-gr and @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 28658485a54ad5f9df52ecc12d9046269f1654ec 3.7

@vstinner

vstinner commented Sep 7, 2018

Copy link
Copy Markdown
Member

@william-gr: it seems like the the bot failed to backport the fix. Would you mind to try to create 3.6 and 3.7 backport pull requests?

@william-gr william-gr deleted the grp-pwd-mojibake branch September 7, 2018 17:30
@bedevere-bot

Copy link
Copy Markdown

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

@bedevere-bot

Copy link
Copy Markdown

GH-9105 is a backport of this pull request to the 3.6 branch.

william-gr pushed a commit to william-gr/cpython that referenced this pull request Sep 8, 2018
…rnam() (pythonGH-9098)

Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit 2865848)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
william-gr pushed a commit to william-gr/cpython that referenced this pull request Sep 8, 2018
…rnam() (pythonGH-9098)

Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit 2865848)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
vstinner pushed a commit that referenced this pull request Sep 9, 2018
…rnam() (GH-9098) (GH-9105)

Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit 2865848)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
vstinner pushed a commit that referenced this pull request Sep 9, 2018
…rnam() (GH-9098) (GH-9104)

Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit 2865848)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
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