From d54cd8f1f909d5d91dfb2fcef9bb7ea23f588483 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 10 Apr 2025 00:30:05 +0300 Subject: [PATCH 1/3] Allow TBA as Discussions-To --- check-peps.py | 4 +++- pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py | 2 +- pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 3 ++- peps/pep-0012.rst | 2 +- peps/pep-0012/pep-NNNN.rst | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/check-peps.py b/check-peps.py index 57a0a7d7b3f..eacfcef8631 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 == "TBA": + 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 'TBA', a valid thread URL or mailing list" 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..32325a930a1 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 'TBA', a valid thread URL or mailing list"), (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..44d22d41a3d 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", [ + "TBA", "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 'TBA', a valid thread URL or mailing list" ], warnings diff --git a/peps/pep-0012.rst b/peps/pep-0012.rst index 4e94e6f2d36..4609bd0198a 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 write "TBA" 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..60f3a31d9d4 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: TBA Status: Type: Topic: From 0bb22219b7de4d2891186d3ec738f8d7901bc1ba Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 10 Apr 2025 09:09:18 +0300 Subject: [PATCH 2/3] TBA -> Pending Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- check-peps.py | 4 ++-- pep_sphinx_extensions/tests/pep_lint/test_pep_lint.py | 2 +- pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 2 +- peps/pep-0012.rst | 2 +- peps/pep-0012/pep-NNNN.rst | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/check-peps.py b/check-peps.py index eacfcef8631..2db5ddc9800 100755 --- a/check-peps.py +++ b/check-peps.py @@ -303,7 +303,7 @@ 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 == "TBA": + if line == "Pending": return if line.startswith("https://"): return @@ -313,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 'TBA', 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 32325a930a1..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 'TBA', 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 44d22d41a3d..c5db8714f3c 100644 --- a/pep_sphinx_extensions/tests/pep_lint/test_post_url.py +++ b/pep_sphinx_extensions/tests/pep_lint/test_post_url.py @@ -53,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 'TBA', 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 4609bd0198a..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 write "TBA" 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 60f3a31d9d4..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: TBA +Discussions-To: Pending Status: Type: Topic: From 18f6866bca2676b4bc355800ae58d97360914884 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 10 Apr 2025 09:09:53 +0300 Subject: [PATCH 3/3] TBA -> Pending --- pep_sphinx_extensions/tests/pep_lint/test_post_url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c5db8714f3c..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,7 +5,7 @@ @pytest.mark.parametrize( "line", [ - "TBA", + "Pending", "list-name@python.org", "distutils-sig@python.org", "csv@python.org",