[pull] main from astral-sh:main#58
Merged
Merged
Conversation
## Summary A dependency edge is evaluated only after its parent node has been selected. The resolver already computes the exact reachability marker for each package, extra, and dependency-group node, so clauses implied by that reachability condition are redundant on outgoing edges. This PR simplifies every outgoing dependency marker under the resolution environment and the PEP 508 portion of its parent node's reachability before constructing the lock. For example, once a package is selected only on Darwin, its unconditional transitive dependencies no longer repeat `sys_platform == "darwin"`. Conflict predicates require different treatment because older readers may evaluate edges independently during conflict discovery. We therefore retain the parent's conflict predicates on each outgoing edge while still simplifying its PEP 508 conditions. Markers that contain conflict predicates are still simplified, just not by assuming those predicates are already true.
## Summary #19971 simplifies locked dependency markers under parent reachability. `uv workspace metadata` was still exporting those contextual markers directly, even though metadata edge markers must stand alone. If a package was reachable only on Linux, an unconditional child edge could lose its `sys_platform == 'linux'` marker and be reported as "always required". This PR reconstructs standalone metadata edge markers by propagating reachability from workspace and script entry points.
## Summary This PR adds a standalone `uv.lock` alongside each installed tool's existing `uv-receipt.toml`. Tool locks are gated behind the `tool-install-locks` preview feature. When enabled, `uv tool install` and `uv tool upgrade` always use a universal resolution, then project the resulting lock into the selected interpreter and platform for installation. Existing locked or installed versions are used as preferences, but we do not fall back to a specific solve when a universal lock cannot be produced. For now, tool locks use an unrestricted universal environment and only include the tool's own receipt inputs. They do not add support for `environments`, `required-environments`, or other global dependency configuration from `uv.toml`; those inputs can be added separately later. Lock freshness accounts for the tool manifest and resolver modes, and the lock is written atomically next to the receipt. Without the preview feature, tool install and upgrade retain their existing behavior and do not create a lock.
Adds `uv workspace list --scripts` for enumerating PEP 723 scripts in the workspace. It's in preview under the `workspace-list-scripts` feature. We scan the workspace tree while respecting ignore rule and pruning repositories, virtual environments, and the uv cache from recursive searches. We restrict discovery to `.py` and `.pyw` — we'll need to deal with extensionless scripts separately as I don't want to scan binaries in the tree. There will certainly be bugs and performance issues here, but we should ship and iterate.
## Summary This PR adds regression coverage for the standalone tool-lock paths introduced in #18937. It verifies that changing a constraint invalidates an otherwise reusable lock, `uv tool upgrade` rejects distributions whose served wheel does not match the hash recorded during resolution, and a lock-backed upgrade recreates the environment when `--python` selects a new interpreter. Each test distinguishes the intended behavior from the corresponding stale-lock, unverified-hash, or wrong-interpreter path. The full tool integration suite passes, along with test-target Clippy and the file-scoped repository hooks.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Zanie Blue <contact@zanie.dev>
## Summary - add a random 0–10 second delay before versioned Docker release builds enter the release environment gate - leave pull request dry-runs and `uv-dev` builds unchanged This staggers the extra-image matrix jobs and reduces the chance of race conditions in the release environment gate. ## Test plan - `uvx prek run prettier --files .github/workflows/build-docker.yml` - `uvx zizmor .github/workflows/build-docker.yml` - `git diff --check`
`run_groups_requires_python` performs a long sequence of interpreter selection, virtual environment replacement, reuse, downgrade, and error checks in one test. The repeated `uv run` invocations make it substantially slower than nearby tests and cause frequent slow timeouts. This splits the scenario into focused tests for automatic interpreter selection, environment reuse and explicit downgrade, and error reporting. Each test uses only Python 3.12 and 3.13, empty dependency groups, and `python --version`, preserving the group `requires-python` behavior without unrelated registry resolution or package installation.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )