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

Document that Requires-Dist can use explicit URLs #1783

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

godlygeek
Copy link

@godlygeek godlygeek commented Jan 8, 2025

The core-metadata documentation currently implies that Requires-Dist can only use name-based specifiers, but then references PEP 508 which allows for URL based specifiers. Update the documentation to reflect this alternative specifier format.


📚 Documentation preview 📚:

The core-metadata documentation currently implies that `Requires-Dist`
can only use name-based specifiers, but then references PEP 508 which
allows for URL based specifiers. Update the documentation to reflect
this alternative specifier format.
@ncoghlan
Copy link
Member

ncoghlan commented Jan 9, 2025

This section should reference https://packaging.python.org/en/latest/specifications/dependency-specifiers/ rather PEP 508 directly.

Any mention of direct URLs should point to their definition in https://packaging.python.org/en/latest/specifications/version-specifiers/#direct-references and note that they are not permitted on PyPI (but are fine for use in packages that are only uploaded to org specific index servers).

The description of valid names should link to https://packaging.python.org/en/latest/specifications/name-normalization/#name-format

@godlygeek
Copy link
Author

I believe I've addressed all of your feedback @ncoghlan, please take another look

* An environment marker after a semicolon. This means that the
requirement is only needed in the specified conditions.

See :pep:`508` for full details of the allowed format.
See :ref:`dependency-specifiers` for full details of the allowed format.
Copy link
Member

Choose a reason for hiding this comment

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

It's rendered as capitalized by default:

Suggested change
See :ref:`dependency-specifiers` for full details of the allowed format.
See :ref:`dependency specifiers <dependency-specifiers>` for full details of the allowed format.

``[extra1,extra2]``. These names are defined by the required
project, referring to specific features which may need extra
dependencies. The names MUST conform to the restrictions specified
by the ``Provides-Extra:`` field.
Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants