diff --git a/check-peps.py b/check-peps.py index 57a0a7d7b3f..2db5ddc9800 100755 --- a/check-peps.py +++ b/check-peps.py @@ -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": @@ -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: diff --git a/pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py b/pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py index b1595b2f22d..0bae63aaabe 100644 --- a/pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py +++ b/pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py @@ -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'"), diff --git a/pep_sphinx_extensions/tests/pep_lint/test_post_url.py b/pep_sphinx_extensions/tests/pep_lint/test_post_url.py index 15d4739a5b1..40b1dd27ecc 100644 --- a/pep_sphinx_extensions/tests/pep_lint/test_post_url.py +++ b/pep_sphinx_extensions/tests/pep_lint/test_post_url.py @@ -5,6 +5,7 @@ @pytest.mark.parametrize( "line", [ + "Pending", "list-name@python.org", "distutils-sig@python.org", "csv@python.org", @@ -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 diff --git a/peps/pep-0012.rst b/peps/pep-0012.rst index 4e94e6f2d36..e662da3096b 100644 --- a/peps/pep-0012.rst +++ b/peps/pep-0012.rst @@ -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. diff --git a/peps/pep-0012/pep-NNNN.rst b/peps/pep-0012/pep-NNNN.rst index 85da9673190..363fb01ca3a 100644 --- a/peps/pep-0012/pep-NNNN.rst +++ b/peps/pep-0012/pep-NNNN.rst @@ -3,7 +3,7 @@ Title: Author: Sponsor: PEP-Delegate: -Discussions-To: +Discussions-To: Pending Status: Type: Topic: