Ask a confirm message when upgrade or uninstall a package who depend by other packages.
Closed this issue · 6 comments
as the title say,
should Ask a confirm message when upgrade or uninstall a package who depend by other packages.
eg:
packageA needs packageB < 3.0, packageB current version is 1.0.
when upgrade packageB from 1.0 to 2.0, no need ask a confirm.
when upgrade packageB from 1.0 to 3.0, need ask a confirm, and show the dependence.
when uninstall packageB, need ask a confirm, and show the dependence.
Oh, sorry. I missed the upgrade part. :)
This is really a workaround for #988, which would probably get resolved soon. :)
I'll keep this open for now until someone comes around to this and has time to think about what's been suggested.
Right now pip-review, a project that I contribute to, calls pip install to upgrade all packages with no user interaction. Pip-review is needed because for various reasons (I perceived that such a feature would not be accepted without the dependency resolver), pip cannot automatically upgrade all packages. We have two options here:
- Don't ask for user input or implement an option to suppress all user input during installation
- Implement automatic upgrades of all packages
And now that I think about this some more, there are a lot of automated tools that depend on the no user input behavior of pip install. So this should not be implemented in any case without an option to suppress this (probably a -y
).
This is a suggestion for a possible error flow for #988. Given that there are still a lot of unknowns related to the UX around conflicting dependencies, I think the best approach will be to handle this as a part of the overall changes that will be covered by #988 instead of as a separate issue. Whether to provide an escape hatch for conflicting dependencies, whether it should be interactive, and the need to have a non-interactive option for CI and scripted invocations of pip are all things that will be covered.
I will close this, but definitely keep on the lookout for user feedback requests as we move forward on that implementation!