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

Fix #1219: Prevent subprocess stdout and stderr from cluttering pip's stdout. #6339

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

cjerdonek
Copy link
Member

@cjerdonek cjerdonek commented Mar 15, 2019

This PR prevents stdout and stderr from subprocesses from polluting pip's stdout by making it go to pip's stderr instead.

This helps with various things, including:

It also addresses this code comment inside call_subprocess() made in PR #3505:

# The obvious thing that affects output is the show_stdout=
# kwarg. show_stdout=True means, let the subprocess write directly to our
# stdout. It is almost never used
# inside pip (and should not be used in new code without a very good
# reason); as of 2016-02-22 it is only used in a few places inside the VCS
# wrapper code. Ideally we should get rid of it entirely, because it
# creates a lot of complexity here for a rarely used feature.

The PR uses the comprehensive call_subprocess() tests I added as part of PR #6312 to make sure the code changes are working as desired.

@cjerdonek cjerdonek force-pushed the vcs-subprocess-logging branch 6 times, most recently from 660fc0d to 21031bf Compare March 15, 2019 12:17
@cjerdonek cjerdonek changed the title Prevent subprocess stdout and stderr from cluttering pip's stdout. [WIP] Prevent subprocess stdout and stderr from cluttering pip's stdout. Mar 15, 2019
@cjerdonek cjerdonek force-pushed the vcs-subprocess-logging branch 2 times, most recently from da7fd75 to f541f6b Compare March 15, 2019 12:57
@cjerdonek cjerdonek added the C: logging Information Logging label Mar 20, 2019
@cjerdonek cjerdonek added this to the Improve User Experience milestone Mar 20, 2019
@cjerdonek cjerdonek force-pushed the vcs-subprocess-logging branch 5 times, most recently from ec4d089 to f801cd5 Compare March 25, 2019 06:49
@cjerdonek cjerdonek changed the title [WIP] Prevent subprocess stdout and stderr from cluttering pip's stdout. Fix #1219: Prevent subprocess stdout and stderr from cluttering pip's stdout. Mar 25, 2019
@cjerdonek
Copy link
Member Author

This is now ready.

@cjerdonek cjerdonek added C: vcs pip's interaction with version control systems like git, svn and bzr type: bugfix labels Mar 25, 2019
@cjerdonek
Copy link
Member Author

I just noticed that this PR will also address this pip-tools issue as a side-effect: jazzband/pip-tools#654

@cjerdonek cjerdonek merged commit 68bc0e0 into pypa:master Apr 3, 2019
@cjerdonek cjerdonek deleted the vcs-subprocess-logging branch April 3, 2019 21:36
@awaisdar001
Copy link

Unfortunately, This issue is still reproducible on pip 19.1.1. Has this change is released?

@cjerdonek
Copy link
Member Author

cjerdonek commented May 13, 2019

@awaisdar001 Can you provide more details? Like, what is the command invocation, and what is the stderr and stdout that you're seeing?

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 12, 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 C: logging Information Logging C: vcs pip's interaction with version control systems like git, svn and bzr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants