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
@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch from 73bbc05 to 391c029 Compare August 8, 2021 15:05
@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
@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch from 6e21d74 to 43ead14 Compare August 21, 2021 14:52
@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
@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch from 5495f14 to 6b06b21 Compare August 22, 2021 20:34
@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.

@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch from 4c8f529 to 699b432 Compare August 28, 2021 15:18
@github-actions github-actions bot added the needs rebase or merge PR has conflicts with current master label Aug 28, 2021
@sbidoul sbidoul force-pushed the list-freeze-pep610-sbi branch from 699b432 to 4c82baf Compare August 29, 2021 09:51
@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

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul
Make them work without using pkg_resource.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul
Look for the editable flag in direct_url.json,
and fall back to the .egg-link search if there is
no direct_url.json.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul
Co-authored-by: Tzu-ping Chung <[email protected]>

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul
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.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
sbidoul Stéphane Bidoul
@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