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

Support PEP 610 editables in pip freeze and pip list #10249

Merged
merged 14 commits into from
Sep 21, 2021

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Jul 31, 2021

This makes pip list and freeze support PEP 610 editables (from direct_url.json), in preparation for PEP 660.

This should be fully backward compatible. The new column in pip list column format is not a breaking change because it is meant for human consumption (the json format is there for machines, and in the semantics of existing field did not change in the json output).

This may be tested by installing a flit project with flit install --pth or flit install --symlink and noticing that pip list and pip freeze correctly detect it as editable.

@pypa-bot
Copy link

pypa-bot commented Aug 8, 2021

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will eligible for code review and hopefully merging!

@pypa-bot pypa-bot added the needs rebase or merge PR has conflicts with current master label Aug 8, 2021
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Aug 8, 2021
@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch 2 times, most recently from e3abddd to 6e21d74 Compare August 8, 2021 15:40
@sbidoul
Copy link
Member Author

sbidoul commented Aug 8, 2021

I added a couple of tests.

This is now ready for review. I recommend looking at individual commits separately.

@github-actions github-actions bot added the needs rebase or merge PR has conflicts with current master label Aug 20, 2021
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Aug 21, 2021
@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch 2 times, most recently from 1ef2aaf to 5495f14 Compare August 21, 2021 15:20
@sbidoul
Copy link
Member Author

sbidoul commented Aug 21, 2021

Rebased and blackened. I also added some documentation.

@sbidoul sbidoul closed this Aug 22, 2021
@sbidoul sbidoul reopened this Aug 22, 2021
@github-actions github-actions bot added the needs rebase or merge PR has conflicts with current master label Aug 22, 2021
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Aug 22, 2021
@sbidoul
Copy link
Member Author

sbidoul commented Aug 28, 2021

Thank for the review, @uranusjr. I handled your comments.
This PR is becoming too big but individual commits should remain easy to understand.

@github-actions github-actions bot added the needs rebase or merge PR has conflicts with current master label Aug 28, 2021
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Aug 29, 2021
@sbidoul sbidoul added this to the 21.3 milestone Aug 29, 2021
sbidoul and others added 14 commits September 21, 2021 11:18
Make them work without using pkg_resource.
Look for the editable flag in direct_url.json,
and fall back to the .egg-link search if there is
no direct_url.json.
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
I have tried to remove the .egg-link
(in which case the package is not considered editable),
and removing the package while leaving the .egg-link
(in which case the package is not shown).
I could not produce this "Editable install not found" message
with pip 21.2.

So I think this is dead code and I'm replacing this test by an assert.
@sbidoul
Copy link
Member Author

sbidoul commented Sep 21, 2021

Rebased and still green. So I'm going ahead and merging this. Thanks for the review @uranusjr!

@sbidoul sbidoul merged commit 558d86b into pypa:main Sep 21, 2021
@sbidoul sbidoul deleted the list-freeze-pep610-sbi branch September 21, 2021 10:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants