Skip to content
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

Respect and enable uninstalls of existing .egg-info packages #3380

Merged
merged 1 commit into from May 6, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented May 5, 2024

Summary

Users often find themselves dropped into environments that contain .egg-info packages. While we won't support installing these, it's not hard to support identifying them (e.g., in pip freeze) and uninstalling them.

Closes #2841.
Closes #2928.
Closes #3341.

Test Plan

Ran cargo run pip freeze --python /opt/homebrew/Caskroom/miniforge/base/envs/TEST/bin/python, with an environment that includes pip as an .egg-info (/opt/homebrew/Caskroom/miniforge/base/envs/TEST/lib/python3.12/site-packages/pip-24.0-py3.12.egg-info):

cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1696001825047/work
pip==24.0
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1711811537435/work
setuptools==69.5.1
wheel==0.43.0

Then ran cargo run pip uninstall, verified that pip was uninstalled, and no longer listed in pip freeze.

@charliermarsh charliermarsh added enhancement New feature or request compatibility Compatibility with another interface e.g. `pip` labels May 5, 2024
@charliermarsh charliermarsh marked this pull request as ready for review May 5, 2024 23:07
@charliermarsh charliermarsh force-pushed the charlie/egg branch 2 times, most recently from 02cac42 to 88d19b1 Compare May 5, 2024 23:15
@charliermarsh charliermarsh requested a review from konstin May 5, 2024 23:15
@charliermarsh charliermarsh force-pushed the charlie/egg branch 2 times, most recently from 9c8c1e1 to 28ecff2 Compare May 5, 2024 23:20
@samypr100
Copy link
Contributor

Also closes #2841

@charliermarsh
Copy link
Member Author

Thanks! Added.

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Should the metadata method read from PKG-INFO?

@charliermarsh
Copy link
Member Author

Yes good call, thanks.

@charliermarsh charliermarsh merged commit 26045e5 into main May 6, 2024
43 checks passed
@charliermarsh charliermarsh deleted the charlie/egg branch May 6, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with another interface e.g. `pip` enhancement New feature or request
Projects
None yet
4 participants