Skip to content

Commit 12e696b

Browse files
matrixisebrettcannon
authored andcommitted
bpo-35042: Use the :pep: role where a PEP is specified (#10036)
1 parent 9e14e49 commit 12e696b

40 files changed

Lines changed: 95 additions & 94 deletions

Doc/distutils/apiref.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,11 +1393,11 @@ This module provides the :class:`FileList` class, used for poking about the
13931393
filesystem and building lists of files.
13941394

13951395

1396-
:mod:`distutils.log` --- Simple PEP 282-style logging
1397-
=====================================================
1396+
:mod:`distutils.log` --- Simple :pep:`282`-style logging
1397+
========================================================
13981398

13991399
.. module:: distutils.log
1400-
:synopsis: A simple logging mechanism, 282-style
1400+
:synopsis: A simple logging mechanism, :pep:`282`-style
14011401

14021402

14031403
:mod:`distutils.spawn` --- Spawn a sub-process

Doc/howto/clinic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ All Argument Clinic converters accept the following arguments:
765765

766766
``annotation``
767767
The annotation value for this parameter. Not currently supported,
768-
because PEP 8 mandates that the Python library may not use
768+
because :pep:`8` mandates that the Python library may not use
769769
annotations.
770770

771771
In addition, some converters accept additional arguments. Here is a list

Doc/library/abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
====================================
33

44
.. module:: abc
5-
:synopsis: Abstract base classes according to PEP 3119.
5+
:synopsis: Abstract base classes according to :pep:`3119`.
66

77
.. moduleauthor:: Guido van Rossum
88
.. sectionauthor:: Georg Brandl

Doc/library/pkgutil.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ support.
6363

6464
.. deprecated:: 3.3
6565
This emulation is no longer needed, as the standard import mechanism
66-
is now fully PEP 302 compliant and available in :mod:`importlib`.
66+
is now fully :pep:`302` compliant and available in :mod:`importlib`.
6767

6868

6969
.. class:: ImpLoader(fullname, file, filename, etc)
@@ -72,7 +72,7 @@ support.
7272

7373
.. deprecated:: 3.3
7474
This emulation is no longer needed, as the standard import mechanism
75-
is now fully PEP 302 compliant and available in :mod:`importlib`.
75+
is now fully :pep:`302` compliant and available in :mod:`importlib`.
7676

7777

7878
.. function:: find_loader(fullname)
@@ -86,7 +86,7 @@ support.
8686

8787
.. versionchanged:: 3.3
8888
Updated to be based directly on :mod:`importlib` rather than relying
89-
on the package internal PEP 302 import emulation.
89+
on the package internal :pep:`302` import emulation.
9090

9191
.. versionchanged:: 3.4
9292
Updated to be based on :pep:`451`
@@ -103,7 +103,7 @@ support.
103103

104104
.. versionchanged:: 3.3
105105
Updated to be based directly on :mod:`importlib` rather than relying
106-
on the package internal PEP 302 import emulation.
106+
on the package internal :pep:`302` import emulation.
107107

108108

109109
.. function:: get_loader(module_or_name)
@@ -118,7 +118,7 @@ support.
118118

119119
.. versionchanged:: 3.3
120120
Updated to be based directly on :mod:`importlib` rather than relying
121-
on the package internal PEP 302 import emulation.
121+
on the package internal :pep:`302` import emulation.
122122

123123
.. versionchanged:: 3.4
124124
Updated to be based on :pep:`451`
@@ -139,7 +139,7 @@ support.
139139

140140
.. versionchanged:: 3.3
141141
Updated to be based directly on :mod:`importlib` rather than relying
142-
on the package internal PEP 302 import emulation.
142+
on the package internal :pep:`302` import emulation.
143143

144144

145145
.. function:: iter_modules(path=None, prefix='')
@@ -160,7 +160,7 @@ support.
160160

161161
.. versionchanged:: 3.3
162162
Updated to be based directly on :mod:`importlib` rather than relying
163-
on the package internal PEP 302 import emulation.
163+
on the package internal :pep:`302` import emulation.
164164

165165

166166
.. function:: walk_packages(path=None, prefix='', onerror=None)
@@ -199,7 +199,7 @@ support.
199199

200200
.. versionchanged:: 3.3
201201
Updated to be based directly on :mod:`importlib` rather than relying
202-
on the package internal PEP 302 import emulation.
202+
on the package internal :pep:`302` import emulation.
203203

204204

205205
.. function:: get_data(package, resource)

Doc/library/test.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ The :mod:`test.support` module defines the following functions:
392392

393393
.. function:: make_legacy_pyc(source)
394394

395-
Move a PEP 3147/488 pyc file to its legacy pyc location and return the file
395+
Move a :pep:`3147`/:pep:`488` pyc file to its legacy pyc location and return the file
396396
system path to the legacy pyc file. The *source* value is the file system
397397
path to the source file. It does not need to exist, however the PEP
398398
3147/488 pyc file must exist.

Doc/library/typing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
========================================
33

44
.. module:: typing
5-
:synopsis: Support for type hints (see PEP 484).
5+
:synopsis: Support for type hints (see :pep:`484`).
66

77
.. versionadded:: 3.5
88

Doc/library/wsgiref.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ input, output, and error streams.
739739

740740
.. function:: read_environ()
741741

742-
Transcode CGI variables from ``os.environ`` to PEP 3333 "bytes in unicode"
742+
Transcode CGI variables from ``os.environ`` to :pep:`3333` "bytes in unicode"
743743
strings, returning a new dictionary. This function is used by
744744
:class:`CGIHandler` and :class:`IISCGIHandler` in place of directly using
745745
``os.environ``, which is not necessarily WSGI-compliant on all platforms

Doc/library/zipimport.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ doesn't contain :file:`.pyc` files, importing may be rather slow.
3939

4040
:pep:`273` - Import Modules from Zip Archives
4141
Written by James C. Ahlstrom, who also provided an implementation. Python 2.3
42-
follows the specification in PEP 273, but uses an implementation written by Just
43-
van Rossum that uses the import hooks described in PEP 302.
42+
follows the specification in :pep:`273`, but uses an implementation written by Just
43+
van Rossum that uses the import hooks described in :pep:`302`.
4444

4545
:pep:`302` - New Import Hooks
4646
The PEP to add the import hooks that help this module work.

Doc/whatsnew/2.0.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ python-dev. Therefore, a relatively formal process has been set up to write
111111
Python Enhancement Proposals (PEPs), modelled on the Internet RFC process. PEPs
112112
are draft documents that describe a proposed new feature, and are continually
113113
revised until the community reaches a consensus, either accepting or rejecting
114-
the proposal. Quoting from the introduction to PEP 1, "PEP Purpose and
114+
the proposal. Quoting from the introduction to :pep:`1`, "PEP Purpose and
115115
Guidelines":
116116

117117

@@ -127,11 +127,11 @@ Guidelines":
127127
that have gone into Python. The PEP author is responsible for building
128128
consensus within the community and documenting dissenting opinions.
129129

130-
Read the rest of PEP 1 for the details of the PEP editorial process, style, and
130+
Read the rest of :pep:`1` for the details of the PEP editorial process, style, and
131131
format. PEPs are kept in the Python CVS tree on SourceForge, though they're not
132132
part of the Python 2.0 distribution, and are also available in HTML form from
133133
https://www.python.org/dev/peps/. As of September 2000, there are 25 PEPS, ranging
134-
from PEP 201, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
134+
from :pep:`201`, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
135135
Operators".
136136

137137
.. ======================================================================

Doc/whatsnew/2.1.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ anyway).
112112

113113
Compatibility concerns have led to nested scopes being introduced gradually; in
114114
Python 2.1, they aren't enabled by default, but can be turned on within a module
115-
by using a future statement as described in PEP 236. (See the following section
116-
for further discussion of PEP 236.) In Python 2.2, nested scopes will become
115+
by using a future statement as described in :pep:`236`. (See the following section
116+
for further discussion of :pep:`236`.) In Python 2.2, nested scopes will become
117117
the default and there will be no way to turn them off, but users will have had
118118
all of 2.1's lifetime to fix any breakage resulting from their introduction.
119119

@@ -213,7 +213,7 @@ otherwise it will call the appropriate method and can return any Python object.
213213

214214
There are also corresponding changes of interest to C programmers; there's a new
215215
slot ``tp_richcmp`` in type objects and an API for performing a given rich
216-
comparison. I won't cover the C API here, but will refer you to PEP 207, or to
216+
comparison. I won't cover the C API here, but will refer you to :pep:`207`, or to
217217
2.1's C API documentation, for the full list of related functions.
218218

219219

@@ -548,7 +548,7 @@ registering software at the Vaults is optional, and many people don't bother.
548548
As a first small step toward fixing the problem, Python software packaged using
549549
the Distutils :command:`sdist` command will include a file named
550550
:file:`PKG-INFO` containing information about the package such as its name,
551-
version, and author (metadata, in cataloguing terminology). PEP 241 contains
551+
version, and author (metadata, in cataloguing terminology). :pep:`241` contains
552552
the full list of fields that can be present in the :file:`PKG-INFO` file. As
553553
people began to package their software using Python 2.1, more and more packages
554554
will include metadata, making it possible to build automated cataloguing systems
@@ -561,7 +561,7 @@ package to a catalog server.
561561
You can start creating packages containing :file:`PKG-INFO` even if you're not
562562
using Python 2.1, since a new release of the Distutils will be made for users of
563563
earlier Python versions. Version 1.0.2 of the Distutils includes the changes
564-
described in PEP 241, as well as various bugfixes and enhancements. It will be
564+
described in :pep:`241`, as well as various bugfixes and enhancements. It will be
565565
available from the Distutils SIG at https://www.python.org/community/sigs/current/distutils-sig/.
566566

567567

0 commit comments

Comments
 (0)