Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions check-peps.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def _validate_python_version(line_num: int, line: str) -> MessageIterator:
def _validate_post_history(line_num: int, body: str) -> MessageIterator:
"""'Post-History' must be '`DD-mmm-YYYY <Thread URL>`__, …' or `DD-mmm-YYYY`"""

if body == "":
if body in ("", "Pending"):
return

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


def _validate_resolution(line_num: int, line: str) -> MessageIterator:
Expand Down
3 changes: 2 additions & 1 deletion pep_sphinx_extensions/tests/pep_lint/test_post_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def test_validate_discussions_to_invalid_list_domain(line: str):
"body",
[
"",
"Pending",
(
"01-Jan-2001, 02-Feb-2002,\n "
"03-Mar-2003, 04-Apr-2004,\n "
Expand Down Expand Up @@ -90,7 +91,7 @@ def test_validate_post_history_valid(body: str):
def test_validate_post_history_unbalanced_link(body: str):
warnings = [warning for (_, warning) in check_peps._validate_post_history(1, body)]
assert warnings == [
"post line must be a date or both start with “`” and end with “>`__”"
"post line must be a date or both start with “`” and end with “>`__”, or 'Pending'"
], warnings


Expand Down
2 changes: 1 addition & 1 deletion peps/pep-0012.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ directions below.
- Add a Topic header if the PEP belongs under one shown at the :ref:`topic-index`.
Most PEPs don't.

- Leave Post-History alone for now; you'll add dates and corresponding links
- Post-History can be 'Pending' for now; you'll add dates and corresponding links
to this header each time you post your PEP to the designated discussion forum
(and update the Discussions-To header with said link, as above).
For each thread, use the date (in the ``dd-mmm-yyy`` format) as the
Expand Down
2 changes: 1 addition & 1 deletion peps/pep-0012/pep-NNNN.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Topic: <Governance | Packaging | Release | Typing>
Requires: <pep numbers>
Created: <date created on, in dd-mmm-yyyy format>
Python-Version: <version number>
Post-History: <REQUIRED: dates, in dd-mmm-yyyy format, and corresponding links to PEP discussion threads>
Post-History: Pending
Replaces: <pep number>
Superseded-By: <pep number>
Resolution: <url>
Expand Down