Skip to content
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

Vendor Update - stdout and stderr of shell should be decoded with system encoding #4932

Merged

Conversation

doloopwhile
Copy link

stdout.decode() and stderr.decode() were called with 'utf-8'.

However, when $LANG is not xx_XX.UTF-8 (e.x. ja_JP.EUCJP),
lsb_release and the shell can outputs "non utf-8" bytes (then, pip aborts).

@pfmoore
Copy link
Member

pfmoore commented Dec 21, 2017

This is a change to a vendored library - we don't normally patch vendored libraries, but wait for a fix to be released in the library and re-vendor. Could you submit your PR to the distro project, please?

@pradyunsg
Copy link
Member

FTR python-distro/distro#203

@doloopwhile doloopwhile reopened this Dec 25, 2017
@doloopwhile doloopwhile force-pushed the bugfix/4917-decoding-stdout-of-shell branch from ec8aaa4 to 4fc7b4c Compare December 25, 2017 02:01
@doloopwhile
Copy link
Author

I added new version of distro and did "git push -f".

Would you review it ?

@pradyunsg
Copy link
Member

Hi @doloopwhile!

The way to update a vendored dependency is to update src/pip/_vendor/vendor.txt and then run invoke vendoring.update, create/update a news fragment as needed and commit all the changes.

You seem to be missing an update to vendor.txt.

Fixed UnicodeDecodeError on Linux which system encoding is not UTF-8.
@doloopwhile
Copy link
Author

@pradyunsg
I did vendoring again with invoke vendoring.update. Thanks.

@doloopwhile doloopwhile force-pushed the bugfix/4917-decoding-stdout-of-shell branch from 4fc7b4c to 39b4f3b Compare December 26, 2017 01:27
news/4932.bugfix Outdated
@@ -0,0 +1 @@
Fixed UnicodeDecodeError on Linux which system encoding is not UTF-8.
Copy link
Member

Choose a reason for hiding this comment

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

This newsfile is not needed. You can just drop this.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. I will remove it.

@pradyunsg pradyunsg added skip news Does not need a NEWS file entry (eg: trivial changes) project: vendored dependency Related to a vendored dependency labels Jan 20, 2018
@pradyunsg pradyunsg changed the title Stdout and stderr of shell should be decoded with system encoding Vendor Update - stdout and stderr of shell should be decoded with system encoding Jan 20, 2018
@pradyunsg
Copy link
Member

This PR looks good to me barring a tiny removal of a single news file. =)

@pradyunsg pradyunsg added type: enhancement Improvements to functionality type: maintenance Related to Development and Maintenance Processes labels Jan 20, 2018
@doloopwhile
Copy link
Author

I removed unnecessary news file.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

Assuming travis approves, this looks good to me.

@pradyunsg pradyunsg mentioned this pull request Mar 1, 2018
@pradyunsg pradyunsg added this to the 10.0 milestone Mar 1, 2018
@pfmoore pfmoore merged commit 01a555e into pypa:master Mar 1, 2018
@doloopwhile doloopwhile deleted the bugfix/4917-decoding-stdout-of-shell branch October 23, 2018 05:34
@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation project: vendored dependency Related to a vendored dependency skip news Does not need a NEWS file entry (eg: trivial changes) type: enhancement Improvements to functionality type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants