Skip to content

Group executable install errors during uv python install#19691

Merged
EliteTK merged 3 commits into
astral-sh:mainfrom
LJX-xixi:fix/9707-group-executable-install-errors
Jun 7, 2026
Merged

Group executable install errors during uv python install#19691
EliteTK merged 3 commits into
astral-sh:mainfrom
LJX-xixi:fix/9707-group-executable-install-errors

Conversation

@LJX-xixi

@LJX-xixi LJX-xixi commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Report pre-existing unmanaged executables in a single error instead of one message per executable.

Summary

When uv python install links the default executables (python, python3, python3.x) and more than one of them already exists as a file uv doesn't manage, the output currently repeats almost the same error once per executable.

The change is in create_bin_links (crates/uv/src/commands/python/install.rs), which links each executable into the bin directory by looping over a list of targets. Instead of pushing an error for every conflicting executable inside the loop, it now collects them and reports once after the loop:

  • 0 conflicts: nothing is reported
  • 1 conflict: the original single-line message (unchanged)
  • 2+ conflicts: one grouped error with the paths as a bulleted list

Other, unrelated failures (e.g. failing to remove or re-link a file) are still reported individually.

Resolves #9707

Test Plan

Added python_install_multiple_unmanaged_executables: install the default executables, replace all three (python, python3, python3.x) with unmanaged files, reinstall without --force, and assert that a single grouped error is shown and the existing files are left untouched. The existing single-conflict tests (python_install_force, python_install_preview) still pass, so the one-executable output is unchanged.

cargo nextest run -p uv --test it python_install
cargo clippy -p uv --all-targets

Report pre-existing unmanaged executables in a single error instead of one message per executable.
@LJX-xixi LJX-xixi closed this Jun 5, 2026
@LJX-xixi LJX-xixi reopened this Jun 5, 2026
@astral-sh-bot

astral-sh-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 1
  • Removed tests: 0
  • Changed suites: 1
uv::it: +1 / -0

Added:

  • uv::it::python_install::python_install_multiple_unmanaged_executables

Removed: none

@EliteTK EliteTK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just a few comments.

Let me know if you need more clarity on the comments.

Comment thread crates/uv/src/commands/python/install.rs Outdated
Comment thread crates/uv/src/commands/python/install.rs Outdated
Comment thread crates/uv/src/commands/python/install.rs Outdated
Comment thread crates/uv/src/commands/python/install.rs Outdated
Comment thread crates/uv/tests/it/python_install.rs Outdated
Comment thread crates/uv/tests/it/python_install.rs Outdated
@EliteTK EliteTK self-assigned this Jun 6, 2026
Use `conjunction` for the grouped message, drop the redundant comments and braces, and pin the test to Python 3.13.
@codspeed-hq

codspeed-hq Bot commented Jun 7, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 13 untouched benchmarks


Comparing LJX-xixi:fix/9707-group-executable-install-errors (e68a4f1) with main (602d11f)

Open in CodSpeed

@LJX-xixi

LJX-xixi commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! @EliteTK

@EliteTK EliteTK enabled auto-merge (squash) June 7, 2026 11:56
@EliteTK EliteTK merged commit 1cdabfb into astral-sh:main Jun 7, 2026
54 checks passed
@konstin konstin added the error messages Messaging when something goes wrong label Jun 10, 2026
konstin added a commit that referenced this pull request Jun 10, 2026
Released on 2026-06-10.

### Enhancements

