Skip to content

[pull] main from astral-sh:main - #254

Merged
pull[bot] merged 4 commits into
Moshbbab:mainfrom
astral-sh:main
Sep 20, 2026
Merged

pull[bot] merged 4 commits into
Moshbbab:mainfrom
astral-sh:main

Conversation

@pull

@pull pull Bot commented Sep 20, 2026

Copy link
Copy Markdown

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 : )

charliermarsh and others added 4 commits September 20, 2026 10:49
## Summary

When Git checks out symlinks as regular files, the `fake-uv` fixture cannot be installed because its `src` entry contains a link target instead of Python sources. We now copy the current Python sources into a temporary fixture for each Python module test, using a helper local to the test module.

Closes #21850.
Move `uv add`'s project and script snapshots, error rollback, and Ctrl-C
handling into a shared `ProjectEdit` guard. The caller commits the edit
after locking and syncing succeeds.

We retain the existing snapshot contents, modification check, and
rollback boundary so other editing commands can adopt the interface
separately.
An unchanged, read-only workspace manifest can prevent `uv add` from
restoring an edited member after a failure. Frozen edits also read the
lockfile unnecessarily and can fail when it is unreadable.

Snapshot the affected files directly, skip unchanged files during
rollback, and attempt each restoration independently. Frozen edits
exclude the lockfile. We also guard edits before the first write, so
errors before locking and syncing restore the files, and clear the
snapshot on success so a later interrupt cannot undo a committed edit.

Builds on #21859.
`uv version --bump minor --locked` leaves the version bumped when it
rejects the stale lockfile. `uv remove` can similarly leave the manifest
changed after locking or syncing fails.

Use the shared project edit guard in `uv remove` and `uv version`,
matching `uv add`'s rollback on errors and Ctrl-C. We restore the
original manifest or script and lockfile, removing the lockfile if the
failed command created it. Frozen edits continue to skip the lockfile.

Builds on #21860.

Closes #21854.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Sep 20, 2026
@pull pull Bot added the ⤵️ pull label Sep 20, 2026
@pull
pull Bot merged commit 09f725d into Moshbbab:main Sep 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant