-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support unnamed requirements directly in pip uninstall #2577
Conversation
3dedfbf
to
3c10b66
Compare
6965eaf
to
3279e90
Compare
3c10b66
to
1d1f1d7
Compare
3279e90
to
b1a32dd
Compare
1d1f1d7
to
4666556
Compare
0b6cb7e
to
a6e60e0
Compare
4666556
to
b7b1fa2
Compare
a6e60e0
to
fe8bd8d
Compare
b7b1fa2
to
3addc19
Compare
fe8bd8d
to
37b12a9
Compare
/// Uninstall the editable package based on the provided local file path. | ||
#[clap(long, short, group = "sources")] | ||
editable: Vec<String>, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh why did we have this in the first place? Is there an actual behavior change here or do we just treat editables like normal packages during uninstall?
We should note this as a breaking change in the changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just treated editables like normal packages (sort of). We removed any packages that matched the URL (regardless of whether they're editable). I guess this probably existed because we didn't support direct URL requirements, so you couldn't do uv pip uninstall ./path/to/file
. But pip does not allow this. I'll note it as such in the changelog.
Summary
In
pip uninstall
, we shouldn't need to resolve unnamed requirements, since we already index packages insite-packages
by their URL.This also changes
uninstall
to ignore editables, which matches pip's behavior.Part of: #313.
Test Plan
Run
cargo run pip install ./scripts/editable-installs/black_editable
, followed by each of the following:cargo run pip uninstall ./scripts/editable-installs/black_editable
cargo run pip uninstall black
cargo run pip uninstall ./scripts/editable-installs/black_editable black