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

pip install should automatically perform pip check #6200

Closed
cbrnr opened this issue Jan 25, 2019 · 10 comments
Closed

pip install should automatically perform pip check #6200

cbrnr opened this issue Jan 25, 2019 · 10 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@cbrnr
Copy link

cbrnr commented Jan 25, 2019

I really like the new pip check feature. However, whenever I install/upgrade a new package, I need to manually perform this step to see if all requirements are still met. It would be really nice if pip could perform this check prior to installing/upgrading packages and issue a warning if there are broken requirements. Maybe the user could then be prompted whether or not to continue or abort the installation.

@pradyunsg
Copy link
Member

It does. :)

It's limited to checking only the packages that require some of the installed packages. Essentially, it only checks the subset that's directly connected to the modified versions of packages.

@cbrnr
Copy link
Author

cbrnr commented Jan 26, 2019

Really? I have pyflakes 2.0.0 and flake8 installed. Then I wanted to update to pyflakes 2.1.0 using pip install -U pyflakes, which pip did but then pip check complained that flake8 requires pyflakes <2.1.0...

@pradyunsg
Copy link
Member

Hmm... pip install -U, should have printed a warning.

Could you try that again and post the instructions for reproducing this?

@cbrnr
Copy link
Author

cbrnr commented Jan 26, 2019

You're right, I didn't notice the warning. I think there should be a prompt so that the user can't ignore the warning - it just installs anyway and I don't get a chance to abort.

@pradyunsg
Copy link
Member

Yea, that's intentional.

There's no past precedent for pip install halting for input and in fact, doing it for just dependency issues, when really pip should do better dependency resolution isn't going to help anyone.

@cjerdonek
Copy link
Member

FYI, there is precedent for pip asking for input during installs. It's not behavior I like, but it's there.

You can find some by searching the code base for ask_path_exists(). Here is one example during VCS editable installs:

response = ask_path_exists('What to do? %s' % prompt[0], prompt[1])

@cbrnr
Copy link
Author

cbrnr commented Jan 27, 2019

So are you saying that in my example pip shouldn't perform the update then?

@pradyunsg
Copy link
Member

pradyunsg commented Jan 29, 2019

So are you saying that in my example pip shouldn't perform the update then?

It should, as per current behavior. It shouldn't though -- #988. (edit: clarified)

You'll want to check out #5000 and #5196.

@cbrnr
Copy link
Author

cbrnr commented Jan 30, 2019

OK, thanks for clarifying.

@lock
Copy link

lock bot commented May 29, 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 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 29, 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
Projects
None yet
Development

No branches or pull requests

3 participants