- Add `--emit-index-url` and `--emit-find-links` to `uv export`
([#18370](#18370))
- Add `--find-links` support for `uv pip list`
([#16103](#16103))
- Group executable install errors during `uv python install`
([#19691](#19691))
- Use ICF in macOS release builds to reduce binary sizes
([#19615](#19615))

### Preview features

- Add initial hidden `uv upgrade` command
([#19678](#19678))
- Reject Git revisions in `uv upgrade`
([#19742](#19742))

### Configuration

- Recognize `UV_NO_INSTALL_PROJECT`, `UV_NO_INSTALL_WORKSPACE`,
`UV_NO_INSTALL_LOCAL`
([#19323](#19323))

### Performance

- Speed up discovery of large workspaces
([#18311](#18311))

### Bug fixes

- Allow unknown preview flags with a warning again
([#19669](#19669))
- Apply dependency exclusions to direct requirements
([#19699](#19699))
- Avoid following external symlinks during cache clean
([#19682](#19682))
- Avoid following symlinks during cache prune
([#19543](#19543))
- Fix Git cache keys for worktrees and packed refs
([#19706](#19706))
- Make resolver error handling iterative to avoid stack overflows
([#19695](#19695))
- Pass `VIRTUAL_ENV` through `cygpath` inside `fish` on Windows
([#19703](#19703))
- Rebuild explicit local directory tool installs
([#19591](#19591))
- Validate egg top-level entries as identifiers
([#19679](#19679))

### Documentation

- Document `--find-links` caching behavior
([#19585](#19585))
- Add a small section for malware checks
([#19680](#19680))
blake-hamm added a commit to blake-hamm/bhamm-lab that referenced this pull request Jun 10, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ghcr.io/astral-sh/uv](https://github.com/astral-sh/uv) | stage | patch | `0.11.19` → `0.11.20` |

---

### Release Notes

<details>
<summary>astral-sh/uv (ghcr.io/astral-sh/uv)</summary>

### [`v0.11.20`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#01120)

Released on 2026-06-10.

##### Enhancements

- Add `--emit-index-url` and `--emit-find-links` to `uv export` ([#&#8203;18370](astral-sh/uv#18370))
- Add `--find-links` support for `uv pip list` ([#&#8203;16103](astral-sh/uv#16103))
- Group executable install errors during `uv python install` ([#&#8203;19691](astral-sh/uv#19691))
- Use ICF in macOS release builds to reduce binary sizes ([#&#8203;19615](astral-sh/uv#19615))

##### Preview features

- Add initial hidden `uv upgrade` command ([#&#8203;19678](astral-sh/uv#19678))
- Reject Git revisions in `uv upgrade` ([#&#8203;19742](astral-sh/uv#19742))

##### Configuration

- Recognize `UV_NO_INSTALL_PROJECT`, `UV_NO_INSTALL_WORKSPACE`, `UV_NO_INSTALL_LOCAL` ([#&#8203;19323](astral-sh/uv#19323))

##### Performance

- Speed up discovery of large workspaces ([#&#8203;18311](astral-sh/uv#18311))

##### Bug fixes

- Allow unknown preview flags with a warning again ([#&#8203;19669](astral-sh/uv#19669))
- Apply dependency exclusions to direct requirements ([#&#8203;19699](astral-sh/uv#19699))
- Avoid following external symlinks during cache clean ([#&#8203;19682](astral-sh/uv#19682))
- Avoid following symlinks during cache prune ([#&#8203;19543](astral-sh/uv#19543))
- Fix Git cache keys for worktrees and packed refs ([#&#8203;19706](astral-sh/uv#19706))
- Make resolver error handling iterative to avoid stack overflows ([#&#8203;19695](astral-sh/uv#19695))
- Pass `VIRTUAL_ENV` through `cygpath` inside `fish` on Windows ([#&#8203;19703](astral-sh/uv#19703))
- Rebuild explicit local directory tool installs ([#&#8203;19591](astral-sh/uv#19591))
- Validate egg top-level entries as identifiers ([#&#8203;19679](astral-sh/uv#19679))

##### Documentation

- Document `--find-links` caching behavior ([#&#8203;19585](astral-sh/uv#19585))
- Add a small section for malware checks ([#&#8203;19680](astral-sh/uv#19680))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- 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 PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: Renovate Bot <renovate@bhamm-lab.com>
Reviewed-on: https://codeberg.org/blake-hamm/bhamm-lab/pulls/186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error messages Messaging when something goes wrong

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve display of executable install errors during uv python install

3 participants