-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
C: list/show'pip list' or 'pip show''pip list' or 'pip show'PEP implementationInvolves some PEPInvolves some PEPgood first issueA good item for first time contributors to work onA good item for first time contributors to work onstate: awaiting PRFeature discussed, PR is neededFeature discussed, PR is needed
Description
A few months ago, PEP 753 was accepted. It is now known as the "Well-known Project URLs in Metadata" standard. We should implement it as pip does consume project URL metadata.
I haven't looked at pip's existing Project-URL or Home-page handling, so it's possible that there is very little or nothing to do on pip's end, but I wanted to file this issue to make sure we take a look at some point. The logic that mirrors PyPI's old homepage Project-URL aliasing probably needs a some tweaking to have it conform to the specification.
pip/src/pip/_internal/commands/show.py
Lines 134 to 146 in f8f0f5a
| if not homepage: | |
| # It's common that there is a "homepage" Project-URL, but Home-page | |
| # remains unset (especially as PEP 621 doesn't surface the field). | |
| # | |
| # This logic was taken from PyPI's codebase. | |
| for url in project_urls: | |
| url_label, url = url.split(",", maxsplit=1) | |
| normalized_label = ( | |
| url_label.casefold().replace("-", "").replace("_", "").strip() | |
| ) | |
| if normalized_label == "homepage": | |
| homepage = url.strip() | |
| break |
cc @woodruffw
Metadata
Metadata
Assignees
Labels
C: list/show'pip list' or 'pip show''pip list' or 'pip show'PEP implementationInvolves some PEPInvolves some PEPgood first issueA good item for first time contributors to work onA good item for first time contributors to work onstate: awaiting PRFeature discussed, PR is neededFeature discussed, PR is needed