-
Notifications
You must be signed in to change notification settings - Fork 856
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
uv pip compile --universal fails when dependency's python-requires is incompatible with -p, even with markers #6730
Comments
Ah yeah. You can solve this with the |
Hmm, this may in fact be a duplicate of that issue. I'm not sure |
Ah, |
I think (or hope) that |
Yeah. The reason this happens is related to implementation details of the resolver (that we're considering changing). We only "fork" the resolver if we see multiple requirements for the same package. Once we fork, we (e.g.) do the right thing with respect to narrowing the supported Python range. But if we only see |
This may be a seperate issue, or not an issue at all, but it also seems that markers don't influence version resolution? Compare:
|
Can you explain that comment a bit more? Sorry, trying to follow. Do you mean the |
Sorry, I should have written more words. In both of these invocations, |
Ohhh yes, I didn't notice that. I think that's because in the non-forking case (without
|
Should this be a separate issue, or is this the right place? |
I seem to have found another variant on this -- when you have additional environments:
|
The bug described ^ appears to be fixed now. |
It looks like
I'm actually not totally sure which commit fixed this. I haven't done a bisect. I see multiple possible candidates I think? Also, the |
I believe Konsti dropped those in his unreachable PRs, maybe? |
They are definitely still around (using the example in the OP):
|
But I don’t see them in your reproduced snippet, and those changes came after this issue. |
Oh sorry, you re-ran there, I see. Do those packages appear if you use uv lock instead? We probably just need to apply whatever Konsti did in the lockfile to the universal output case \cc @konstin |
The pruning currently only happens in the transformation from graph to |
Gonna track that last part here: #7196 |
Should be fixed in the next release (see: #8628). |
When you use a marker to express a dependency,
uv pip compile --universal
"forwards" that to the output. For example:When Python 3.7 is actually used, no dependencies will be installed.
However, when this same marker is used for a dependency whose python-requires mean there is no resolution for the lower version, this fails:
The fact that
check-sdist
only supports Python 3.8+ should be ok, because the dependency has the; python_version >= "3.8"
marker. But insteaduv pip compile
rejects it because it's not compatible with-p
.The text was updated successfully, but these errors were encountered: