Skip to content

Commit c444db0

Browse files
authored
PEP 12: Allow Pending as Post-History (#4670)
1 parent 8851590 commit c444db0

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

check-peps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def _validate_python_version(line_num: int, line: str) -> MessageIterator:
401401
def _validate_post_history(line_num: int, body: str) -> MessageIterator:
402402
"""'Post-History' must be '`DD-mmm-YYYY <Thread URL>`__, …' or `DD-mmm-YYYY`"""
403403

404-
if body == "":
404+
if body in ("", "Pending"):
405405
return
406406

407407
for offset, line in enumerate(body.removesuffix(",").split("\n"), start=line_num):
@@ -414,7 +414,7 @@ def _validate_post_history(line_num: int, body: str) -> MessageIterator:
414414
yield from _date(offset, post_date, "Post-History")
415415
yield from _thread(offset, post_url, "Post-History")
416416
else:
417-
yield offset, "post line must be a date or both start with “`” and end with “>`__”"
417+
yield offset, "post line must be a date or both start with “`” and end with “>`__”, or 'Pending'"
418418

419419

420420
def _validate_resolution(line_num: int, line: str) -> MessageIterator:

pep_sphinx_extensions/tests/pep_lint/test_post_url.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def test_validate_discussions_to_invalid_list_domain(line: str):
6161
"body",
6262
[
6363
"",
64+
"Pending",
6465
(
6566
"01-Jan-2001, 02-Feb-2002,\n "
6667
"03-Mar-2003, 04-Apr-2004,\n "
@@ -90,7 +91,7 @@ def test_validate_post_history_valid(body: str):
9091
def test_validate_post_history_unbalanced_link(body: str):
9192
warnings = [warning for (_, warning) in check_peps._validate_post_history(1, body)]
9293
assert warnings == [
93-
"post line must be a date or both start with “`” and end with “>`__”"
94+
"post line must be a date or both start with “`” and end with “>`__”, or 'Pending'"
9495
], warnings
9596

9697

peps/pep-0012.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ directions below.
119119
- Add a Topic header if the PEP belongs under one shown at the :ref:`topic-index`.
120120
Most PEPs don't.
121121

122-
- Leave Post-History alone for now; you'll add dates and corresponding links
122+
- Post-History can be 'Pending' for now; you'll add dates and corresponding links
123123
to this header each time you post your PEP to the designated discussion forum
124124
(and update the Discussions-To header with said link, as above).
125125
For each thread, use the date (in the ``dd-mmm-yyy`` format) as the

peps/pep-0012/pep-NNNN.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Topic: <Governance | Packaging | Release | Typing>
1010
Requires: <pep numbers>
1111
Created: <date created on, in dd-mmm-yyyy format>
1212
Python-Version: <version number>
13-
Post-History: <REQUIRED: dates, in dd-mmm-yyyy format, and corresponding links to PEP discussion threads>
13+
Post-History: Pending
1414
Replaces: <pep number>
1515
Superseded-By: <pep number>
1616
Resolution: <url>

0 commit comments

Comments
 (0)