diff --git a/docs/markers.rst b/docs/markers.rst index 2ca012ec..d3b7676d 100644 --- a/docs/markers.rst +++ b/docs/markers.rst @@ -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 ` +defines the scheme which has been implemented by this module. Usage ----- @@ -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 @@ -63,8 +64,10 @@ 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 + `. :raises: UndefinedEnvironmentName: If the marker accesses a value that isn't present inside of the environment dictionary. @@ -72,19 +75,18 @@ Reference .. 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 + `. .. 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/ diff --git a/docs/requirements.rst b/docs/requirements.rst index 2c71ec2b..60c4bec6 100644 --- a/docs/requirements.rst +++ b/docs/requirements.rst @@ -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 +`, which defines the scheme that has been +implemented by this module. Usage ----- @@ -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 @@ -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, @@ -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. diff --git a/docs/utils.rst b/docs/utils.rst index 6c552555..ff2ca31a 100644 --- a/docs/utils.rst +++ b/docs/utils.rst @@ -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 + `. .. doctest:: @@ -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