Support unnamed requirements directly in pip uninstall#2577
Merged
charliermarsh merged 1 commit intomainfrom Mar 21, 2024
Merged
Support unnamed requirements directly in pip uninstall#2577charliermarsh merged 1 commit intomainfrom
charliermarsh merged 1 commit intomainfrom
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
zanieb
reviewed
Mar 21, 2024
Comment on lines
-963
to
-966
| /// Uninstall the editable package based on the provided local file path. | ||
| #[clap(long, short, group = "sources")] | ||
| editable: Vec<String>, | ||
|
|
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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.
zanieb
approved these changes
Mar 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In
pip uninstall, we shouldn't need to resolve unnamed requirements, since we already index packages insite-packagesby their URL.This also changes
uninstallto 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_editablecargo run pip uninstall blackcargo run pip uninstall ./scripts/editable-installs/black_editable black