From 754db5e3f4afac1f1a4b7e6191c8c44c1dbb64b8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 18 Feb 2024 23:21:05 +0200 Subject: [PATCH 01/19] Add directives to show warning banner for deprecated PEPs --- pep_sphinx_extensions/__init__.py | 3 +++ .../parsing/pep_banner_directive.py | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/pep_sphinx_extensions/__init__.py b/pep_sphinx_extensions/__init__.py index f3aaa8ea858..af8c2887f78 100644 --- a/pep_sphinx_extensions/__init__.py +++ b/pep_sphinx_extensions/__init__.py @@ -75,6 +75,9 @@ def setup(app: Sphinx) -> dict[str, bool]: "canonical-pypa-spec", pep_banner_directive.CanonicalPyPASpecBanner) app.add_directive( "canonical-typing-spec", pep_banner_directive.CanonicalTypingSpecBanner) + app.add_directive("abandoned", pep_banner_directive.AbandonedBanner) + app.add_directive("rejected", pep_banner_directive.RejectedBanner) + app.add_directive("withdrawn", pep_banner_directive.WithdrawnBanner) # Register event callbacks app.connect("builder-inited", _update_config_for_builder) # Update configuration values for builder used diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py index 00e6af504e5..068e3132755 100644 --- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py +++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py @@ -125,3 +125,30 @@ class CanonicalTypingSpecBanner(PEPBanner): admonition_class = nodes.attention css_classes = ["canonical-typing-spec", "sticky-banner"] + + +class AbandonedBanner(PEPBanner): + """Insert an admonition for abandoned PEPs.""" + + admonition_class = nodes.warning + admonition_pre_template = "{link_content}" + admonition_pre_text = "This PEP has been abandoned." + css_classes = ["sticky-banner", "deprecated", "abandoned"] + + +class RejectedBanner(PEPBanner): + """Insert an admonition for rejected PEPs.""" + + admonition_class = nodes.warning + admonition_pre_template = "{link_content}" + admonition_pre_text = "This PEP has been rejected." + css_classes = ["sticky-banner", "deprecated", "rejected"] + + +class WithdrawnBanner(PEPBanner): + """Insert an admonition for withdrawn PEPs.""" + + admonition_class = nodes.warning + admonition_pre_template = "{link_content}" + admonition_pre_text = "This PEP has been withdrawn." + css_classes = ["sticky-banner", "deprecated", "withdrawn"] From d5cf32825dcf2f45f0d2c6f1b6ac06c3e1519174 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 18 Feb 2024 23:32:25 +0200 Subject: [PATCH 02/19] Apply directives --- peps/pep-0003.rst | 2 +- peps/pep-0009.rst | 26 +++++--------------------- peps/pep-0042.rst | 14 ++------------ peps/pep-0103.rst | 29 ++++++----------------------- peps/pep-0204.rst | 27 +++++++++++---------------- peps/pep-0206.rst | 11 +---------- peps/pep-0209.rst | 2 +- peps/pep-0210.rst | 9 +-------- peps/pep-0211.rst | 4 +--- peps/pep-0216.rst | 8 ++------ peps/pep-0220.rst | 2 +- peps/pep-0224.rst | 2 +- peps/pep-0225.rst | 4 +--- peps/pep-0239.rst | 31 ++++++++++++++----------------- peps/pep-0242.rst | 25 ++++++++++--------------- peps/pep-0363.rst | 13 +------------ peps/pep-0426.rst | 5 ++--- 17 files changed, 61 insertions(+), 153 deletions(-) diff --git a/peps/pep-0003.rst b/peps/pep-0003.rst index 185f1adfa7a..a8ad8371944 100644 --- a/peps/pep-0003.rst +++ b/peps/pep-0003.rst @@ -3,10 +3,10 @@ Title: Guidelines for Handling Bug Reports Author: Jeremy Hylton Status: Withdrawn Type: Process -Content-Type: text/x-rst Created: 25-Sep-2000 Post-History: +.. withdrawn:: Introduction ============ diff --git a/peps/pep-0009.rst b/peps/pep-0009.rst index 107ed077d00..255d6b74998 100644 --- a/peps/pep-0009.rst +++ b/peps/pep-0009.rst @@ -1,25 +1,20 @@ PEP: 9 Title: Sample Plaintext PEP Template -Version: $Revision$ -Last-Modified: $Date$ Author: Barry Warsaw Status: Withdrawn Type: Process -Content-Type: text/x-rst Created: 14-Aug-2001 Post-History: Resolution: https://mail.python.org/archives/list/python-dev@python.org/thread/2YMHVPRDWGQLA5A2FKXE2JMLM2HQEEGW/ +.. withdrawn:: + As of 05-Jan-2016, this PEP is officially deprecated and replaced + by :pep:`12`. All PEPs should now use the reStructuredText format + described by :pep:`12`, and plaintext PEPs will no longer be + accepted. :: - Update - - As of 05-Jan-2016, this PEP is officially deprecated and replaced - by PEP 12. All PEPs should now use the reStructuredText format - described by PEP 12, and plaintext PEPs will no longer be - accepted. - Abstract This PEP provides a boilerplate or sample template for creating @@ -225,14 +220,3 @@ Resolution: https://mail.python.org/archives/list/python-dev@python.org/thread/2 Copyright This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: diff --git a/peps/pep-0042.rst b/peps/pep-0042.rst index 23beb2b9337..eecae3b067e 100644 --- a/peps/pep-0042.rst +++ b/peps/pep-0042.rst @@ -1,16 +1,13 @@ PEP: 42 Title: Feature Requests -Version: $Revision$ -Last-Modified: $Date$ Author: Jeremy Hylton Status: Withdrawn Type: Process -Content-Type: text/x-rst Created: 12-Sep-2000 Post-History: - -.. note:: This PEP has been `withdrawn as obsolete`_. +.. withdrawn:: + This PEP has been `withdrawn as obsolete`_. All new feature requests should either go to the `Python bug tracker`_ for very simple requests or the `python-ideas`_ mailing list for everything else. The rest of this document is retained for historical @@ -335,10 +332,3 @@ Building and Installing .. _`Python bug tracker`: https://bugs.python.org .. _`python-ideas`: https://mail.python.org/mailman/listinfo/python-ideas .. _`withdrawn as obsolete`: https://github.com/python/peps/pull/108#issuecomment-249603204 - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - End: diff --git a/peps/pep-0103.rst b/peps/pep-0103.rst index c92469adc7b..9de51558252 100644 --- a/peps/pep-0103.rst +++ b/peps/pep-0103.rst @@ -1,24 +1,19 @@ PEP: 103 Title: Collecting information about git -Version: $Revision$ -Last-Modified: $Date$ Author: Oleg Broytman Status: Withdrawn Type: Informational -Content-Type: text/x-rst Created: 01-Jun-2015 Post-History: 12-Sep-2015 -Withdrawal -========== +.. withdrawn:: + This PEP was withdrawn as it's too generic and doesn't really deals + with Python development. It is no longer updated. -This PEP was withdrawn as it's too generic and doesn't really deals -with Python development. It is no longer updated. + The content was moved to `Python Wiki`_. Make further updates in the + wiki. -The content was moved to `Python Wiki`_. Make further updates in the -wiki. - -.. _`Python Wiki`: https://wiki.python.org/moin/Git + .. _`Python Wiki`: https://wiki.python.org/moin/Git Abstract ======== @@ -1076,15 +1071,3 @@ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: - vim: set fenc=us-ascii tw=70 : diff --git a/peps/pep-0204.rst b/peps/pep-0204.rst index cd7a7efcf0a..ab5d3bf2726 100644 --- a/peps/pep-0204.rst +++ b/peps/pep-0204.rst @@ -3,11 +3,21 @@ Title: Range Literals Author: Thomas Wouters Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 14-Jul-2000 Python-Version: 2.0 Post-History: +.. rejected:: + After careful consideration, and a period of meditation, this + proposal has been rejected. The open issues, as well as some + confusion between ranges and slice syntax, raised enough questions + for Guido not to accept it for Python 2.0, and later to reject the + proposal altogether. The new syntax and its intentions were deemed + not obvious enough. + + [ TBD: Guido, amend/confirm this, please. Preferably both; this + is a PEP, it should contain *all* the reasons for rejection + and/or reconsideration, for future reference. ] Introduction ============ @@ -270,21 +280,6 @@ Open issues made private functions? -Rejection -========= - -After careful consideration, and a period of meditation, this -proposal has been rejected. The open issues, as well as some -confusion between ranges and slice syntax, raised enough questions -for Guido not to accept it for Python 2.0, and later to reject the -proposal altogether. The new syntax and its intentions were deemed -not obvious enough. - -[ TBD: Guido, amend/confirm this, please. Preferably both; this -is a PEP, it should contain *all* the reasons for rejection -and/or reconsideration, for future reference. ] - - Copyright ========= diff --git a/peps/pep-0206.rst b/peps/pep-0206.rst index cfd19ba7571..9c5ef35da3a 100644 --- a/peps/pep-0206.rst +++ b/peps/pep-0206.rst @@ -1,14 +1,12 @@ PEP: 206 Title: Python Advanced Library -Version: $Revision$ -Last-Modified: $Date$ Author: A.M. Kuchling Status: Withdrawn Type: Informational -Content-Type: text/x-rst Created: 14-Jul-2000 Post-History: +.. withdrawn:: Introduction ============ @@ -119,10 +117,3 @@ Acknowledgements The PEP is based on an earlier draft PEP by Moshe Zadka, titled "2.0 Batteries Included." - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - End: diff --git a/peps/pep-0209.rst b/peps/pep-0209.rst index c91a15f0a08..1ef75800285 100644 --- a/peps/pep-0209.rst +++ b/peps/pep-0209.rst @@ -3,11 +3,11 @@ Title: Multi-dimensional Arrays Author: Paul Barrett , Travis Oliphant Status: Withdrawn Type: Standards Track -Content-Type: text/x-rst Created: 03-Jan-2001 Python-Version: 2.2 Post-History: +.. withdrawn:: Abstract ======== diff --git a/peps/pep-0210.rst b/peps/pep-0210.rst index 68d1b49a9be..526e3b9ec18 100644 --- a/peps/pep-0210.rst +++ b/peps/pep-0210.rst @@ -3,15 +3,8 @@ Title: Decoupling the Interpreter Loop Author: David Ascher Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 15-Jul-2000 Python-Version: 2.1 Post-History: - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - End: +.. rejected:: diff --git a/peps/pep-0211.rst b/peps/pep-0211.rst index da2358ba207..548026bc0c8 100644 --- a/peps/pep-0211.rst +++ b/peps/pep-0211.rst @@ -3,14 +3,12 @@ Title: Adding A New Outer Product Operator Author: Greg Wilson Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 15-Jul-2000 Python-Version: 2.1 Post-History: -.. note:: - +.. rejected:: The approach in the later :pep:`465` was eventually accepted in lieu of this PEP. The :pep:`Rejected Ideas <465#rejected-alternatives-to-adding-a-new-operator>` diff --git a/peps/pep-0216.rst b/peps/pep-0216.rst index 497fc135c40..ac01ccd150f 100644 --- a/peps/pep-0216.rst +++ b/peps/pep-0216.rst @@ -3,17 +3,13 @@ Title: Docstring Format Author: Moshe Zadka Status: Rejected Type: Informational -Content-Type: text/x-rst Created: 31-Jul-2000 Post-History: Superseded-By: 287 -Notice -====== - -This PEP is rejected by the author. It has been superseded by PEP -287. +.. rejected:: + This PEP is rejected by the author. It has been superseded by :pep:`287`. Abstract diff --git a/peps/pep-0220.rst b/peps/pep-0220.rst index 9d9a476091f..7b1aca80ce7 100644 --- a/peps/pep-0220.rst +++ b/peps/pep-0220.rst @@ -3,10 +3,10 @@ Title: Coroutines, Generators, Continuations Author: Gordon McMillan Status: Rejected Type: Informational -Content-Type: text/x-rst Created: 14-Aug-2000 Post-History: +.. rejected:: Abstract ======== diff --git a/peps/pep-0224.rst b/peps/pep-0224.rst index 2c7cd0a1f6c..442afa42323 100644 --- a/peps/pep-0224.rst +++ b/peps/pep-0224.rst @@ -3,11 +3,11 @@ Title: Attribute Docstrings Author: Marc-André Lemburg Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 23-Aug-2000 Python-Version: 2.1 Post-History: +.. rejected:: Introduction ============ diff --git a/peps/pep-0225.rst b/peps/pep-0225.rst index b66aadee81f..f9a46bf9edd 100644 --- a/peps/pep-0225.rst +++ b/peps/pep-0225.rst @@ -4,14 +4,12 @@ Author: Huaiyu Zhu , Gregory Lielens Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 19-Sep-2000 Python-Version: 2.1 Post-History: -.. note:: - +.. rejected:: The approach in the later :pep:`465` was eventually accepted in lieu of this PEP. The :pep:`Rejected Ideas <465#rejected-alternatives-to-adding-a-new-operator>` diff --git a/peps/pep-0239.rst b/peps/pep-0239.rst index b56f4d89bee..794d446f94f 100644 --- a/peps/pep-0239.rst +++ b/peps/pep-0239.rst @@ -1,15 +1,26 @@ PEP: 239 Title: Adding a Rational Type to Python -Version: $Revision$ -Last-Modified: $Date$ Author: Christopher A. Craig , Moshe Zadka Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 11-Mar-2001 Python-Version: 2.2 Post-History: 16-Mar-2001 +.. rejected:: + BDFL Pronouncement: + + This PEP is rejected. The needs outlined in the rationale section + have been addressed to some extent by the acceptance of :pep:`327` + for decimal arithmetic. Guido also noted, "Rational arithmetic + was the default 'exact' arithmetic in ABC and it did not work out as + expected". See the python-dev discussion on 17 June 2005 [1]_. + + *Postscript:* With the acceptance of :pep:`3141`, "A Type Hierarchy + for Numbers", a 'Rational' numeric abstract base class was added + with a concrete implementation in the 'fractions' module. + + Abstract ======== @@ -21,20 +32,6 @@ support such a type. This PEP suggests no literals for rational numbers; that is left for :pep:`another PEP <240>`. -BDFL Pronouncement -================== - -This PEP is rejected. The needs outlined in the rationale section -have been addressed to some extent by the acceptance of :pep:`327` -for decimal arithmetic. Guido also noted, "Rational arithmetic -was the default 'exact' arithmetic in ABC and it did not work out as -expected". See the python-dev discussion on 17 June 2005 [1]_. - -*Postscript:* With the acceptance of :pep:`3141`, "A Type Hierarchy -for Numbers", a 'Rational' numeric abstract base class was added -with a concrete implementation in the 'fractions' module. - - Rationale ========= diff --git a/peps/pep-0242.rst b/peps/pep-0242.rst index 92f38347024..19392c3214f 100644 --- a/peps/pep-0242.rst +++ b/peps/pep-0242.rst @@ -3,11 +3,20 @@ Title: Numeric Kinds Author: Paul F. Dubois Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 17-Mar-2001 Python-Version: 2.2 Post-History: 17-Apr-2001 +.. rejected:: + This PEP has been closed by the author. The kinds module will not + be added to the standard library. + + There was no opposition to the proposal but only mild interest in + using it, not enough to justify adding the module to the standard + library. Instead, it will be made available as a separate + distribution item at the Numerical Python site. At the next + release of Numerical Python, it will no longer be a part of the + Numeric distribution. Abstract ======== @@ -217,20 +226,6 @@ Open Issues No open issues have been raised at this time. -Rejection -========= - -This PEP has been closed by the author. The kinds module will not -be added to the standard library. - -There was no opposition to the proposal but only mild interest in -using it, not enough to justify adding the module to the standard -library. Instead, it will be made available as a separate -distribution item at the Numerical Python site. At the next -release of Numerical Python, it will no longer be a part of the -Numeric distribution. - - Copyright ========= diff --git a/peps/pep-0363.rst b/peps/pep-0363.rst index 477e1b0eac5..9c7e0815576 100644 --- a/peps/pep-0363.rst +++ b/peps/pep-0363.rst @@ -1,14 +1,12 @@ PEP: 363 Title: Syntax For Dynamic Attribute Access -Version: $Revision$ -Last-Modified: $Date$ Author: Ben North Status: Rejected Type: Standards Track -Content-Type: text/x-rst Created: 29-Jan-2007 Post-History: 12-Feb-2007 +.. rejected:: Abstract ======== @@ -249,12 +247,3 @@ Copyright ========= This document has been placed in the public domain. - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: diff --git a/peps/pep-0426.rst b/peps/pep-0426.rst index 84b72a68c71..c0bf260c699 100644 --- a/peps/pep-0426.rst +++ b/peps/pep-0426.rst @@ -1,7 +1,5 @@ PEP: 426 Title: Metadata for Python Software Packages 2.0 -Version: $Revision$ -Last-Modified: $Date$ Author: Alyssa Coghlan , Daniel Holth , Donald Stufft @@ -10,7 +8,6 @@ Discussions-To: distutils-sig@python.org Status: Withdrawn Type: Informational Topic: Packaging -Content-Type: text/x-rst Requires: 440, 508, 518 Created: 30-Aug-2012 Post-History: 14-Nov-2012, 05-Feb-2013, 07-Feb-2013, 09-Feb-2013, @@ -18,6 +15,8 @@ Post-History: 14-Nov-2012, 05-Feb-2013, 07-Feb-2013, 09-Feb-2013, 21-Dec-2013 Replaces: 345 +.. withdrawn:: + PEP Withdrawal ============== From 20ed22ae687df3c29b3c06824079159d50e872e3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:40:10 +0200 Subject: [PATCH 03/19] Add directive to show warning banner for superseded PEP --- pep_sphinx_extensions/__init__.py | 1 + .../pep_processor/parsing/pep_banner_directive.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/pep_sphinx_extensions/__init__.py b/pep_sphinx_extensions/__init__.py index af8c2887f78..2276f8b813d 100644 --- a/pep_sphinx_extensions/__init__.py +++ b/pep_sphinx_extensions/__init__.py @@ -77,6 +77,7 @@ def setup(app: Sphinx) -> dict[str, bool]: "canonical-typing-spec", pep_banner_directive.CanonicalTypingSpecBanner) app.add_directive("abandoned", pep_banner_directive.AbandonedBanner) app.add_directive("rejected", pep_banner_directive.RejectedBanner) + app.add_directive("superseded", pep_banner_directive.SupersededBanner) app.add_directive("withdrawn", pep_banner_directive.WithdrawnBanner) # Register event callbacks diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py index 068e3132755..8ee3db920ca 100644 --- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py +++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py @@ -145,6 +145,15 @@ class RejectedBanner(PEPBanner): css_classes = ["sticky-banner", "deprecated", "rejected"] +class SupersededBanner(PEPBanner): + """Insert an admonition for superseded PEPs.""" + + admonition_class = nodes.warning + admonition_pre_template = "{link_content}" + admonition_pre_text = "This PEP has been superseded." + css_classes = ["sticky-banner", "deprecated", "superseded"] + + class WithdrawnBanner(PEPBanner): """Insert an admonition for withdrawn PEPs.""" From e5f451ffe8e208f72db65f5b010d10f6ae02f0d3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:40:20 +0200 Subject: [PATCH 04/19] Apply directive --- peps/pep-0215.rst | 2 +- peps/pep-0241.rst | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/peps/pep-0215.rst b/peps/pep-0215.rst index bdcdcf11f51..9a7a57814d2 100644 --- a/peps/pep-0215.rst +++ b/peps/pep-0215.rst @@ -3,12 +3,12 @@ Title: String Interpolation Author: Ka-Ping Yee Status: Superseded Type: Standards Track -Content-Type: text/x-rst Created: 24-Jul-2000 Python-Version: 2.1 Post-History: Superseded-By: 292 +.. superseded:: Superseded by :pep:`292` Abstract ======== diff --git a/peps/pep-0241.rst b/peps/pep-0241.rst index e82b2267bac..cc7ff57b586 100644 --- a/peps/pep-0241.rst +++ b/peps/pep-0241.rst @@ -5,11 +5,11 @@ Discussions-To: distutils-sig@python.org Status: Superseded Type: Standards Track Topic: Packaging -Content-Type: text/x-rst Created: 12-Mar-2001 Post-History: `19-Mar-2001 `__ Superseded-By: 314 +.. superseded:: Superseded by :pep:`314` Introduction ============ @@ -256,11 +256,3 @@ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - End: From 87ea181a3446270bb9a927c84adde11295738244 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 00:19:33 +0200 Subject: [PATCH 05/19] Remove redundant Abandoned directive --- pep_sphinx_extensions/__init__.py | 1 - .../pep_processor/parsing/pep_banner_directive.py | 9 --------- 2 files changed, 10 deletions(-) diff --git a/pep_sphinx_extensions/__init__.py b/pep_sphinx_extensions/__init__.py index 2276f8b813d..42d3069c952 100644 --- a/pep_sphinx_extensions/__init__.py +++ b/pep_sphinx_extensions/__init__.py @@ -75,7 +75,6 @@ def setup(app: Sphinx) -> dict[str, bool]: "canonical-pypa-spec", pep_banner_directive.CanonicalPyPASpecBanner) app.add_directive( "canonical-typing-spec", pep_banner_directive.CanonicalTypingSpecBanner) - app.add_directive("abandoned", pep_banner_directive.AbandonedBanner) app.add_directive("rejected", pep_banner_directive.RejectedBanner) app.add_directive("superseded", pep_banner_directive.SupersededBanner) app.add_directive("withdrawn", pep_banner_directive.WithdrawnBanner) diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py index 8ee3db920ca..6f8ee043a29 100644 --- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py +++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py @@ -127,15 +127,6 @@ class CanonicalTypingSpecBanner(PEPBanner): css_classes = ["canonical-typing-spec", "sticky-banner"] -class AbandonedBanner(PEPBanner): - """Insert an admonition for abandoned PEPs.""" - - admonition_class = nodes.warning - admonition_pre_template = "{link_content}" - admonition_pre_text = "This PEP has been abandoned." - css_classes = ["sticky-banner", "deprecated", "abandoned"] - - class RejectedBanner(PEPBanner): """Insert an admonition for rejected PEPs.""" From 78b06349257dd1c93ebcbb75240bb50b52068d76 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:58:20 +0200 Subject: [PATCH 06/19] Include "This PEP has been superseded by PEP xxx" in directive template Co-authored-by: C.A.M. Gerlach --- .../pep_processor/parsing/pep_banner_directive.py | 2 +- peps/pep-0215.rst | 2 +- peps/pep-0241.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py index 6f8ee043a29..e69cca36ca3 100644 --- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py +++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py @@ -140,7 +140,7 @@ class SupersededBanner(PEPBanner): """Insert an admonition for superseded PEPs.""" admonition_class = nodes.warning - admonition_pre_template = "{link_content}" + admonition_pre_template = "This PEP has been superseded by :pep:`{link_content}`." admonition_pre_text = "This PEP has been superseded." css_classes = ["sticky-banner", "deprecated", "superseded"] diff --git a/peps/pep-0215.rst b/peps/pep-0215.rst index 9a7a57814d2..df51b07ea08 100644 --- a/peps/pep-0215.rst +++ b/peps/pep-0215.rst @@ -8,7 +8,7 @@ Python-Version: 2.1 Post-History: Superseded-By: 292 -.. superseded:: Superseded by :pep:`292` +.. superseded:: 292 Abstract ======== diff --git a/peps/pep-0241.rst b/peps/pep-0241.rst index cc7ff57b586..a33fe482647 100644 --- a/peps/pep-0241.rst +++ b/peps/pep-0241.rst @@ -9,7 +9,7 @@ Created: 12-Mar-2001 Post-History: `19-Mar-2001 `__ Superseded-By: 314 -.. superseded:: Superseded by :pep:`314` +.. superseded:: 314 Introduction ============ From ac2c0156f62426867f5f98fd9f0c48703453bd6a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:59:29 +0200 Subject: [PATCH 07/19] PEP 3: Intro section is withdrawal notice Co-authored-by: C.A.M. Gerlach --- peps/pep-0003.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/peps/pep-0003.rst b/peps/pep-0003.rst index a8ad8371944..78f752017d4 100644 --- a/peps/pep-0003.rst +++ b/peps/pep-0003.rst @@ -7,6 +7,12 @@ Created: 25-Sep-2000 Post-History: .. withdrawn:: + This PEP contained guidelines for handling bug reports in the Python + bug tracker. It has been replaced by the + `Developer's Guide description of issue triaging + `_. + Guidelines for people submitting Python bugs are `in the Python docs + `__. Introduction ============ From efd0955784cdefccfe8bbbda7479a6d390c53690 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:00:00 +0200 Subject: [PATCH 08/19] PEP 3: ... and de-duplicate --- peps/pep-0003.rst | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/peps/pep-0003.rst b/peps/pep-0003.rst index 78f752017d4..e7b8f3146a5 100644 --- a/peps/pep-0003.rst +++ b/peps/pep-0003.rst @@ -14,23 +14,6 @@ Post-History: Guidelines for people submitting Python bugs are `in the Python docs `__. -Introduction -============ - -This PEP contained guidelines for handling bug reports in the Python -bug tracker. It has been replaced by the Developer's Guide -description of issue triaging at - -:: - - https://docs.python.org/devguide/triaging.html - -Guidelines for people submitting Python bugs are at - -:: - - http://docs.python.org/bugs.html - Original Guidelines =================== From 48cb09395c6451331977e6bc68bf3234fcad29ed Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:01:30 +0200 Subject: [PATCH 09/19] PEP 42: update links Co-authored-by: C.A.M. Gerlach --- peps/pep-0042.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peps/pep-0042.rst b/peps/pep-0042.rst index eecae3b067e..a033675842a 100644 --- a/peps/pep-0042.rst +++ b/peps/pep-0042.rst @@ -9,7 +9,7 @@ Post-History: .. withdrawn:: This PEP has been `withdrawn as obsolete`_. All new feature requests should either go to the `Python bug tracker`_ - for very simple requests or the `python-ideas`_ mailing list for + for very simple requests or the `Ideas Discourse category`_ for everything else. The rest of this document is retained for historical purposes only. @@ -329,6 +329,6 @@ Building and Installing http://bugs.python.org/issue588756 -.. _`Python bug tracker`: https://bugs.python.org -.. _`python-ideas`: https://mail.python.org/mailman/listinfo/python-ideas +.. _`Python bug tracker`: https://github.com/python/cpython/issues +.. _`Ideas Discourse category`: https://discuss.python.org/c/ideas/6 .. _`withdrawn as obsolete`: https://github.com/python/peps/pull/108#issuecomment-249603204 From 2e41ad9d6220d536f8022c3bdaf03c2ab52047fc Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:02:29 +0200 Subject: [PATCH 10/19] PEP 216: rejection by author is really withdrawal Co-authored-by: C.A.M. Gerlach --- peps/pep-0216.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0216.rst b/peps/pep-0216.rst index ac01ccd150f..be32cc2dde6 100644 --- a/peps/pep-0216.rst +++ b/peps/pep-0216.rst @@ -1,14 +1,14 @@ PEP: 216 Title: Docstring Format Author: Moshe Zadka -Status: Rejected +Status: Withdrawn Type: Informational Created: 31-Jul-2000 Post-History: Superseded-By: 287 -.. rejected:: +.. withdrawn:: This PEP is rejected by the author. It has been superseded by :pep:`287`. From c131de60cfb0a64454b3a80f40a7e3996772b16b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:03:41 +0200 Subject: [PATCH 11/19] PEP 216: rejection by author is really withdrawal --- peps/pep-0216.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0216.rst b/peps/pep-0216.rst index be32cc2dde6..92ee2b20b65 100644 --- a/peps/pep-0216.rst +++ b/peps/pep-0216.rst @@ -9,7 +9,7 @@ Superseded-By: 287 .. withdrawn:: - This PEP is rejected by the author. It has been superseded by :pep:`287`. + This PEP is withdrawn by the author. It has been superseded by :pep:`287`. Abstract From 08fbdec038699f987c7a36cd71819a1caa77e834 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:04:56 +0200 Subject: [PATCH 12/19] PEP 224: Add reference to rejection section --- peps/pep-0224.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/peps/pep-0224.rst b/peps/pep-0224.rst index 442afa42323..c3de46b5a0e 100644 --- a/peps/pep-0224.rst +++ b/peps/pep-0224.rst @@ -173,6 +173,7 @@ docstring attribute and apply the above logic to it. Besides generating a docstring for an otherwise undocumented attribute there is no breakage. +.. 224-rejection:: Comments from our BDFL ====================== From ccd319252b7f5f6d5171dc69e524feede6238a83 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:09:10 +0200 Subject: [PATCH 13/19] PEP 224: Fix reference and link from banner --- peps/pep-0224.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/peps/pep-0224.rst b/peps/pep-0224.rst index c3de46b5a0e..00e128ebf2a 100644 --- a/peps/pep-0224.rst +++ b/peps/pep-0224.rst @@ -8,6 +8,8 @@ Python-Version: 2.1 Post-History: .. rejected:: + This PEP has been rejected. + See :ref:`224-rejection` for more information. Introduction ============ @@ -173,7 +175,7 @@ docstring attribute and apply the above logic to it. Besides generating a docstring for an otherwise undocumented attribute there is no breakage. -.. 224-rejection:: +.. _224-rejection: Comments from our BDFL ====================== From ec983b050fe43c9e0fca092261bcc6a57260b700 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:10:46 +0200 Subject: [PATCH 14/19] =?UTF-8?q?PEP=20239:=20Fix=20banner=C2=A0text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: C.A.M. Gerlach --- peps/pep-0239.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/peps/pep-0239.rst b/peps/pep-0239.rst index 794d446f94f..09417174c6c 100644 --- a/peps/pep-0239.rst +++ b/peps/pep-0239.rst @@ -8,8 +8,6 @@ Python-Version: 2.2 Post-History: 16-Mar-2001 .. rejected:: - BDFL Pronouncement: - This PEP is rejected. The needs outlined in the rationale section have been addressed to some extent by the acceptance of :pep:`327` for decimal arithmetic. Guido also noted, "Rational arithmetic From 5169af7b7b44538065352c9c76fe9db9803e6e19 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:11:38 +0200 Subject: [PATCH 15/19] PEP 242: rejection by author is really withdrawal Co-authored-by: C.A.M. Gerlach --- peps/pep-0242.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0242.rst b/peps/pep-0242.rst index 19392c3214f..5c6d5df1337 100644 --- a/peps/pep-0242.rst +++ b/peps/pep-0242.rst @@ -1,13 +1,13 @@ PEP: 242 Title: Numeric Kinds Author: Paul F. Dubois -Status: Rejected +Status: Withdrawn Type: Standards Track Created: 17-Mar-2001 Python-Version: 2.2 Post-History: 17-Apr-2001 -.. rejected:: +.. withdrawn:: This PEP has been closed by the author. The kinds module will not be added to the standard library. From aba61132198ec89ed2e32f7b558c9490655e3f5b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:15:59 +0200 Subject: [PATCH 16/19] PEP 426: first section is withdrawal notice Co-authored-by: C.A.M. Gerlach --- peps/pep-0426.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/peps/pep-0426.rst b/peps/pep-0426.rst index c0bf260c699..3617dd38684 100644 --- a/peps/pep-0426.rst +++ b/peps/pep-0426.rst @@ -16,6 +16,15 @@ Post-History: 14-Nov-2012, 05-Feb-2013, 07-Feb-2013, 09-Feb-2013, Replaces: 345 .. withdrawn:: + The ground-up metadata redesign proposed in this PEP has been withdrawn in + favour of the more modest proposal in :pep:`566`, which retains the basic + Key:Value format of previous metadata versions, but also defines a standardised + mechanism for translating that format to nested JSON-compatible data structures. + + Some of the ideas in this PEP (or the related :pep:`459`) may still be considered + as part of later proposals, but they will be handled in a more incremental + fashion, rather than as a single large proposed change with no feasible + migration plan. PEP Withdrawal From 5cb05c29bb3e92d0439f1f852130753fb8073c96 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:14:28 +0200 Subject: [PATCH 17/19] PEP 363: link to rejection discussion from banner --- peps/pep-0363.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/peps/pep-0363.rst b/peps/pep-0363.rst index 9c7e0815576..2b0630e4e28 100644 --- a/peps/pep-0363.rst +++ b/peps/pep-0363.rst @@ -7,6 +7,8 @@ Created: 29-Jan-2007 Post-History: 12-Feb-2007 .. rejected:: + This PEP has been rejected. + See :ref:`363-rejection` for more information. Abstract ======== @@ -170,6 +172,8 @@ of c.180 additional lines in the core code, and c.100 additional lines of tests. It is available as sourceforge patch #1657573 [1]_. +.. _363-rejection: + Mailing Lists Discussion ======================== From 6d3e5726944e30ecec33de4e86565061d43b93b5 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:16:22 +0200 Subject: [PATCH 18/19] PEP 426: ... and de-duplicate --- peps/pep-0426.rst | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/peps/pep-0426.rst b/peps/pep-0426.rst index 3617dd38684..7427d5e42c9 100644 --- a/peps/pep-0426.rst +++ b/peps/pep-0426.rst @@ -27,20 +27,6 @@ Replaces: 345 migration plan. -PEP Withdrawal -============== - -The ground-up metadata redesign proposed in this PEP has been withdrawn in -favour of the more modest proposal in :pep:`566`, which retains the basic -Key:Value format of previous metadata versions, but also defines a standardised -mechanism for translating that format to nested JSON-compatible data structures. - -Some of the ideas in this PEP (or the related :pep:`459`) may still be considered -as part of later proposals, but they will be handled in a more incremental -fashion, rather than as a single large proposed change with no feasible -migration plan. - - Abstract ======== From afa418d030ec16dca5c9083b5fac9165e676d154 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:26:06 +0200 Subject: [PATCH 19/19] Move common directive logic into a subclass --- .../pep_processor/parsing/pep_banner_directive.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py index e69cca36ca3..fa147578775 100644 --- a/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py +++ b/pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py @@ -127,11 +127,18 @@ class CanonicalTypingSpecBanner(PEPBanner): css_classes = ["canonical-typing-spec", "sticky-banner"] -class RejectedBanner(PEPBanner): - """Insert an admonition for rejected PEPs.""" +class DeprecatedBanner(PEPBanner): + """Generic admonition for deprecated PEPs.""" admonition_class = nodes.warning admonition_pre_template = "{link_content}" + admonition_pre_text = "This PEP has been deprecated." + css_classes = ["sticky-banner", "deprecated"] + + +class RejectedBanner(DeprecatedBanner): + """Insert an admonition for rejected PEPs.""" + admonition_pre_text = "This PEP has been rejected." css_classes = ["sticky-banner", "deprecated", "rejected"] @@ -139,7 +146,6 @@ class RejectedBanner(PEPBanner): class SupersededBanner(PEPBanner): """Insert an admonition for superseded PEPs.""" - admonition_class = nodes.warning admonition_pre_template = "This PEP has been superseded by :pep:`{link_content}`." admonition_pre_text = "This PEP has been superseded." css_classes = ["sticky-banner", "deprecated", "superseded"] @@ -148,7 +154,5 @@ class SupersededBanner(PEPBanner): class WithdrawnBanner(PEPBanner): """Insert an admonition for withdrawn PEPs.""" - admonition_class = nodes.warning - admonition_pre_template = "{link_content}" admonition_pre_text = "This PEP has been withdrawn." css_classes = ["sticky-banner", "deprecated", "withdrawn"]