Skip to content

Commit ccd8257

Browse files
hugovkAA-Turner
andauthored
PEP 12: Allow "Pending" as Discussions-To (#4361)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 75ed2c7 commit ccd8257

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

check-peps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ def _validate_discussions_to(line_num: int, line: str) -> MessageIterator:
303303
"""'Discussions-To' must be a thread URL"""
304304

305305
yield from _thread(line_num, line, "Discussions-To", discussions_to=True)
306+
if line == "Pending":
307+
return
306308
if line.startswith("https://"):
307309
return
308310
for suffix in "@python.org", "@googlegroups.com":
@@ -311,7 +313,7 @@ def _validate_discussions_to(line_num: int, line: str) -> MessageIterator:
311313
if re.fullmatch(r"[\w\-]+", remainder) is None:
312314
yield line_num, "Discussions-To must be a valid mailing list"
313315
return
314-
yield line_num, "Discussions-To must be a valid thread URL or mailing list"
316+
yield line_num, "Discussions-To must be a valid thread URL, mailing list, or 'Pending'"
315317

316318

317319
def _validate_status(line_num: int, line: str) -> MessageIterator:

pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_with_fake_pep():
3737
(14, "Topic must be for a valid sub-index"),
3838
(14, "Topic must be sorted lexicographically"),
3939
(16, "PEP references must be separated by comma-spaces (', ')"),
40-
(17, "Discussions-To must be a valid thread URL or mailing list"),
40+
(17, "Discussions-To must be a valid thread URL, mailing list, or 'Pending'"),
4141
(18, "Post-History must be a 'DD-mmm-YYYY' date: '2-Feb-2000'"),
4242
(18, "Post-History must be a valid thread URL"),
4343
(19, "Post-History must be a 'DD-mmm-YYYY' date: '3-Mar-2001'"),

pep_sphinx_extensions/tests/pep_lint/test_post_url.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@pytest.mark.parametrize(
66
"line",
77
[
8+
"Pending",
89
"list-name@python.org",
910
"distutils-sig@python.org",
1011
"csv@python.org",
@@ -52,7 +53,7 @@ def test_validate_discussions_to_invalid_list_domain(line: str):
5253
warning for (_, warning) in check_peps._validate_discussions_to(1, line)
5354
]
5455
assert warnings == [
55-
"Discussions-To must be a valid thread URL or mailing list"
56+
"Discussions-To must be a valid thread URL, mailing list, or 'Pending'"
5657
], warnings
5758

5859

peps/pep-0012.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ directions below.
8181
- Add the direct URL of the PEP's canonical discussion thread
8282
(on e.g. Python-Dev, Discourse, etc) under the Discussions-To header.
8383
If the thread will be created after the PEP is submitted as an official
84-
draft, it is okay to just list the venue name initially, but remember to
84+
draft, it is okay to just put "Pending" initially, but remember to
8585
update the PEP with the URL as soon as the PEP is successfully merged
8686
to the PEPs repository and you create the corresponding discussion thread.
8787
See :pep:`PEP 1 <1#discussing-a-pep>` for more details.

peps/pep-0012/pep-NNNN.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Title: <REQUIRED: pep title>
33
Author: <REQUIRED: list of authors' names and optionally, email addrs>
44
Sponsor: <name of sponsor>
55
PEP-Delegate: <PEP delegate's name>
6-
Discussions-To: <REQUIRED: URL of current canonical discussion thread>
6+
Discussions-To: Pending
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>

0 commit comments

Comments
 (0)