-
Notifications
You must be signed in to change notification settings - Fork 930
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
Model Python version as a PubGrub package #745
Conversation
bfe5ee6
to
f8a9219
Compare
This is actually harder than I thought. Consider the case of resolving NumPy with |
I think I know how to solve but will be a bit more work, so marking as draft. |
ef079c0
to
dc3d37c
Compare
Okay, should be ready for review. |
dc3d37c
to
79b9f3b
Compare
79b9f3b
to
0fe1635
Compare
2b5f2a7
to
5b44051
Compare
5b44051
to
9146d9a
Compare
Summary
This PR modifies the resolver to treat the Python version as a package, which allows for better error messages (since we no longer treat incompatible packages as if they "don't exist at all").
There are a few tricky pieces here...
First, we need to track both the interpreter's Python version and the target Python version, because we support resolving for other versions via
--python 3.7
.Second, we allow using incompatible wheels during resolution, as long as there's a compatible source distribution. So we still need to test for
requires-python
compatibility when selecting distributions.This could use more testing, but it feels like an area where
packse
would be more productive than writing PyPI tests.Closes #406.