Skip to content

Commit 113e490

Browse files
authored
Several PEPs: Use explicit :pep: and :rfc: roles (#2209)
1 parent cf5b6b1 commit 113e490

File tree

394 files changed

+2661
-3596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+2661
-3596
lines changed

pep-0001.txt

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ Python's Steering Council
8080

8181
There are several references in this PEP to the "Steering Council" or "Council".
8282
This refers to the current members of the elected Steering Council described
83-
in PEP 13 [5]_, in their role as the final authorities on whether or not PEPs
83+
in :pep:`13`, in their role as the final authorities on whether or not PEPs
8484
will be accepted or rejected.
8585

8686

8787
Python's Core Developers
8888
------------------------
8989

9090
There are several references in this PEP to "core developers". This refers to
91-
the currently active Python core team members described in PEP 13 [5]_.
91+
the currently active Python core team members described in :pep:`13`.
9292

9393

9494
Python's BDFL
@@ -188,23 +188,23 @@ The standard PEP workflow is:
188188
"Informational", or "Process" as appropriate, and for the "Status:"
189189
field enter "Draft". For full details, see `PEP Header Preamble`_.
190190

191-
* Update `.github/CODEOWNERS` [7]_ such that any co-author(s) or sponsors
191+
* Update `.github/CODEOWNERS` [3]_ such that any co-author(s) or sponsors
192192
with write access to the `PEP repository`_ are listed for your new file.
193193
This ensures any future pull requests changing the file will be assigned
194194
to them.
195195

196196
* Push this to your GitHub fork and submit a pull request.
197197

198198
* The PEP editors review your PR for structure, formatting, and other
199-
errors. For a reST-formatted PEP, PEP 12 is provided as a template.
199+
errors. For a reST-formatted PEP, :pep:`12` is provided as a template.
200200
It also provides a complete introduction to reST markup that is used
201201
in PEPs. Approval criteria are:
202202

203203
* It sound and complete. The ideas must make technical sense. The
204204
editors do not consider whether they seem likely to be accepted.
205205
* The title accurately describes the content.
206206
* The PEP's language (spelling, grammar, sentence structure, etc.)
207-
and code style (examples should match PEP 8 & PEP 7) should be
207+
and code style (examples should match :pep:`8` & :pep:`7`) should be
208208
correct and conformant. The PEP will be checked for formatting
209209
(plain text or reStructuredText) by Travis CI, and will not be
210210
approved until this passes.
@@ -283,16 +283,16 @@ The final authority for PEP approval is the Steering Council. However, whenever
283283
a new PEP is put forward, any core developer that believes they are suitably
284284
experienced to make the final decision on that PEP may offer to serve as
285285
the PEP-Delegate for that PEP, and they will then have the
286-
authority to approve (or reject) that PEP.
286+
authority to approve (or reject) that PEP.
287287

288288
The term "PEP-Delegate" is used under the Steering
289289
Council governance model. The PEP's designated decision maker,
290290
the "PEP-Delegate" with the Steering Council's support, is
291291
recorded in the "PEP-Delegate" field in the PEP's header. For
292292
PEPs written prior to the Steering Council's governance model, the field name
293293
"BDFL-Delegate" will still be kept.
294-
The terms PEP-Delegate and BDFL-Delegate may be used interchangeably in
295-
discussion. PEP-Delegate is the preferred term under the Steering Council
294+
The terms PEP-Delegate and BDFL-Delegate may be used interchangeably in
295+
discussion. PEP-Delegate is the preferred term under the Steering Council
296296
governance model.
297297

298298
Individuals offering to serve as PEP-Delegate should notify the Steering
@@ -343,7 +343,7 @@ implementation, if applicable, must be solid and must not complicate
343343
the interpreter unduly. Finally, a proposed enhancement must be
344344
"pythonic" in order to be accepted by the Steering Council. (However,
345345
"pythonic" is an imprecise term; it may be defined as whatever is acceptable to
346-
the Steering Council. This logic is intentionally circular.) See PEP 2 [2]_
346+
the Steering Council. This logic is intentionally circular.) See :pep:`2`
347347
for standard library module acceptance criteria.
348348

349349
Once a PEP has been accepted, the reference implementation must be
@@ -362,7 +362,7 @@ been included in a Python release*.
362362
Wherever possible, it is considered preferable to reduce the scope of a proposal
363363
to avoid the need to rely on the "Provisional" status (e.g. by deferring some
364364
features to later PEPs), as this status can lead to version compatibility
365-
challenges in the wider Python ecosystem. PEP 411 provides additional details
365+
challenges in the wider Python ecosystem. :pep:`411` provides additional details
366366
on potential use cases for the Provisional status.
367367

368368
A PEP can also be assigned the status "Deferred". The PEP author or an
@@ -400,7 +400,7 @@ deprecation process (which may require a new PEP providing the rationale for
400400
the deprecation).
401401

402402
Some Informational and Process PEPs may also have a status of "Active"
403-
if they are never meant to be completed. E.g. PEP 1 (this PEP).
403+
if they are never meant to be completed. E.g. :pep:`1` (this PEP).
404404

405405

406406
PEP Maintenance
@@ -427,7 +427,7 @@ What belongs in a successful PEP?
427427

428428
Each PEP should have the following parts/sections:
429429

430-
1. Preamble -- RFC 822 style headers containing meta-data about the
430+
1. Preamble -- :rfc:`2822` style headers containing meta-data about the
431431
PEP, including the PEP number, a short descriptive title (limited
432432
to a maximum of 44 characters), the names, and optionally the
433433
contact info for each author, etc.
@@ -519,17 +519,18 @@ PEP Formats and Templates
519519

520520
PEPs are UTF-8 encoded text files using the reStructuredText_ format.
521521
ReStructuredText_ allows for rich markup that is still quite easy to
522-
read, but also results in good-looking and functional HTML. PEP 12
523-
contains instructions and a template [4]_ for reStructuredText PEPs.
522+
read, but also results in good-looking and functional HTML. :pep:`12`
523+
contains instructions and a :pep:`template <12#suggested-sections>`
524+
for reStructuredText PEPs.
524525

525-
The PEP text files are automatically converted to HTML [6]_ for easier
526+
The PEP text files are automatically converted to HTML [2]_ for easier
526527
`online reading <https://www.python.org/dev/peps/>`__.
527528

528529

529530
PEP Header Preamble
530531
===================
531532

532-
Each PEP must begin with an RFC 822 style header preamble. The headers
533+
Each PEP must begin with an :rfc:`2822` style header preamble. The headers
533534
must appear in the following order. Headers marked with "*" are
534535
optional and are described below. All other headers are required. ::
535536

@@ -567,7 +568,7 @@ PEPs must use the mandated format above, and it is acceptable to
567568
change to this format when PEPs are updated.
568569

569570
If there are multiple authors, each should be on a separate line
570-
following RFC 2822 continuation line conventions. Note that personal
571+
following :rfc:`2822` continuation line conventions. Note that personal
571572
email addresses in PEPs will be obscured as a defense against spam
572573
harvesters.
573574

@@ -598,8 +599,8 @@ The Type header specifies the type of PEP: Standards Track,
598599
Informational, or Process.
599600

600601
The format of a PEP is specified with a Content-Type header. The
601-
acceptable values are "text/plain" for plaintext PEPs (see PEP 9 [3]_)
602-
and "text/x-rst" for reStructuredText PEPs (see PEP 12 [4]_).
602+
acceptable values are "text/plain" for plaintext PEPs (see :pep:`9`)
603+
and "text/x-rst" for reStructuredText PEPs (see :pep:`12`).
603604
reStructuredText is strongly preferred, but for backwards
604605
compatibility plain text is currently still the default if no
605606
Content-Type header is present.
@@ -709,11 +710,11 @@ For each new PEP that comes in an editor does the following:
709710
* The file name extension is correct (i.e. ``.rst``).
710711

711712
* Ensure that everyone listed as a sponsor or co-author of the PEP who has write
712-
access to the `PEP repository`_ is added to `.github/CODEOWNERS` [7]_.
713+
access to the `PEP repository`_ is added to `.github/CODEOWNERS` [3]_.
713714

714715
* Skim the PEP for obvious defects in language (spelling, grammar,
715716
sentence structure, etc.), and code style (examples should conform to
716-
PEP 8 & PEP 7). Editors may correct problems themselves, but are
717+
:pep:`8` & :pep:`7`). Editors may correct problems themselves, but are
717718
not required to do so. (Text format is checked by Travis CI.)
718719

719720
* If a project is portrayed as benefiting from or supporting the PEP, make sure
@@ -723,7 +724,7 @@ For each new PEP that comes in an editor does the following:
723724

724725
If the PEP isn't ready, an editor will send it back to the author for
725726
revision, with specific instructions. If reST formatting is a
726-
problem, ask the author(s) to use PEP 12 as a template and resubmit.
727+
problem, ask the author(s) to use :pep:`12` as a template and resubmit.
727728

728729
Once the PEP is ready for the repository, a PEP editor will:
729730

@@ -789,23 +790,11 @@ References and Footnotes
789790
for retrieving older revisions, and can also be browsed via HTTP here:
790791
https://github.com/python/peps
791792

792-
.. [2] PEP 2, Procedure for Adding New Modules
793-
(http://www.python.org/dev/peps/pep-0002)
794-
795-
.. [3] PEP 9, Sample Plaintext PEP Template
796-
(http://www.python.org/dev/peps/pep-0009)
797-
798-
.. [4] PEP 12, Sample reStructuredText PEP Template
799-
(http://www.python.org/dev/peps/pep-0012)
800-
801-
.. [5] PEP 13, Python Language Governance
802-
(http://www.python.org/dev/peps/pep-0013)
803-
804-
.. [6] More details on the PEP rendering and publication process can be found
793+
.. [2] More details on the PEP rendering and publication process can be found
805794
in the PEPs repo README at
806795
https://github.com/python/peps/blob/main/README.rst
807796

808-
.. [7] `CODEOWNERS` documentation
797+
.. [3] `CODEOWNERS` documentation
809798
(https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners)
810799

811800
.. _issue tracker:

pep-0002.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ the library; things that are missing but should be added.
3535

3636
New functionality is commonly added to the library in the form of new
3737
modules. This PEP will describe the procedure for the *addition* of
38-
new modules. PEP 4 deals with procedures for deprecation of modules;
38+
new modules. :pep:`4` deals with procedures for deprecation of modules;
3939
the *removal* of old and unused modules from the standard library.
4040
Finally there is also the issue of *changing* existing modules to make
41-
the picture of library evolution complete. PEP 3 and PEP 5 give some
41+
the picture of library evolution complete. :pep:`3` and :pep:`5` give some
4242
guidelines on this. The continued maintenance of existing modules is
4343
an integral part of the decision on whether to add a new module to the
4444
standard library. Therefore, this PEP also introduces concepts
@@ -101,7 +101,7 @@ One or more maintainers shall step forward as PEP champion (the people
101101
listed in the Author field are the champions). The PEP champion(s)
102102
shall be the initial head maintainer(s).
103103

104-
As described in PEP 1, a standards track PEP should consist of a
104+
As described in :pep:`1`, a standards track PEP should consist of a
105105
design document and a reference implementation. The library PEP
106106
differs from a normal standard track PEP in that the reference
107107
implementation should in this case always already have been written
@@ -126,7 +126,7 @@ This different requirement exists for the following reasons:
126126

127127
Once the library PEP has been submitted for review, the integrators
128128
will then evaluate it. The PEP will follow the normal PEP work flow
129-
as described in PEP 1. If the PEP is accepted, they will work through
129+
as described in :pep:`1`. If the PEP is accepted, they will work through
130130
the head maintainers to make the contribution ready for integration.
131131

132132

@@ -155,7 +155,7 @@ In the case where no head maintainer can be found (possibly because
155155
there are no maintainers left), the integrators will issue a call to
156156
the community at large asking for new maintainers to step forward. If
157157
no one does, the integrators can decide to declare the contribution
158-
deprecated as described in PEP 4.
158+
deprecated as described in :pep:`4`.
159159

160160

161161
Open issues

pep-0003.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Original Guidelines
3535
out, say, what all the open Tkinter bugs are.
3636

3737
2. If it's a minor feature request that you don't plan to address
38-
right away, add it to PEP 42 or ask the owner to add it for you.
39-
If you add the bug to PEP 42, mark the bug as "feature request",
38+
right away, add it to :pep:`42` or ask the owner to add it for you.
39+
If you add the bug to :pep:`42`, mark the bug as "feature request",
4040
"later", and "closed"; and add a comment to the bug saying that
4141
this is the case (mentioning the PEP explicitly).
4242

pep-0004.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For modules existing in both Python 2.7 and Python 3.5
5656
In order to facilitate writing code that works in both Python 2 & 3
5757
simultaneously, any module that exists in both Python 3.5 and
5858
Python 2.7 will not be removed from the standard library until
59-
Python 2.7 is no longer supported as specified by PEP 373. Exempted
59+
Python 2.7 is no longer supported as specified by :pep:`373`. Exempted
6060
from this rule is any module in the idlelib package as well as any
6161
exceptions granted by the Python development team.
6262

@@ -293,7 +293,7 @@ Deprecated modules
293293
Deprecation of modules removed in Python 3.0
294294
============================================
295295

296-
PEP 3108 lists all modules that have been removed from Python 3.0.
296+
:pep:`3108` lists all modules that have been removed from Python 3.0.
297297
They all are documented as deprecated in Python 2.6, and raise a
298298
DeprecationWarning if the -3 flag is activated.
299299

pep-0006.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ the maintenance branch, or else mark the patch in the commit message.
143143

144144
In addition, anyone from the Python community is free to suggest
145145
patches for inclusion. Patches may be submitted specifically for
146-
bugfix releases; they should follow the guidelines in PEP 3 [2]_. In
146+
bugfix releases; they should follow the guidelines in :pep:`3`. In
147147
general, though, it's probably better that a bug in a specific release
148148
also be fixed on the HEAD as well as the branch.
149149

@@ -194,7 +194,7 @@ sticking with a strict bug fix policy.
194194
Following feedback from the BDFL and others, the draft PEP was written
195195
containing an expanded bugfix release cycle that permitted any
196196
previous major release to obtain patches and also relaxed the strict
197-
bug fix requirement (mainly due to the example of PEP 235 [3]_, which
197+
bug fix requirement (mainly due to the example of :pep:`235`, which
198198
could be argued as either a bug fix or a feature).
199199

200200
Discussion then mostly moved to python-dev, where BDFL finally issued
@@ -213,13 +213,6 @@ References
213213
.. [1] http://www.tcl.tk/cgi-bin/tct/tip/28.html
214214

215215

216-
.. [2] PEP 3, Guidelines for Handling Bug Reports, Hylton
217-
(http://www.python.org/dev/peps/pep-0003/)
218-
219-
.. [3] PEP 235, Import on Case-Insensitive Platforms, Peters
220-
(http://www.python.org/dev/peps/pep-0235/)
221-
222-
223216
Copyright
224217
=========
225218

pep-0007.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Introduction
1515

1616
This document gives coding conventions for the C code comprising the C
1717
implementation of Python. Please see the companion informational PEP
18-
describing style guidelines for Python code [1]_.
18+
describing :pep:`style guidelines for Python code <8>`.
1919

2020
Note, rules are there to be broken. Two good reasons to break a
2121
particular rule:
@@ -217,13 +217,6 @@ Documentation Strings
217217
not all do; the MSVC compiler is known to complain about this.
218218

219219

220-
References
221-
==========
222-
223-
.. [1] PEP 8, "Style Guide for Python Code", van Rossum, Warsaw
224-
(http://www.python.org/dev/peps/pep-0008)
225-
226-
227220
Copyright
228221
=========
229222

0 commit comments

Comments
 (0)