Skip to content

Conversation

@graingert
Copy link
Contributor

@graingert graingert commented Jan 4, 2023

@graingert graingert force-pushed the pass-encoding-kwarg-in-platform branch from 1ac7321 to e18da85 Compare January 4, 2023 14:41
@graingert graingert requested a review from methane January 4, 2023 14:43
@graingert graingert changed the title pass encoding='locale' kwarg in lib/platform.py gh-100750: pass encoding='locale' kwarg in lib/platform.py Jan 4, 2023
@graingert graingert marked this pull request as ready for review January 4, 2023 14:54
Lib/platform.py Outdated
['uname', '-p'],
stderr=subprocess.DEVNULL,
text=True,
encoding="locale",
Copy link
Member

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.

@graingert graingert changed the title gh-100750: pass encoding='locale' kwarg in lib/platform.py gh-100750: pass encoding kwarg in lib/platform.py Jan 5, 2023
@graingert graingert requested a review from methane January 5, 2023 16:41
@ambv ambv added the needs backport to 3.11 only security fixes label Jan 20, 2023
@ambv ambv merged commit 6b3993c into python:main Jan 20, 2023
@miss-islington
Copy link
Contributor

Thanks @graingert for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 20, 2023
)

(cherry picked from commit 6b3993c)

Co-authored-by: Thomas Grainger <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Shantanu <[email protected]>
@bedevere-bot
Copy link

GH-101207 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jan 20, 2023
@graingert graingert deleted the pass-encoding-kwarg-in-platform branch January 20, 2023 22:43
miss-islington added a commit that referenced this pull request Jan 21, 2023
(cherry picked from commit 6b3993c)

Co-authored-by: Thomas Grainger <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Shantanu <[email protected]>
@jaraco jaraco added the needs backport to 3.10 only security fixes label Feb 7, 2023
@miss-islington
Copy link
Contributor

Thanks @graingert for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 7, 2023
)

(cherry picked from commit 6b3993c)

Co-authored-by: Thomas Grainger <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Shantanu <[email protected]>
@bedevere-bot
Copy link

GH-101644 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Feb 7, 2023
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.

7 participants