Skip to content

Commit b271d2b

Browse files
authored
Replace PEP references with PUG links (#750)
1 parent a2b3e34 commit b271d2b

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

docs/markers.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Markers
55

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

1011
Usage
1112
-----
@@ -51,7 +52,7 @@ Reference
5152

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

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

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

7275
.. exception:: InvalidMarker
7376

7477
Raised when attempting to create a :class:`Marker` with a string that
75-
does not conform to PEP 508.
78+
does not conform to the specification.
7679

7780

7881
.. exception:: UndefinedComparison
7982

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

8388

8489
.. exception:: UndefinedEnvironmentName
8590

8691
Raised when attempting to evaluate a :class:`Marker` with a value that is
8792
missing from the evaluation environment.
88-
89-
90-
.. _`PEP 508`: https://www.python.org/dev/peps/pep-0508/

docs/requirements.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ Requirements
44
.. currentmodule:: packaging.requirements
55

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

1011
Usage
1112
-----
@@ -60,8 +61,8 @@ Usage
6061

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

6768
Reference
@@ -70,7 +71,7 @@ Reference
7071
.. class:: Requirement(requirement)
7172

7273
This class abstracts handling the details of a requirement for a project.
73-
Each requirement will be parsed according to PEP 508.
74+
Each requirement will be parsed according to the specification.
7475

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

101102
Raised when attempting to create a :class:`Requirement` with a string that
102-
does not conform to PEP 508.
103-
104-
.. _`PEP 508`: https://www.python.org/dev/peps/pep-0508/
103+
does not conform to the specification.

docs/utils.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ Reference
8585

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

9091
.. doctest::
9192

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

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

0 commit comments

Comments
 (0)