-
Notifications
You must be signed in to change notification settings - Fork 752
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
Invalid non-resolution with uv lock
#5398
Comments
If your project declares a Python compatibility range of |
That makes sense, but my situation is in fact the other way around; my project restricts Python >=3.12, but depends on a project requiring Python >= 3.8. I also suspect it is an issue with |
The logs suggest you have a project in your workspace with |
Indeed there is, but the dependency is the wrong way around.
Hope that makes sense? If it helps, I can also try and create a MWE. |
The thing is, we're trying to lock the entire workspace, not just the root package. You could make |
That makes sense! My follow up question then: does running |
(This would be good to clarify at https://github.com/astral-sh/uv/blob/main/docs/projects.md#lock-file if not present) |
We improved the resolver docs including the way more details:
Do those sufficiently explain the behavior you're seeing? |
Thanks for the heads up! I have gone of the two docs, I think the only thing that might be missing (which is what caught me off guard) is that If we suppose a workspace as follows:
I ran into the issue with I'm not sure whether it belongs in these docs or elsewhere, but I think there should be clarity as to how workspaces affects the various uv subcommands. |
Good note, we have workspace docs too, even though the answer currently is that we don't really support workspaces with different |
The workspace docs do make it this behaviour much clearer! And even explain how Thanks 👍 I think this issue can be closed, though I'll let you all make the final determination. |
We have workspaces tracked at #5594, will close. |
Summary
With the most recent
0.2.28
release of uv, I am no longer able to lock the root package in my workspace, resulting in the error:It seems to suggest that
Python >= 3.8
is not compatible withPython ~3.12.0
, which I believe is wrong as stated (though the converse would be correct).Logs
The error appears with various commands that require dependency resolution.
trying
uv -v lock
results in:The
mypkg-cli
component has the broadest Python compatibility, while themypkg
andmypkg-api
components are pinned to use3.12.X
.It would appear that in the resolution, instead of narrow down the Python compatibility range, it is throwing an error for
mypkg
due to its narrow Python version requirements.The text was updated successfully, but these errors were encountered: