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

Non-universal resolver should ignore requires-python upper bound #5045

Closed
konstin opened this issue Jul 14, 2024 · 5 comments · Fixed by #6882
Closed

Non-universal resolver should ignore requires-python upper bound #5045

konstin opened this issue Jul 14, 2024 · 5 comments · Fixed by #6882
Assignees
Labels
bug Something isn't working

Comments

@konstin
Copy link
Member

konstin commented Jul 14, 2024

Without universal resolution, we fail to resolve colabfold 1.5.5 on python 3.12, since it only supports python 3.9 to 3.11:

$ echo "colabfold==1.5.5" | uv pip compile -p 3.12 -
    × No solution found when resolving dependencies:
    ╰─▶ Because the requested Python version (3.12.0) does not satisfy Python>=3.9,<3.12 and colabfold==1.5.5 depends on
        Python>=3.9,<3.12, we can conclude that colabfold==1.5.5 cannot be used.
        And because you require colabfold==1.5.5, we can conclude that the requirements are unsatisfiable.

We generally ignore upper version bounds (#4022), the universal resolver also resolves succesfully:

$ echo "colabfold==1.5.5" | uv pip compile -p 3.12 --universal -
Resolved 62 packages in 23ms
[...]
colabfold==1.5.5
[...]

We should change the regular resolver to ignore this requires-python upper bound, too, and make it clear in the docs that we ignore all requires-python upper bounds.

@konstin konstin added bug Something isn't working preview Experimental behavior labels Jul 14, 2024
@charliermarsh
Copy link
Member

Why is the extra relevant?

@konstin
Copy link
Member Author

konstin commented Jul 14, 2024

We should error both with and without extra due to the mismatch in the python requirement, after finding uv behaves different depending on whether an extra is present (#5043), i'm just testing both cases. Fwiw without the extra the resolution is simple (it's a stub, functionality-wise), with the extra it's a complex machine learning tree.

@charliermarsh
Copy link
Member

This is correct though. We do not respect upper-bounds on requires-python.

@charliermarsh
Copy link
Member

uv pip compile -p 3.12 - is resolving for Python 3.12, while uv pip compile -p 3.12 --universal - is treated as requires-python: ">=3.12". This is mentioned in the documentation.

@konstin konstin changed the title Universal resolver ignore require-python and writes invalid resolution Inconsistent requires-python handling between regular and universal resolver Jul 14, 2024
@konstin konstin changed the title Inconsistent requires-python handling between regular and universal resolver Non-universal resolver should ignore requires-python upper bound Jul 14, 2024
@konstin konstin removed the preview Experimental behavior label Jul 14, 2024
@konstin
Copy link
Member Author

konstin commented Jul 14, 2024

I've changed the issue to changing the regular resolver instead of the universal resolver. We should also make it clearer in the docs that we ignore all upper bounds on requires-python, at least i couldn't find that information when looking for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants