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: 3 additions & 1 deletion check-peps.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ def _validate_discussions_to(line_num: int, line: str) -> MessageIterator:
"""'Discussions-To' must be a thread URL"""

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


def _validate_status(line_num: int, line: str) -> MessageIterator:
Expand Down
2 changes: 1 addition & 1 deletion pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_with_fake_pep():
(14, "Topic must be for a valid sub-index"),
(14, "Topic must be sorted lexicographically"),
(16, "PEP references must be separated by comma-spaces (', ')"),
(17, "Discussions-To must be a valid thread URL or mailing list"),
(17, "Discussions-To must be a valid thread URL, mailing list, or 'Pending'"),
(18, "Post-History must be a 'DD-mmm-YYYY' date: '2-Feb-2000'"),
(18, "Post-History must be a valid thread URL"),
(19, "Post-History must be a 'DD-mmm-YYYY' date: '3-Mar-2001'"),
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 @@ -5,6 +5,7 @@
@pytest.mark.parametrize(
"line",
[
"Pending",
"list-name@python.org",
"distutils-sig@python.org",
"csv@python.org",
Expand Down Expand Up @@ -52,7 +53,7 @@ def test_validate_discussions_to_invalid_list_domain(line: str):
warning for (_, warning) in check_peps._validate_discussions_to(1, line)
]
assert warnings == [
"Discussions-To must be a valid thread URL or mailing list"
"Discussions-To must be a valid thread URL, mailing list, 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 @@ -81,7 +81,7 @@ directions below.
- Add the direct URL of the PEP's canonical discussion thread
(on e.g. Python-Dev, Discourse, etc) under the Discussions-To header.
If the thread will be created after the PEP is submitted as an official
draft, it is okay to just list the venue name initially, but remember to
draft, it is okay to just put "Pending" initially, but remember to
update the PEP with the URL as soon as the PEP is successfully merged
to the PEPs repository and you create the corresponding discussion thread.
See :pep:`PEP 1 <1#discussing-a-pep>` for more details.
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 @@ -3,7 +3,7 @@ Title: <REQUIRED: pep title>
Author: <REQUIRED: list of authors' names and optionally, email addrs>
Sponsor: <name of sponsor>
PEP-Delegate: <PEP delegate's name>
Discussions-To: <REQUIRED: URL of current canonical discussion thread>
Discussions-To: Pending
Status: <REQUIRED: Draft | Active | Accepted | Provisional | Deferred | Rejected | Withdrawn | Final | Superseded>
Type: <REQUIRED: Standards Track | Informational | Process>
Topic: <Governance | Packaging | Release | Typing>
Expand Down