-
Notifications
You must be signed in to change notification settings - Fork 894
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
Restricting universal lock by OS still downloads wheels from all OSes #6512
Comments
Thanks for the report! @konstin you marked this as an enhancement, is this not a bug? |
We already never install those wheels, but we're missing the pruning of the wheels list for platforms. We're currently only prune the wheels list for the python version (#4696), but we can extend this to the platform markers also. It may not work 100% for platform marker them since markers and wheels tags don't have a perfect 1:1 mapping, but we would still trim the lockfile down by a lot. |
Thanks for the additional context. Is this hard? |
Hard to tell, hopefully it's a just a lookup table and some filtering. Ideally, you create a mapping from a marker to what tags it supports, e.g. |
This would be a good improvement. |
Thanks very much all - would be very happy to see this enhancement - none of the other "universal" lockfile tools seems to support this filtering... |
This is a bit more tedious because we don't track "all the markers under which this package could be relevant" in the lockfile directly -- you have to compute it by propagating markers. So at this point in the lockfile: // Remove wheels that don't match `requires-python` and can't be selected for
// installation.
if let Some(requires_python) = &requires_python {
package
.wheels
.retain(|wheel| requires_python.matches_wheel_tag(&wheel.filename));
} We'd need to track the supported platforms. |
Prep for fixing #6512. No functional changes.
Prep for fixing #6512. No functional changes.
Prep for fixing #6512. No functional changes.
Prep for fixing #6512. No functional changes.
Closed by #6957. |
Thank you! Though that PR is described as "Prep for fixing #6512. No functional changes."? |
Apologies, I linked the wrong PR! |
Apologies, was using an old version of uv 😂 |
Hi - I'm very glad to see uv's recent universal locking features, and engagement with the lockfile standard - but I've found one behaviour that seems a little odd.
Perhaps I have misunderstood how environment markers are used in universal resolution, but I am surprised by this behaviour:
Result: I still get plently Windows-specific wheels in my
uv.lock
lockfile, e.g.torch-2.1.0-cp310-cp310-win_amd64.whl
- presumably these have all still been downloaded.Would it be possible please not to download these Mac/Windows-only wheels for linux-only universal locks, as an example?
Many thanks,
Tom
The text was updated successfully, but these errors were encountered: