Skip to content

Commit e88d39a

Browse files
authored
Merge pull request #12434 from jeanas/pep-refs
Improve documentation usability by turning some PEP numbers into PUG links
2 parents 50e3c50 + 6fd8100 commit e88d39a

File tree

10 files changed

+32
-28
lines changed

10 files changed

+32
-28
lines changed

NEWS.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ Process
106106
Deprecations and Removals
107107
-------------------------
108108

109-
- Deprecate legacy version and version specifiers that don't conform to `PEP 440
110-
<https://peps.python.org/pep-0440/>`_ (`#12063 <https://github.com/pypa/pip/issues/12063>`_)
109+
- Deprecate legacy version and version specifiers that don't conform to the
110+
:ref:`specification <pypug:version-specifiers>`.
111+
(`#12063 <https://github.com/pypa/pip/issues/12063>`_)
111112
- ``freeze`` no longer excludes the ``setuptools``, ``distribute``, and ``wheel``
112113
from the output when running on Python 3.12 or later, where they are not
113114
included in a virtual environment by default. Use ``--exclude`` if you wish to

docs/html/cli/pip_install.rst

+12-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ each is, in the following order:
4949
otherwise pip will report an error).
5050
3. Local file (a sdist or wheel format archive, following the naming
5151
conventions for those formats).
52-
4. A requirement, as specified in :pep:`440`.
52+
4. A :ref:`version specifier <pypug:version-specifiers>`.
5353

5454
Each item identified is added to the set of requirements to be satisfied by
5555
the install.
@@ -97,7 +97,8 @@ Installation Order
9797
.. note::
9898

9999
This section is only about installation order of runtime dependencies, and
100-
does not apply to build dependencies (those are specified using PEP 518).
100+
does not apply to build dependencies (those are specified using the
101+
:ref:`[build-system] table <pypug:pyproject-build-system-table>`).
101102

102103
As of v6.1.0, pip installs dependencies before their dependents, i.e. in
103104
"topological order." This is the only commitment pip currently makes related
@@ -181,8 +182,9 @@ Pre-release Versions
181182
--------------------
182183

183184
Starting with v1.4, pip will only install stable versions as specified by
184-
`pre-releases`_ by default. If a version cannot be parsed as a compliant :pep:`440`
185-
version then it is assumed to be a pre-release.
185+
`pre-releases`_ by default. If a version cannot be parsed as a
186+
:ref:`compliant <pypug:version-specifiers>` version then it is assumed to be
187+
a pre-release.
186188

187189
If a Requirement specifier includes a pre-release or development version
188190
(e.g. ``>=0.0.dev0``) then pip will allow pre-release and development versions
@@ -214,8 +216,8 @@ pip looks for packages in a number of places: on PyPI (if not disabled via
214216
``--no-index``), in the local filesystem, and in any additional repositories
215217
specified via ``--find-links`` or ``--index-url``. There is no ordering in
216218
the locations that are searched. Rather they are all checked, and the "best"
217-
match for the requirements (in terms of version number - see :pep:`440` for
218-
details) is selected.
219+
match for the requirements (in terms of version number - see the
220+
:ref:`specification <pypug:version-specifiers>` for details) is selected.
219221

220222
See the :ref:`pip install Examples<pip install Examples>`.
221223

@@ -380,7 +382,8 @@ Examples
380382
py -m pip install -e "git+https://git.repo/some_pkg.git@feature#egg=SomePackage" # from 'feature' branch
381383
py -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
382384
383-
#. Install a package with `extras`_.
385+
#. Install a package with extras, i.e., optional dependencies
386+
(:ref:`specification <pypug:dependency-specifiers>`).
384387

385388
.. tab:: Unix/macOS
386389

@@ -418,7 +421,8 @@ Examples
418421
py -m pip install "./downloads/SomePackage-1.0.4.tar.gz"
419422
py -m pip install "http://my.package.repo/SomePackage-1.0.4.zip"
420423
421-
#. Install a particular source archive file following :pep:`440` direct references.
424+
#. Install a particular source archive file following direct references
425+
(:ref:`specification <pypug:dependency-specifiers>`).
422426

423427
.. tab:: Unix/macOS
424428

@@ -539,5 +543,4 @@ Examples
539543
540544
py -m pip install SomePackage1 SomePackage2 --no-binary SomePackage1
541545
542-
.. _extras: https://www.python.org/dev/peps/pep-0508/#extras
543546
.. _PyPI: https://pypi.org/

docs/html/cli/pip_wheel.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Differences to ``build``
3434
------------------------
3535

3636
`build <https://pypi.org/project/build/>`_ is a simple tool which can among other things build
37-
wheels for projects using PEP 517. It is comparable to the execution of ``pip wheel --no-deps .``.
37+
wheels for projects using the standard ``pyproject.toml``-based build interface. It
38+
is comparable to the execution of ``pip wheel --no-deps .``.
3839
It can also build source distributions which is not possible with ``pip``.
3940
``pip wheel`` covers the wheel scope of ``build`` but offers many additional features.
4041

docs/html/development/architecture/package-finding.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ example, whether a pre-release is eligible for selection or whether a file
182182
whose hash doesn't match is eligible depends on properties of the collection
183183
as a whole.
184184

185-
The ``CandidateEvaluator`` class uses information like the list of `PEP 425`_
186-
tags compatible with the target Python interpreter, hashes provided by the
185+
The ``CandidateEvaluator`` class uses information like the list of
186+
:ref:`platform tags <pypug:platform-compatibility-tags>`
187+
compatible with the target Python interpreter, hashes provided by the
187188
user, and other user preferences, etc.
188189

189190
Specifically, the class has a ``get_applicable_candidates()`` method.
@@ -236,5 +237,4 @@ The class is the return type of both the ``CandidateEvaluator`` class's
236237
``find_best_candidate()`` method.
237238

238239

239-
.. _`PEP 425`: https://www.python.org/dev/peps/pep-0425/
240240
.. _`PEP 503`: https://www.python.org/dev/peps/pep-0503/

docs/html/development/getting-started.rst

-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ in order to start contributing.
206206

207207
.. _`open an issue`: https://github.com/pypa/pip/issues/new?title=Trouble+with+pip+development+environment
208208
.. _`install Python`: https://realpython.com/installing-python/
209-
.. _`PEP 484 type-comments`: https://www.python.org/dev/peps/pep-0484/#suggested-syntax-for-python-2-7-and-straddling-code
210209
.. _`rich CLI`: https://docs.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests
211210
.. _`GitHub`: https://github.com/pypa/pip
212211
.. _`good first issues`: https://github.com/pypa/pip/labels/good%20first%20issue

docs/html/reference/inspect-report.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ The report is a JSON object with the following properties:
2727
distribution packages that are installed.
2828

2929
- `environment`: an object describing the environment where the installation report was
30-
generated. See [PEP 508 environment
31-
markers](https://peps.python.org/pep-0508/#environment-markers) for more information.
32-
Values have a string type.
30+
generated. See the section on environment markers in the {ref}`pypug:dependency-specifiers`
31+
specification for more information. Values have a string type.
3332

3433
(InspectReportItem)=
3534

docs/html/topics/more-dependency-resolution.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ feeding candidates to the resolver, and has a key role to play in selecting
9797
suitable candidates.
9898

9999
Note that the resolver is *only* relevant for packages fetched from an index.
100-
Candidates coming from other sources (local source directories, PEP 508
101-
direct URL references) do *not* go through the finder, and are merged with the
102-
candidates provided by the finder as part of the resolver's "provider"
103-
implementation.
100+
Candidates coming from other sources (local source directories, {ref}`direct
101+
URL references <pypug:dependency-specifiers>`) do *not* go through the finder,
102+
and are merged with the candidates provided by the finder as part of the resolver's
103+
"provider" implementation.
104104

105105
As well as determining what versions exist in the index for a given project,
106106
the finder selects the best distribution file to use for that candidate. This

docs/html/topics/vcs-support.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ pip also looks at the `egg` fragment specifying the "project name". In practice
140140
mode. In all other circumstances, the `egg` fragment is not necessary and its use is
141141
discouraged.
142142

143-
The `egg` fragment **should** be a bare
144-
[PEP 508](https://peps.python.org/pep-0508/) project name. Anything else
145-
is not guaranteed to work.
143+
The `egg` fragment **should** be a bare {ref}`project name <pypug:name-normalization>`.
144+
Anything else is not guaranteed to work.
146145

147146
````{admonition} Example
148147
If your repository layout is:

docs/html/user_guide.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Installing from Wheels
264264

265265
"Wheel" is a built, archive format that can greatly speed installation compared
266266
to building and installing from source archives. For more information, see the
267-
`Wheel docs <https://wheel.readthedocs.io>`_ , :pep:`427`, and :pep:`425`.
267+
:ref:`specification <pypug:binary-distribution-format>`.
268268

269269
pip prefers Wheels where they are available. To disable this, use the
270270
:ref:`--no-binary <install_--no-binary>` flag for :ref:`pip install`.
@@ -306,7 +306,8 @@ name:
306306
.. note::
307307

308308
In the future, the ``path[extras]`` syntax may become deprecated. It is
309-
recommended to use PEP 508 syntax wherever possible.
309+
recommended to use :ref:`standard <pypug:dependency-specifiers>`
310+
syntax wherever possible.
310311

311312
For the cases where wheels are not available, pip offers :ref:`pip wheel` as a
312313
convenience, to build wheels for all your requirements and dependencies.

news/12434.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace some links to PEPs with links to the canonical specifications on the :doc:`pypug:index`

0 commit comments

Comments
 (0)