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

Implement PEP 753 normalization for Home-Page fallback #13242

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ichard26
Copy link
Member

We treat "homepage" as a well-known project URL, using it to populate the Home-Page core metadata field if it's undefined. This patch updates the normalization logic to follow PEP 753.

Feedback wanted: The logic emitting the raw project URLs was left unchanged as we don't really care for well-known vs. boring URLs here. I believe this is the right call, but I can be convinced to also apply normalization here (although that could break anyone who is using pip show to inspect metadata which is actually a valid use-case as the show output format is documented.)

$ pip show pip --verbose
Name: pip
Version: 25.1.dev0
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: 
Author-email: The pip developers <[email protected]>
License: MIT
Location: /home/ichard26/dev/oss/pip/venv/lib/python3.12/site-packages
Editable project location: /home/ichard26/dev/oss/pip
Requires: 
Required-by: flit
Metadata-Version: 2.2
Installer: pip
Classifiers:
  [... a bunch of classifiers]
Entry-points:
  [console_scripts]
  pip = pip._internal.cli.main:main
  pip3 = pip._internal.cli.main:main
Project-URLs:
  Homepage, https://pip.pypa.io/
  Documentation, https://pip.pypa.io
  Source, https://github.com/pypa/pip
  Changelog, https://pip.pypa.io/en/stable/news/

We treat "homepage" as a well-known project URL, using it to populate
the Home-Page core metadata field if it's undefined. This patch updates
the normalization logic to follow PEP 753.

The logic emitting the raw project URLs was left unchanged as we don't
really care for well-known vs. boring URLs here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement PEP 753: "Well-known Project URLs in Metadata"
1 participant