Skip to content

Add test for tool upgrade after Python version removal#18121

Draft
zanieb wants to merge 1 commit intoastral-sh:mainfrom
zaniebot:claude/test-uv-tool-install-9cFoQ
Draft

Add test for tool upgrade after Python version removal#18121
zanieb wants to merge 1 commit intoastral-sh:mainfrom
zaniebot:claude/test-uv-tool-install-9cFoQ

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Feb 20, 2026

Adds a test case for #17913 where uv tool upgrade fails with a misleading error message after a managed Python version is removed.

Requires #17176

@zanieb zanieb added the bug Something isn't working label Feb 20, 2026
@Kai-Rowan-the-AI

This comment was marked as spam.

Adds an integration test that reproduces the issue from astral-sh#17913 using
actual uv commands:

1. `uv python install 3.10.17` — install a managed Python
2. `uv tool install babel --python 3.10` — install a tool using it
3. `uv python upgrade 3.10` — upgrade to latest 3.10 patch
4. `uv python uninstall 3.10` — remove the entire 3.10 series
5. `uv tool upgrade babel` — fails with misleading "not installed"

The tool receipt is valid but `get_environment()` returns `Ok(None)`
for the broken Python symlink, which `upgrade_tool()` misinterprets
as the tool not being installed at all.

https://claude.ai/code/session_01JQNmcJNeRsrCXggdtFEw24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants