Skip to content

replace manual venv removal with remove_virtualenv #15007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Zaloog
Copy link

@Zaloog Zaloog commented Jul 31, 2025

Summary

At some places the virtualenv directory was manually removed instead of using remove_virtualenv.
I also adjusted the error type.
#14985

Test Plan

Also adjusted the error type in the match arm
@zanieb
Copy link
Member

zanieb commented Jul 31, 2025

Thank you!

@zanieb zanieb added the internal A refactor or improvement that is not user-facing label Jul 31, 2025
Its already covered in remove_virtualenv
@Zaloog
Copy link
Author

Zaloog commented Jul 31, 2025

An error is no longer properly propagated for the tools when uninstalling a not installed tool. Can reproduce it locally and will try to fix that

self-replace is no longer needed here, since we invoke the
remove_virtualenv function from uv-virtualenv.
This also caused a problem that the uv_tool::Error::Io is no longer
raised, but the uv_tool::Error::VirtualEnvError, when e.g. `black`
is not present as a tool in the test case.
@Zaloog Zaloog marked this pull request as ready for review August 1, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants