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

Revert #7969 and fix VCS stdout/stderr capture #9331

Merged
merged 10 commits into from
Jan 9, 2021

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Dec 21, 2020

Fixes #8876
Supersedes #9234 and #9327
Reverts #7969
Better fix for #7545 and #7968
Reopens #7841 (which pip can't fix as it is git output) and #7711 (which is not entirely trivial and can be handled in another PR)

@sbidoul sbidoul changed the title 7969 revert sbi Revert #7969 and fix VCS stdout/stderr capture Dec 21, 2020
@sbidoul
Copy link
Member Author

sbidoul commented Dec 21, 2020

Wondering why these tests fail so early. They work on my machine™️.

proc.stdin.close()
if not stdout_only:
assert proc.stdin
proc.stdin.close()
Copy link
Member

Choose a reason for hiding this comment

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

Why not

if proc.stdin:
    proc.stdin.close()

Copy link
Member Author

Choose a reason for hiding this comment

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

@uranusjr I did something a little bit different in the last version. I don't quite understand why we need to pass a PIPE to stdin while we don't use it, but I don't dare to change it, and I decided to keep passing one in both modes.

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 the intent is to disallow all stdin from subprocesses. Without it, the subprocess’s stdin would be inherited from pip’s, i.e. subprocesses are able to show prompts etc.

Copy link
Member

Choose a reason for hiding this comment

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

More fun is that it waits in CI for prompts, instead dof outright failing as well.

@sbidoul sbidoul force-pushed the 7969-revert-sbi branch 4 times, most recently from d227635 to de11340 Compare December 21, 2020 17:19
@sbidoul sbidoul marked this pull request as ready for review December 21, 2020 17:31
@sbidoul sbidoul added this to the 20.3.4 milestone Dec 21, 2020
@Mikuana
Copy link

Mikuana commented Dec 21, 2020

Confirmed this solution appears to fix #8876

@sbidoul
Copy link
Member Author

sbidoul commented Dec 26, 2020

@pradyunsg how do you want to proceed here ? The python 2 cleanup is creating conflicts but this PR has to go in 20.3.4.

BTW wasn't there a bot warning about merge conflicts ?

@pradyunsg
Copy link
Member

I broke the bot, and then my laptop so, now, I can't fix the bot. :)

@pradyunsg
Copy link
Member

@sbidoul If you (1) rebase this on top of 20.3.3, (2) create a merge commit against the current master branch, fixing conflicts and (3) force-push that.

Then, it'll be possible to have an "easy backport" of this PR -- since it's based off 20.3.3 and hence won't be difficult to cherry-pick for release, and would also be a part of 21.0, since, well, it'll be merged into master. :)

@sbidoul
Copy link
Member Author

sbidoul commented Dec 27, 2020

@pradyunsg ok, I did that and created the merge commit by merging the master branch into my branch.

@sbidoul sbidoul removed this from the 20.3.4 milestone Jan 9, 2021
@sbidoul sbidoul added this to the 21.0 milestone Jan 9, 2021
@sbidoul
Copy link
Member Author

sbidoul commented Jan 9, 2021

I assign this to 21.0, as the backport to 20.3.4 is tracked via #8876

@pradyunsg pradyunsg merged commit 9b83654 into pypa:master Jan 9, 2021
@sbidoul sbidoul deleted the 7969-revert-sbi branch January 10, 2021 11:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip install [git repo] hangs on clone step on Windows with large repositories
4 participants