pip: pip does not reinstall an already installed package from a different direct url requirement
What’s the problem this feature will solve?
Assume packaging
has been installed with pip install "packaging @ git+https://github.com/pypa/packaging@20.0"
.
Then try to install from the 20.1 tag: pip install "packaging @ git+https://github.com/pypa/packaging@20.1"
. The second install does nothing, saying the requirement is already satisfied.
Describe the solution you’d like
The second install should reinstall with the requested requirement.
Alternative Solutions
- Document this as a limitation of direct URL references support in PIP.
Additional context
This requires PEP 610 to implement. This may or may not influence the ongoing reflection about the resolver.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (17 by maintainers)
https://github.com/pypa/pip/issues/536 has an extensive discussion over whether we should force reinstall explicitly specified locations. Apparently I was ambivalent when it was discussed then, as well 🙂
@pfmoore my impression (trying to factor out my own use cases) is that the common use case for direct URLs is very similar to pinning a version. For instance when pointing to a VCS tag, a VCS commit id, an archive with a version number in it, or a local directory, the user says “I want this specific version and not any other one”.
So this could mean direct URL requirements could be handled the same as
==
version specifiers wrt conflict handling.#3212 looks similar (but instead of deliberately wrong name this provides no name at all). #6457 also observe the non-upgrades when
#egg=
is specified.