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

Replace PEP references with PUG links #750

Merged
merged 1 commit into from Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 12 additions & 10 deletions docs/markers.rst
Expand Up @@ -5,7 +5,8 @@ Markers

One extra requirement of dealing with dependencies is the ability to specify
if it is required depending on the operating system or Python version in use.
`PEP 508`_ defines the scheme which has been implemented by this module.
The :ref:`specification of dependency specifiers <pypug:dependency-specifiers>`
defines the scheme which has been implemented by this module.

Usage
-----
Expand Down Expand Up @@ -51,7 +52,7 @@ Reference

This class abstracts handling markers for dependencies of a project. It can
be passed a single marker or multiple markers that are ANDed or ORed
together. Each marker will be parsed according to PEP 508.
together. Each marker will be parsed according to the specification.

:param str markers: The string representation of a marker or markers.
:raises InvalidMarker: If the given ``markers`` are not parseable, then
Expand All @@ -63,28 +64,29 @@ Reference

:param dict environment: A dictionary containing keys and values to
override the detected environment.
:raises: UndefinedComparison: If the marker uses a PEP 440 comparison on
strings which are not valid PEP 440 versions.
:raises: UndefinedComparison: If the marker uses a comparison on strings
which are not valid versions per the
:ref:`specification of version specifiers
<pypug:version-specifiers>`.
:raises: UndefinedEnvironmentName: If the marker accesses a value that
isn't present inside of the environment
dictionary.

.. exception:: InvalidMarker

Raised when attempting to create a :class:`Marker` with a string that
does not conform to PEP 508.
does not conform to the specification.


.. exception:: UndefinedComparison

Raised when attempting to evaluate a :class:`Marker` with a PEP 440
comparison operator against values that are not valid PEP 440 versions.
Raised when attempting to evaluate a :class:`Marker` with a
comparison operator against values that are not valid
versions per the :ref:`specification of version specifiers
<pypug:version-specifiers>`.


.. exception:: UndefinedEnvironmentName

Raised when attempting to evaluate a :class:`Marker` with a value that is
missing from the evaluation environment.


.. _`PEP 508`: https://www.python.org/dev/peps/pep-0508/
15 changes: 7 additions & 8 deletions docs/requirements.rst
Expand Up @@ -4,8 +4,9 @@ Requirements
.. currentmodule:: packaging.requirements

Parse a given requirements line for specifying dependencies of a Python
project, using `PEP 508`_ which defines the scheme that has been implemented
by this module.
project, using the :ref:`specification of dependency specifiers
<pypug:dependency-specifiers>`, which defines the scheme that has been
implemented by this module.

Usage
-----
Expand Down Expand Up @@ -60,8 +61,8 @@ Usage

When a requirement is specified with a URL, the :class:`Requirement` class
used to check the URL and reject values containing invalid scheme and
netloc combinations. This is no longer performed since PEP 508 does not
specify such rules, and the check incorrectly disallows valid requirement
netloc combinations. This is no longer performed since the specification does
not have such rules, and the check incorrectly disallows valid requirement
strings from being parsed.

Reference
Expand All @@ -70,7 +71,7 @@ Reference
.. class:: Requirement(requirement)

This class abstracts handling the details of a requirement for a project.
Each requirement will be parsed according to PEP 508.
Each requirement will be parsed according to the specification.

:param str requirement: The string representation of a requirement.
:raises InvalidRequirement: If the given ``requirement`` is not parseable,
Expand Down Expand Up @@ -99,6 +100,4 @@ Reference
.. exception:: InvalidRequirement

Raised when attempting to create a :class:`Requirement` with a string that
does not conform to PEP 508.

.. _`PEP 508`: https://www.python.org/dev/peps/pep-0508/
does not conform to the specification.
4 changes: 2 additions & 2 deletions docs/utils.rst
Expand Up @@ -85,7 +85,8 @@ Reference

:param str filename: The name of the wheel file.
:raises InvalidWheelFilename: If the filename in question
does not follow conventions outlined in `PEP 427`_.
does not follow the :ref:`wheel specification
<pypug:binary-distribution-format>`.

.. doctest::

Expand Down Expand Up @@ -137,4 +138,3 @@ Reference
Raised when a source distribution file name is considered invalid.

.. _Source distribution format: https://packaging.python.org/specifications/source-distribution-format/#source-distribution-file-name
.. _`PEP 427`: https://peps.python.org/pep-0427/#file-name-convention