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

Check if pip broke the dependency graph and warn the user #3787

Closed
pradyunsg opened this issue Jun 9, 2016 · 21 comments
Closed

Check if pip broke the dependency graph and warn the user #3787

pradyunsg opened this issue Jun 9, 2016 · 21 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@pradyunsg
Copy link
Member

pradyunsg commented Jun 9, 2016

Until #988 comes along, it seems to me that adding some functionality to pip to let the user know that it broke the dependency graph looks like a good idea to me.

I would like to discuss the merits and demerits of this.

PS: And maybe follow up with implementation if I have spare time after #3786.
PPS: I didn't check for duplicates before opening this.

@xavfernandez
Copy link
Member

Cf #3750

@rbtcollins
Copy link

This is also a dupe - and even with 988 in place would be needed. I don't have the number handy, but basically conflicts with existing top level distributions with common dependencies.

@pradyunsg
Copy link
Member Author

This won't need #988 since this can be implemented without a dependency resolver.

It's just that pip could use some way to check if some package (a dependency) doesn't fit the requirements/constraints on the version set by another (parent package).

I would consider this an issue that would be resolved by #3750. If it's not merged and closed, this stays open to as a marker that this has to be done.

@rbtcollins
Copy link

I am confused; pips existing behaviour (without --ignore-dependencies) is to check everything recursively from the named distributions within the limits of first-seen-specifier [which is what #988 would address] - if you're proposing that we change pip to not do that check, then thats a huge problem. If you're proposing that it needs to do that check - it already does.

The issue I thought this was about is when something not in the recursively reachable set disagrees with a version change caused by some operation.

Perhaps you could provide an example scenario where this bug would apply, so that I can understand what you're suggesting?

@rbtcollins
Copy link

See #2687

@pradyunsg
Copy link
Member Author

The scenario in #2687 is indeed the scenario I care about.

It's obviously wrong. pip still does it. pip won't stop doing the wrong thing without a dependency resolver. It is possible to detect this though, independently, and point it out to the user who may then manually resolve it. Any form it takes, like a separate command or a warning at install time, I'm fine with that.

@rbtcollins
Copy link

So I think then that this should be considered a dupe of #2687 ?

@pradyunsg
Copy link
Member Author

pradyunsg commented Jun 25, 2016

No. #2687 is to stop breaking the environment. I wish to see a way in pip to warn the user that pip has broken the environment.

@rbtcollins
Copy link

That doesn't make sense to me.

@pradyunsg
Copy link
Member Author

pradyunsg commented Jun 25, 2016

That doesn't make sense to me.

I want to let the user check and detect in a scenario like that in OP of #2687 that the dependency of some package is broken, using pip.

@rbtcollins
Copy link

But why? Surely its better to not be broken in the first place?

@pradyunsg
Copy link
Member Author

Well... It has been concluded in prior discussions (#59, at pypa-dev) that the behaviour in #2687 is not fixable until #988 lands, which may will take a fair bit of time, and this behaviour is the safer-middle-ground in the mean time.

@pradyunsg
Copy link
Member Author

How about running check after every run of install? That way, pip can print for the user what all it's changed.

Off-topic: When's the next pip release?

@pradyunsg
Copy link
Member Author

With pip check in place, I'm not sure what I think about this myself.

@dstufft
Copy link
Member

dstufft commented Mar 30, 2017

I'm going to close this, I think that #988 is a better solution to this and we have pip check now for people who want to do this manually.

@dstufft dstufft closed this as completed Mar 30, 2017
@waprin
Copy link

waprin commented May 15, 2017

@dstufft it seems to me that pip install -r requirements.txt should run pip check automatically and print the warning.. Seems like #988 is actually trying to resolve the underlying issue whereas just running pip check automatically for all those who don't realize it exists would be an improvement. Thoughts?

@mhsmith
Copy link

mhsmith commented Jun 9, 2017

#988 is a better solution, but it doesn't look as if it's currently possible. Duplicates of #988 are being reported about once a month, and for every affected user who makes a report there are probably 50 who don't.

For how many more years will pip keep silently producing broken installations? How many more thousands of hours of people's time will be wasted? Just put in the automatic check until you can solve it properly.

@dstufft
Copy link
Member

dstufft commented Jun 9, 2017

There is a GSoC student who is working on #988 this year.

@mhsmith
Copy link

mhsmith commented Jun 9, 2017

I'm glad to hear that, but that doesn't mean it'll actually get fixed.

@mhsmith
Copy link

mhsmith commented May 4, 2018

For future reference: the check-after-install feature was done in #5000 and was released in pip 10.0.0.

@lock
Copy link

lock bot commented Jun 2, 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 Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 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

6 participants