Repository navigation
Allow requiring metadata range requests - #21352
Merged
Merged
Conversation
Member
|
I want this for #21350 but it also seems like it could be generally useful |
zanieb
reviewed
Aug 28, 2026
zanieb
reviewed
Aug 28, 2026
|
|
||
| /// Require wheel metadata to be fetched with HTTP range requests when separate metadata is | ||
| /// unavailable. If set to `true`, uv will fail instead of downloading the entire wheel. | ||
| #[attr_hidden] |
Member
There was a problem hiding this comment.
I don't mind if we make this visible
ewdurbin
approved these changes
Aug 28, 2026
ewdurbin
left a comment
Collaborator
There was a problem hiding this comment.
you already caught the only thing that stood out to me, which was the attr_added_in("next release") situation.
| } else { | ||
| parse_boolish_environment_variable(EnvVars::UV_REQUIRE_METADATA_RANGE_REQUESTS)? | ||
| .unwrap_or(false) | ||
| }; |
Member
There was a problem hiding this comment.
Should we... pass this in everywhere / set it, rather than parsing the env var in the client? :sick:
Member
There was a problem hiding this comment.
ugh, yes... I honestly just saw that it used parse_boolish_environment_variable and assumed it was in the right place, surprised uv-client has that... will fix
zanieb
added a commit
that referenced
this pull request
Aug 31, 2026
`UV_REQUIRE_METADATA_RANGE_REQUESTS` is currently parsed inside
`uv-client`, which makes client construction depend on ambient
environment state.
Parse it with `EnvironmentOptions`, map it to
`MetadataRangeRequest::{Fallback, Require}`, and pass it through
`BaseClientBuilder` to every registry client. This addresses [review
feedback](#21352 (comment)).
---------
Co-authored-by: Zanie Blue <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wheel metadata lookup normally falls back to streaming the entire wheel when HTTP range requests are unsupported. Add a hidden
UV_REQUIRE_METADATA_RANGE_REQUESTScontrol that turns this fallback into an explicit error, allowing callers and integration tests to require the range path without parsing human-readable logs. Include focused client coverage for the opt-in behavior while preserving the existing default.