Allow downloading wheels for metadata with --no-binary#5707
Allow downloading wheels for metadata with --no-binary#5707charliermarsh merged 1 commit intomainfrom
--no-binary#5707Conversation
| @@ -16,8 +16,6 @@ use uv_normalize::PackageName; | |||
| pub enum Error { | |||
| #[error("Building source distributions is disabled")] | |||
| NoBuild, | |||
There was a problem hiding this comment.
We do, however, need to be aggressive about rejecting builds at metadata-fetch time.
d53bb2a to
9a4defb
Compare
| Join(#[from] JoinError), | ||
| #[error(transparent)] | ||
| Editable(#[from] uv_distribution::Error), | ||
| Editable(#[from] Box<uv_distribution::Error>), |
There was a problem hiding this comment.
(Clippy yelling at me about variant size.)
|
I'll figure out how to test this if we're aligned on the behavior. |
|
It appears that pip does not use wheel metadata when |
|
Maybe the ideal here is: we use wheel metadata if we can fetch the wheel without downloading it; otherwise, we download the source distribution? |
|
Seems murky, but I did think that was the existing behavior. |
|
Which behavior exactly? The behavior in the PR, or "we use wheel metadata if we can fetch the wheel without downloading it; otherwise, we download the source distribution"? |
konstin
left a comment
There was a problem hiding this comment.
No idea what the right behavior(s) for --no-binary are, but the code looks code.
We only use locally available wheel metadata. |
|
I think it would be fine to merge this, and then revisit whether we should use wheels at all here. |
|
I'm going to merge and document this. We can consider changing the behavior holistically. |
9a4defb to
8b200e1
Compare
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.2.33` -> `0.2.35` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.2.35`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0235) [Compare Source](astral-sh/uv@0.2.34...0.2.35) ##### CLI - Deprecate `--system` and `--no-system` in `uv venv` ([#​5925](astral-sh/uv#5925)) - Make `--upgrade` imply `--refresh` ([#​5943](astral-sh/uv#5943)) - Warn when there are missing bounds on transitive dependencies with `--resolution-strategy lowest` ([#​5953](astral-sh/uv#5953)) ##### Configuration - Add support for `no-build-isolation-package` ([#​5894](astral-sh/uv#5894)) ##### Performance - Enable LTO optimizations in release builds to reduce binary size ([#​5904](astral-sh/uv#5904)) - Prefetch metadata in `--no-deps` mode ([#​5918](astral-sh/uv#5918)) ##### Bug fixes - Display portable paths in POSIX virtual environment activation commands ([#​5956](astral-sh/uv#5956)) - Respect subdirectories when locating Git workspaces ([#​5944](astral-sh/uv#5944)) ##### Documentation - Improve the `uv venv` CLI documentation ([#​5963](astral-sh/uv#5963)) ### [`v0.2.34`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0234) [Compare Source](astral-sh/uv@0.2.33...0.2.34) ##### Enhancements - Always strip in release mode ([#​5745](astral-sh/uv#5745)) - Assume `git+` prefix when URLs end in `.git` ([#​5868](astral-sh/uv#5868)) - Support build constraints ([#​5639](astral-sh/uv#5639)) ##### CLI - Create help sections for build, install, resolve, and index ([#​5693](astral-sh/uv#5693)) - Improve CLI documentation for global options ([#​5834](astral-sh/uv#5834)) - Improve `--python` CLI documentation ([#​5869](astral-sh/uv#5869)) - Improve display order of top-level commands ([#​5830](astral-sh/uv#5830)) ##### Bug fixes - Allow downloading wheels for metadata with `--no-binary` ([#​5707](astral-sh/uv#5707)) - Reject `pyproject.toml` in `--config-file` ([#​5842](astral-sh/uv#5842)) - Remove double-proxy nodes in error reporting ([#​5738](astral-sh/uv#5738)) - Respect pre-release preferences from input files ([#​5736](astral-sh/uv#5736)) - Support overlapping local and non-local requirements in forks ([#​5812](astral-sh/uv#5812)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Summary
We allow the use of (e.g.)
.whl.metadatafiles when--no-binaryis enabled, so it makes sense that we'd also also allow wheels to be downloaded for metadata extraction. So now, we validate--no-binaryat install time, rather than metadata-fetch time.Closes #5699.