Reject already-installed wheels built with outdated settings#15289
Merged
charliermarsh merged 1 commit intomainfrom Aug 15, 2025
Merged
Reject already-installed wheels built with outdated settings#15289charliermarsh merged 1 commit intomainfrom
charliermarsh merged 1 commit intomainfrom
Conversation
Member
Author
|
(Needs tests, still iterating on the abstractions.) |
1b4cc80 to
973d160
Compare
973d160 to
5370569
Compare
5370569 to
3fa1212
Compare
3fa1212 to
d1b2220
Compare
zanieb
reviewed
Aug 15, 2025
Comment on lines
135
to
139
| let cache_shard = if build_info.is_empty() { | ||
| cache_shard | ||
| } else { | ||
| cache_shard.shard(cache_digest(&( | ||
| &config_settings, | ||
| extra_build_deps, | ||
| extra_build_vars, | ||
| ))) | ||
| cache_shard.shard(cache_digest(&build_info)) | ||
| }; |
Member
There was a problem hiding this comment.
I would probably implement this as let cache_shard = build_info.cache_shard().and_then(cache_shard.shard).unwrap_or(cache_shard) if the compiler will let you.
zanieb
approved these changes
Aug 15, 2025
9cbf0ab to
1e57d23
Compare
adding stuff Mostly wired up, satisfies isn't done, now adding a separate struct Trying to move itno dist types Add separate struct
1e57d23 to
59f4598
Compare
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Aug 21, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.8.11` -> `0.8.12` | 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.8.12`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0812) [Compare Source](astral-sh/uv@0.8.11...0.8.12) ##### Python - Add 3.13.7 - Improve performance of zstd in Python 3.14 See the [python-build-standalone release notes](https://github.com/astral-sh/python-build-standalone/releases/tag/20250818) for details. ##### Enhancements - Add an `aarch64-pc-windows-msvc` target for `python-platform` ([#​15347](astral-sh/uv#15347)) - Add fallback parent process detection to `uv tool update-shell` ([#​15356](astral-sh/uv#15356)) - Install non-build-isolation packages in a second phase ([#​15306](astral-sh/uv#15306)) - Add hint when virtual environments are included in source distributions ([#​15202](astral-sh/uv#15202)) - Add Docker images derived from `buildpack-deps:trixie`, `debian:trixie-slim`, `alpine:3.22` ([#​15351](astral-sh/uv#15351)) ##### Bug fixes - Reject already-installed wheels built with outdated settings ([#​15289](astral-sh/uv#15289)) - Skip interpreters that are not found on query ([#​15315](astral-sh/uv#15315)) - Handle dotted package names in script path resolution ([#​15300](astral-sh/uv#15300)) - Reject `match-runtime = true` for dynamic packages ([#​15292](astral-sh/uv#15292)) ##### Documentation - Document improvements to build-isolation setups ([#​15326](astral-sh/uv#15326)) - Fix reference documentation recommendation to use `uv cache clean` instead of `clear` ([#​15313](astral-sh/uv#15313)) </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:eyJjcmVhdGVkSW5WZXIiOiI0MS43Ni4wIiwidXBkYXRlZEluVmVyIjoiNDEuNzYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
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.
Summary
With this PR, we track the settings that were used to build a wheel (
--config-settings, plus anyextra-build-dependenciesorextra-build-variables) and write those to the.dist-infodirectory upon install. This then allows us to "reject" already-installed wheels, if the user changes the build dependencies or--config-settings(or, crucially, if they usematch-runtime = trueand the resolution changes).Closes #15218.