-
Notifications
You must be signed in to change notification settings - Fork 3k
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
The download command using legacy-resolver fails for --constraint where the constraints are disjoint / a superset. #9283
Comments
Did this ever work prior to 20.3? There is a reason we implemented a new resolver from scratch and try to remove the legacy resolver. This is one of the known issues with it that’s not reallly viable to handle. We are not going to fix issues in the legacy resolver for all the same reasons we implemented a new one. |
I'll optimistically post a fix PR and link here in case you all are willing to accept it. If not, our project will just fork and apply the same PR in order to provide our users a smooth transition to migrate from the legacy-resolver to the 2020-resolver. As it stands, many of those users use --constraint and so otherwise cannot smoothly transition. |
Previously, during dependency resolution for `pip download -d <dir>` or `pip wheel -w <dir>`, distributions downloaded are always saved to <dir>, even for those are only used in backtracking and are not part of the returned requirement set.
Given this and #9271, I feel we should revert the patch and discuss what |
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
This brings in a fix for `pip download --constraint` as well as support for Python 3.10. See: pypa/pip#9283
This brings in a fix for `pip download --constraint` as well as support for Python 3.10. See: pypa/pip#9283
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
Download was not filtering out constraint-only requirements prior to attempting to save them. Add a failing test under `--resolver=legacy` and fix by adding in the filtering. See: pypa@b28e2c4#r45135982 Fixes pypa#9283
Environment
Description
When --constraint is used and the constraints contain requirements not in the transitive closure of a download, the download command fails to filter out
InstallRequirement
s that are constraint-only and thus have have no link resulting in an AssertionError.Expected behavior
No error should occur.
How to Reproduce
Perform a download of a pinned requirement using a constraints file that only contains pinned requirements, one of which is disjoint with the set of transitive requirements of the original download subject requirement. The output demonstrates all this.
Output
The text was updated successfully, but these errors were encountered: