From 1819af7d25a75a93eb55b84371a35bce16f80300 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Fri, 3 Feb 2023 17:55:35 -0600 Subject: [PATCH 1/5] PEP 684: Revert unessesary Post-History addition --- pep-0684.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/pep-0684.rst b/pep-0684.rst index 638f1d5ea29..cb89c56079a 100644 --- a/pep-0684.rst +++ b/pep-0684.rst @@ -10,7 +10,6 @@ Created: 08-Mar-2022 Python-Version: 3.12 Post-History: `08-Mar-2022 `__, `29-Sep-2022 `__, - `28-Oct-2022 `__, Resolution: From 2ef15791a2fe409c4ea26d1558f8489d12842cb5 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Fri, 3 Feb 2023 17:58:18 -0600 Subject: [PATCH 2/5] Lint: Revert regression flagging individual messages in Post-History --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 984859c7f30..c0968fdc63c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -223,7 +223,7 @@ repos: - id: validate-post-history name: "'Post-History' must be '`DD-mmm-YYYY `__, ...'" language: pygrep - entry: '(?<=\n)Post-History:(?:(?! ?\n|((( +|\n {1,14})(([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9])|`([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9]) `__)(,|(?=\n[^ ])))+\n(?=[A-Z\n]))))' + entry: '(?<=\n)Post-History:(?:(?! ?\n|((( +|\n {1,14})(([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9])|`([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9]) `__)(,|(?=\n[^ ])))+\n(?=[A-Z\n]))))' args: [--multiline] files: '^pep-\d+\.(rst|txt)$' types: [text] From 5383327720a8071489b7871f18da837ac17d63a4 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Mon, 6 Feb 2023 15:30:42 -0600 Subject: [PATCH 3/5] Lint: Re-ignore per-message links in Post-History w/trailing slash --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c0968fdc63c..5012191ca19 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -223,7 +223,7 @@ repos: - id: validate-post-history name: "'Post-History' must be '`DD-mmm-YYYY `__, ...'" language: pygrep - entry: '(?<=\n)Post-History:(?:(?! ?\n|((( +|\n {1,14})(([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9])|`([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9]) `__)(,|(?=\n[^ ])))+\n(?=[A-Z\n]))))' + entry: '(?<=\n)Post-History:(?:(?! ?\n|((( +|\n {1,14})(([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9])|`([0-2][0-9]|(3[01]))-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(199[0-9]|20[0-9][0-9]) `__)(,|(?=\n[^ ])))+\n(?=[A-Z\n]))))' args: [--multiline] files: '^pep-\d+\.(rst|txt)$' types: [text] From c7ae650ab329c7a2c95209b2a5b9cefe2320a6cd Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Mon, 6 Feb 2023 15:31:30 -0600 Subject: [PATCH 4/5] PEP 684: Re-add per-message post history link with trailing slash --- pep-0684.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/pep-0684.rst b/pep-0684.rst index cb89c56079a..1b9b7a327a1 100644 --- a/pep-0684.rst +++ b/pep-0684.rst @@ -10,6 +10,7 @@ Created: 08-Mar-2022 Python-Version: 3.12 Post-History: `08-Mar-2022 `__, `29-Sep-2022 `__, + `28-Oct-2022 `__, Resolution: From 592726008d8b9ebbf250c294775f2bb2cc3c0884 Mon Sep 17 00:00:00 2001 From: "C.A.M. Gerlach" Date: Mon, 6 Feb 2023 15:39:59 -0600 Subject: [PATCH 5/5] Use clearer term (message, not post) for single Discourse messages --- pep_sphinx_extensions/pep_processor/transforms/pep_headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py b/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py index 125966e10e0..4d00655880f 100644 --- a/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py +++ b/pep_sphinx_extensions/pep_processor/transforms/pep_headers.py @@ -250,7 +250,7 @@ def _process_discourse_url(parts: list[str]) -> tuple[str, str]: has_title = not first_subpart.isnumeric() if "t" in parts: - item_type = "post" if len(parts) > (5 + has_title) else "thread" + item_type = "message" if len(parts) > (5 + has_title) else "thread" elif "c" in parts: item_type = "category" if has_title: