Skip to content

Commit 3b5f6f4

Browse files
authored
PEP 1 and 12: Remove optional Content-Type from templates (#3454)
1 parent b794468 commit 3b5f6f4

File tree

4 files changed

+3
-23
lines changed

4 files changed

+3
-23
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ repos:
109109
- id: check-required-headers
110110
name: "PEPs must have all required headers"
111111
language: pygrep
112-
entry: '(?-m:^PEP:(?=[\s\S]*\nTitle:)(?=[\s\S]*\nAuthor:)(?=[\s\S]*\nStatus:)(?=[\s\S]*\nType:)(?=[\s\S]*\nContent-Type:)(?=[\s\S]*\nCreated:))'
112+
entry: '(?-m:^PEP:(?=[\s\S]*\nTitle:)(?=[\s\S]*\nAuthor:)(?=[\s\S]*\nStatus:)(?=[\s\S]*\nType:)(?=[\s\S]*\nCreated:))'
113113
args: ['--negate', '--multiline']
114114
files: '^peps/pep-\d+\.rst$'
115115

116116
- id: check-header-order
117117
name: "PEP header order must follow PEP 12"
118118
language: pygrep
119-
entry: '^PEP:[^\n]+\nTitle:[^\n]+\n(Version:[^\n]+\n)?(Last-Modified:[^\n]+\n)?Author:[^\n]+\n( +\S[^\n]+\n)*(Sponsor:[^\n]+\n)?((PEP|BDFL)-Delegate:[^\n]*\n)?(Discussions-To:[^\n]*\n)?Status:[^\n]+\nType:[^\n]+\n(Topic:[^\n]+\n)?Content-Type:[^\n]+\n(Requires:[^\n]+\n)?Created:[^\n]+\n(Python-Version:[^\n]*\n)?(Post-History:[^\n]*\n( +\S[^\n]*\n)*)?(Replaces:[^\n]+\n)?(Superseded-By:[^\n]+\n)?(Resolution:[^\n]*\n)?\n'
119+
entry: '^PEP:[^\n]+\nTitle:[^\n]+\n(Version:[^\n]+\n)?(Last-Modified:[^\n]+\n)?Author:[^\n]+\n( +\S[^\n]+\n)*(Sponsor:[^\n]+\n)?((PEP|BDFL)-Delegate:[^\n]*\n)?(Discussions-To:[^\n]*\n)?Status:[^\n]+\nType:[^\n]+\n(Topic:[^\n]+\n)?(Content-Type:[^\n]+\n)?(Requires:[^\n]+\n)?Created:[^\n]+\n(Python-Version:[^\n]*\n)?(Post-History:[^\n]*\n( +\S[^\n]*\n)*)?(Replaces:[^\n]+\n)?(Superseded-By:[^\n]+\n)?(Resolution:[^\n]*\n)?\n'
120120
args: ['--negate', '--multiline']
121121
files: '^peps/pep-\d+\.rst$'
122122

peps/pep-0001.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Title: PEP Purpose and Guidelines
33
Author: Barry Warsaw, Jeremy Hylton, David Goodger, Nick Coghlan
44
Status: Active
55
Type: Process
6-
Content-Type: text/x-rst
76
Created: 13-Jun-2000
87
Post-History: 21-Mar-2001, 29-Jul-2002, 03-May-2003, 05-May-2012,
98
07-Apr-2013
@@ -610,7 +609,6 @@ optional and are described below. All other headers are required.
610609
Withdrawn | Final | Superseded>
611610
Type: <Standards Track | Informational | Process>
612611
* Topic: <Governance | Packaging | Release | Typing>
613-
* Content-Type: text/x-rst
614612
* Requires: <pep numbers>
615613
Created: <date created on, in dd-mmm-yyyy format>
616614
* Python-Version: <version number>
@@ -649,7 +647,7 @@ out.
649647
The PEP-Delegate field is used to record the individual appointed by the
650648
Steering Council to make the final decision on whether or not to approve or
651649
reject a PEP. (The delegate's email address is currently omitted due to a
652-
limitation in the email address masking for reStructuredText PEPs)
650+
limitation in the email address masking for reStructuredText PEPs.)
653651

654652
*Note: The Resolution header is required for Standards Track PEPs
655653
only. It contains a URL that should point to an email message or
@@ -668,11 +666,6 @@ The optional Topic header lists the special topic, if any,
668666
the PEP belongs under.
669667
See the :ref:`topic-index` for the existing topics.
670668

671-
The format of a PEP is specified with a Content-Type header.
672-
All PEPs must use reStructuredText (see :pep:`12`),
673-
and have a value of ``text/x-rst``, the default.
674-
Previously, plaintext PEPs used ``text/plain`` (see :pep:`9`).
675-
676669
The Created header records the date that the PEP was assigned a
677670
number, while Post-History is used to record the dates of and corresponding
678671
URLs to the Discussions-To threads for the PEP, with the former as the
@@ -878,13 +871,3 @@ Copyright
878871

879872
This document is placed in the public domain or under the
880873
CC0-1.0-Universal license, whichever is more permissive.
881-
882-
883-
..
884-
Local Variables:
885-
mode: indented-text
886-
indent-tabs-mode: nil
887-
sentence-end-double-space: t
888-
fill-column: 70
889-
coding: utf-8
890-
End:

peps/pep-0012.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Author: David Goodger <[email protected]>,
55
Brett Cannon <[email protected]>
66
Status: Active
77
Type: Process
8-
Content-Type: text/x-rst
98
Created: 05-Aug-2002
109
Post-History: `30-Aug-2002 <https://mail.python.org/archives/list/[email protected]/thread/KX3AS7QAY26QH3WIUAEOCCNXQ4V2TGGV/>`__
1110

@@ -174,7 +173,6 @@ your PEP):
174173
Status: Draft
175174
Type: [Standards Track | Informational | Process]
176175
Topic: *[Governance | Packaging | Release | Typing]
177-
Content-Type: text/x-rst
178176
Requires: *[NNN]
179177
Created: [DD-MMM-YYYY]
180178
Python-Version: *[M.N]

peps/pep-0012/pep-NNNN.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Discussions-To: <REQUIRED: URL of current canonical discussion thread>
77
Status: <REQUIRED: Draft | Active | Accepted | Provisional | Deferred | Rejected | Withdrawn | Final | Superseded>
88
Type: <REQUIRED: Standards Track | Informational | Process>
99
Topic: <Governance | Packaging | Release | Typing>
10-
Content-Type: text/x-rst
1110
Requires: <pep numbers>
1211
Created: <date created on, in dd-mmm-yyyy format>
1312
Python-Version: <version number>

0 commit comments

Comments
 (0)