-
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
New resolver depends on req order in presence of direct URLs? #8249
Comments
There's a resolvelib update that we need to pick up that should fix this, but thanks for the reproducer. If you're interested, the problem is that currently resolvelib gets the matches for the first requirement it sees, and then filters that list for each new requirement. It only asks new requirements for their matches if it backtracks (I think - maybe not even then). That's wrong, and thew new version asks later requirements for any additions to the list as well. (Details are more fiddly, but that's the general idea). |
Yes, resolvelib had some naive assumptions (the provider should be able to get all possible versions of a package when it’s first initialised) that does not work in Python packaging. There has been some changes to the model so the provider can have a say in every dependency discovery round whether it knows more than previously, but I haven’t have the time to update the implementation in pip to use that. Thanks for noticing the problem! I’ll also use this issue to track the related work (IIRC there was not an issue open here for this yet). |
This works with the latest master. 👍 |
Yay! I’ll take the liberty and close this. |
Environment
Description
The new resolver seems to get confused when a regular requirement and a direct URL requirement are both present in the requirement set.
This test case was inspired by the conversation in #8210.
How to Reproduce
Create two packages (pkg1 and pkg2) which both depend on a third one (packaging) one via a regular specifier, and the other via a direct URL.
Create
pkg1/setup.py
:and
pkg2/setup.py
:Then in a fresh vritualenv, run:
So far, so good.
Then in a fresh virtualenv, run:
Expected behaviour
Both should give the same result.
The text was updated successfully, but these errors were encountered: