-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-100750: pass encoding kwarg in lib/platform.py #100751
Conversation
graingert
commented
Jan 4, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: PEP 597: platform from_subprocess missing encoding kwarg #100750
1ac7321
to
e18da85
Compare
Lib/platform.py
Outdated
@@ -824,6 +825,7 @@ def from_subprocess(): | |||
['uname', '-p'], | |||
stderr=subprocess.DEVNULL, | |||
text=True, | |||
encoding="locale", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think uname
output is not localized.
https://github.com/coreutils/coreutils/blob/8d4768c94d0fa9de545a6e1c370f9a6fae4cb3a7/src/uname.c#L314-L371
So we can use "utf-8" or "latin1" here.
Misc/NEWS.d/next/Library/2023-01-04-14-42-59.gh-issue-100750.iFJs5Y.rst
Outdated
Show resolved
Hide resolved
Thanks @graingert for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
) (cherry picked from commit 6b3993c) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
GH-101207 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 6b3993c) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Thanks @graingert for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
) (cherry picked from commit 6b3993c) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
GH-101644 is a backport of this pull request to the 3.10 branch. |