Display list names in Resolution and Discussions-To headers (#2361)

This commit is contained in:
Adam Turner 2022-02-27 22:46:36 +00:00 committed by GitHub
parent d54a624360
commit 42f88f1ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 82 additions and 84 deletions

View File

@ -3,7 +3,7 @@ Title: Docstring Processing System Framework
Version: $Revision$
Last-Modified: $Date$
Author: David Goodger <goodger@python.org>
Discussions-To: <doc-sig@python.org>
Discussions-To: doc-sig@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Docutils Design Specification
Version: $Revision$
Last-Modified: $Date$
Author: David Goodger <goodger@python.org>
Discussions-To: <doc-sig@python.org>
Discussions-To: doc-sig@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: reStructuredText Docstring Format
Version: $Revision$
Last-Modified: $Date$
Author: David Goodger <goodger@python.org>
Discussions-To: <doc-sig@python.org>
Discussions-To: doc-sig@python.org
Status: Active
Type: Informational
Content-Type: text/x-rst

View File

@ -7,7 +7,7 @@ Author: Kevin Altis <altis@semi-retired.com>,
Andrew McNamara <andrewm@object-craft.com.au>,
Skip Montanaro <skip@pobox.com>,
Cliff Wells <LogiplexSoftware@earthlink.net>
Discussions-To: <csv@python.org>
Discussions-To: csv@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Python Web Server Gateway Interface v1.0
Version: $Revision$
Last-Modified: $Date$
Author: Phillip J. Eby <pje@telecommunity.com>
Discussions-To: Python Web-SIG <web-sig@python.org>
Discussions-To: web-sig@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Metadata for Python Software Packages 1.2
Version: $Revision$
Last-Modified: $Date$
Author: Richard Jones <richard@python.org>
Discussions-To: Distutils SIG
Discussions-To: distutils-sig@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Migrating the Python CVS to Subversion
Version: $Revision$
Last-Modified: $Date$
Author: Martin von Löwis <martin@v.loewis.de>
Discussions-To: <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Process
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Tarek Ziadé <tarek@ziade.org>
BDFL-Delegate: Nick Coghlan
Discussions-To: <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Naming conventions and recipes related to packaging
Version: $Revision$
Last-Modified: $Date$
Author: Benoit Bryon <benoit@marmelune.net>
Discussions-To: <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Deferred
Type: Informational
Content-Type: text/x-rst

View File

@ -6,7 +6,7 @@ Author: Nick Coghlan <ncoghlan@gmail.com>,
Daniel Holth <dholth@gmail.com>,
Donald Stufft <donald@stufft.io>
BDFL-Delegate: Donald Stufft <donald@stufft.io>
Discussions-To: Distutils SIG <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Withdrawn
Type: Informational
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Daniel Holth <dholth@gmail.com>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: The Argument Clinic DSL
Version: $Revision$
Last-Modified: $Date$
Author: Larry Hastings <larry@hastings.org>
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Richard Jones <richard@python.org>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Nick Coghlan <ncoghlan@gmail.com>,
Donald Stufft <donald@stufft.io>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: Distutils SIG <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Active
Type: Informational
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Single-dispatch generic functions
Version: $Revision$
Last-Modified: $Date$
Author: Łukasz Langa <lukasz@python.org>
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Chris McDonough <chrism@plope.com>,
Armin Ronacher <armin.ronacher@active-4.com>
Discussions-To: Python Web-SIG <web-sig@python.org>
Discussions-To: web-sig@python.org
Status: Deferred
Type: Informational
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Notation For Positional-Only Parameters
Version: $Revision$
Last-Modified: $Date$
Author: Larry Hastings <larry@hastings.org>
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Nick Coghlan <ncoghlan@gmail.com>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: Distutils SIG <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Withdrawn
Type: Standards Track
Content-Type: text/x-rst

View File

@ -6,7 +6,7 @@ Author: Trishank Karthik Kuppusamy <karthik@trishank.com>,
Vladimir Diaz <vladimir.diaz@nyu.edu>,
Justin Cappos <jcappos@nyu.edu>, Marina Moore <mm9693@nyu.edu>
BDFL-Delegate: Donald Stufft <donald@stufft.io>
Discussions-To: Packaging category on Python Discourse <https://discuss.python.org/c/packaging>
Discussions-To: https://discuss.python.org/c/packaging
Status: Draft
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Literature Overview for Type Hints
Version: $Revision$
Last-Modified: $Date$
Author: Łukasz Langa <lukasz@python.org>
Discussions-To: Python-Ideas <python-ideas@python.org>
Discussions-To: python-ideas@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: The Theory of Type Hints
Version: $Revision$
Last-Modified: $Date$
Author: Guido van Rossum <guido@python.org>, Ivan Levkivskyi <levkivskyi@gmail.com>
Discussions-To: Python-Ideas <python-ideas@python.org>
Discussions-To: python-ideas@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Guido van Rossum <guido@python.org>, Jukka Lehtosalo <jukka.lehtosalo@iki.fi>, Łukasz Langa <lukasz@python.org>
BDFL-Delegate: Mark Shannon
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Provisional
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: The Wheel Binary Package Format 1.9
Version: $Revision$
Last-Modified: $Date$
Author: Daniel Holth <dholth@gmail.com>
Discussions-To: <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Deferred
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Coroutines with async and await syntax
Version: $Revision$
Last-Modified: $Date$
Author: Yury Selivanov <yury@edgedb.com>
Discussions-To: <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Local Time Disambiguation
Version: $Revision$
Last-Modified: $Date$
Author: Alexander Belopolsky <alexander.belopolsky@gmail.com>, Tim Peters <tim.peters@gmail.com>
Discussions-To: Datetime-SIG <datetime-sig@python.org>
Discussions-To: datetime-sig@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Title: A protocol for delegating datetime methods to their
Version: $Revision$
Last-Modified: $Date$
Author: Alexander Belopolsky <alexander.belopolsky@gmail.com>, Tim Peters <tim.peters@gmail.com>
Discussions-To: Datetime-SIG <datetime-sig@python.org>
Discussions-To: datetime-sig@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Robert Collins <rbtcollins@hp.com>
BDFL-Delegate: Donald Stufft <donald@stufft.io>
Discussions-To: distutils-sig <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Active
Type: Informational
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Robert T. McGibbon <rmcgibbo@gmail.com>, Nathaniel J. Smith <njs@pobox.com>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: Distutils SIG <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Superseded
Type: Informational
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Robert Collins <rbtcollins@hp.com>,
Nathaniel Smith <njs@pobox.com>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: distutils-sig <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Nathaniel J. Smith <njs@pobox.com>,
Thomas Kluyver <thomas@kluyver.me.uk>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -6,7 +6,7 @@ Author: Brett Cannon <brett@python.org>,
Nathaniel Smith <njs@pobox.com>,
Donald Stufft <donald@stufft.io>
BDFL-Delegate: Nick Coghlan
Discussions-To: distutils-sig <distutils-sig at python.org>
Discussions-To: distutils-sig@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Asynchronous Generators
Version: $Revision$
Last-Modified: $Date$
Author: Yury Selivanov <yury@edgedb.com>
Discussions-To: <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Asynchronous Comprehensions
Version: $Revision$
Last-Modified: $Date$
Author: Yury Selivanov <yury@edgedb.com>
Discussions-To: <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Łukasz Langa <lukasz@python.org>
BDFL-Delegate: Mark Mangoba <mmangoba@python.org>
Discussions-To: distutils-sig <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Final
Type: Process
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Ivan Levkivskyi <levkivskyi@gmail.com>, Jukka Lehtosalo <jukka.lehtosalo@iki.fi>, Łukasz Langa <lukasz@python.org>
BDFL-Delegate: Guido van Rossum <guido@python.org>
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Instance Descriptors
Version: $Revision$
Last-Modified: $Date$
Author: larry@hastings.org (Larry Hastings)
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -2,7 +2,7 @@ PEP: 558
Title: Defined semantics for locals()
Author: Nick Coghlan <ncoghlan@gmail.com>
BDFL-Delegate: Nathaniel J. Smith
Discussions-To: <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Draft
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Postponed Evaluation of Annotations
Version: $Revision$
Last-Modified: $Date$
Author: Łukasz Langa <lukasz@python.org>
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Dustin Ingram <di@python.org>
BDFL-Delegate: Daniel Holth
Discussions-To: distutils-sig <distutils-sig at python.org>
Discussions-To: distutils-sig@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -6,7 +6,7 @@ Author: Mark Williams <mrw@enotuniq.org>,
Geoffrey Thomas <geofft@ldpreload.com>,
Thomas Kluyver <thomas@kluyver.me.uk>
BDFL-Delegate: Nick Coghlan <ncoghlan@gmail.com>
Discussions-To: Distutils SIG <distutils-sig@python.org>
Discussions-To: distutils-sig@python.org
Status: Superseded
Type: Informational
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Mariatta <mariatta@python.org>
BDFL-Delegate: Barry Warsaw <barry@python.org>
Discussions-To: Core-Workflow Category on Discourse
Discussions-To: https://discuss.python.org/c/core-workflow
Status: Accepted
Type: Process
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Type Hinting Generics In Standard Collections
Version: $Revision$
Last-Modified: $Date$
Author: Łukasz Langa <lukasz@python.org>
Discussions-To: Typing-Sig <typing-sig@python.org>
Discussions-To: typing-sig@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -2,7 +2,7 @@ PEP: 586
Title: Literal Types
Author: Michael Lee <michael.lee.0x2a@gmail.com>, Ivan Levkivskyi <levkivskyi@gmail.com>, Jukka Lehtosalo <jukka.lehtosalo@iki.fi>
BDFL-Delegate: Guido van Rossum <guido@python.org>
Discussions-To: Typing-Sig <typing-sig@python.org>
Discussions-To: typing-sig@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -2,7 +2,7 @@ PEP: 588
Title: GitHub Issues Migration Plan
Author: Mariatta <mariatta@python.org>
BDFL-Delegate: Barry Warsaw <barry@python.org>
Discussions-To: Core-Workflow Category on Discourse
Discussions-To: https://discuss.python.org/c/core-workflow
Status: Draft
Type: Informational
Content-Type: text/x-rst

View File

@ -6,7 +6,7 @@ Author: Nathaniel J. Smith <njs@pobox.com>
Thomas Kluyver <thomas@kluyver.me.uk>
Sponsor: Paul Moore <p.f.moore@gmail.com>
BDFL-Delegate: Paul Moore <p.f.moore@gmail.com>
Discussions-To: Discourse https://discuss.python.org/t/the-next-manylinux-specification/1043
Discussions-To: https://discuss.python.org/t/the-next-manylinux-specification/1043
Status: Accepted
Type: Informational
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Parameter Specification Variables
Author: Mark Mendoza <mendoza.mark.a@gmail.com>
Sponsor: Guido van Rossum <guido@python.org>
BDFL-Delegate: Guido van Rossum <guido@python.org>
Discussions-To: Typing-Sig <typing-sig@python.org>
Discussions-To: typing-sig@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Guido van Rossum <guido@python.org>,
Pablo Galindo <pablogsal@python.org>,
Lysandros Nikolaou <lisandrosnik@gmail.com>
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -9,7 +9,7 @@ Author: Brandt Bucher <brandt@python.org>,
Guido van Rossum <guido@python.org>,
Talin <viridia@gmail.com>
BDFL-Delegate:
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Superseded
Type: Standards Track
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Brandt Bucher <brandt@python.org>,
Guido van Rossum <guido@python.org>
BDFL-Delegate:
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Tobias Kohn <kohnt@tobiaskohn.ch>,
Guido van Rossum <guido@python.org>
BDFL-Delegate:
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Daniel F Moisset <dfmoisset@gmail.com>
Sponsor: Guido van Rossum <guido@python.org>
BDFL-Delegate:
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Nick Coghlan <ncoghlan@gmail.com>
BDFL-Delegate:
Discussions-To: Python-Dev <python-dev@python.org>
Discussions-To: python-dev@python.org
Status: Draft
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Eric Traut <erictr at microsoft.com>
Sponsor: Guido van Rossum <guido@python.org>
Discussions-To: Typing-Sig <typing-sig@python.org>
Discussions-To: typing-sig@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -5,7 +5,7 @@ Last-Modified: $Date$
Author: Pradeep Kumar Srinivasan <gohanpra@gmail.com>,
James Hilton-Balfe <gobot1234yt@gmail.com>
Sponsor: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Discussions-To: Typing-Sig <typing-sig@python.org>
Discussions-To: typing-sig@python.org
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Overloading, Generic Functions, Interfaces, and Adaptation
Version: $Revision$
Last-Modified: $Date$
Author: Phillip J. Eby <pje@telecommunity.com>
Discussions-To: Python 3000 List <python-3000@python.org>
Discussions-To: python-3000@python.org
Status: Deferred
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Integer Literal Support and Syntax
Version: $Revision$
Last-Modified: $Date$
Author: Patrick Maupin <pmaupin@gmail.com>
Discussions-To: Python-3000@python.org
Discussions-To: python-3000@python.org
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: BList: A Faster List-like Type
Version: $Revision$
Last-Modified: $Date$
Author: Daniel Stutzbach <daniel@stutzbachenterprises.com>
Discussions-To: Python 3000 List <python-3000@python.org>
Discussions-To: python-3000@python.org
Status: Rejected
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Peter Moody <pmoody@google.com>
BDFL-Delegate: Nick Coghlan
Discussions-To: <ipaddr-py-dev@googlegroups.com>
Discussions-To: ipaddr-py-dev@googlegroups.com
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Guido van Rossum <guido@python.org>
BDFL-Delegate: Antoine Pitrou <antoine@python.org>
Discussions-To: <python-tulip@googlegroups.com>
Discussions-To: python-tulip@googlegroups.com
Status: Final
Type: Standards Track
Content-Type: text/x-rst

View File

@ -3,7 +3,7 @@ Title: Python Web Server Gateway Interface v1.0.1
Version: $Revision$
Last-Modified: $Date$
Author: P.J. Eby <pje@telecommunity.com>
Discussions-To: Python Web-SIG <web-sig@python.org>
Discussions-To: web-sig@python.org
Status: Final
Type: Informational
Content-Type: text/x-rst

View File

@ -68,19 +68,20 @@ class PEPHeaders(transforms.Transform):
raise PEPParsingError(msg)
para = body[0]
if name in {"author", "bdfl-delegate", "pep-delegate", "discussions-to", "sponsor"}:
if name in {"author", "bdfl-delegate", "pep-delegate", "sponsor"}:
# mask emails
for node in para:
if not isinstance(node, nodes.reference):
continue
if name == "discussions-to":
if node["refuri"].startswith("http"):
node[0] = _list_name_from_thread(node)
else:
node[0] = _mask_email(node)
node["refuri"] += f"?subject=PEP%20{pep_num}"
else:
node.replace_self(_mask_email(node))
node.replace_self(_mask_email(node))
elif name in {"discussions-to", "resolution"}:
# only handle threads, email addresses in Discussions-To aren't
# masked.
for node in para:
if not isinstance(node, nodes.reference):
continue
if node["refuri"].startswith("https://mail.python.org"):
node[0] = _pretty_thread(node[0])
elif name in {"replaces", "superseded-by", "requires"}:
# replace PEP numbers with normalised list of links to PEPs
new_body = []
@ -97,20 +98,20 @@ class PEPHeaders(transforms.Transform):
field.parent.remove(field)
def _list_name_from_thread(node: nodes.reference) -> nodes.raw:
def _pretty_thread(text: nodes.Text) -> nodes.Text:
parts = text.title().replace("Sig", "SIG").split("/")
# mailman structure is
# https://mail.python.org/archives/list/<list name>/thread/<id>
try:
return nodes.Text(parts[parts.index("Archives") + 2].removesuffix("@Python.Org"))
except ValueError:
pass
# pipermail structure is
# https://mail.python.org/pipermail/<list name>/<month-year>/<id>
parts = node[0].split("/")
try:
list_name = parts[parts.index("archives") + 2]
masked_name = list_name.replace("@", "&#32;&#97;t&#32;")
return nodes.Text(parts[parts.index("Pipermail") + 1])
except ValueError:
try:
list_name = parts[parts.index("pipermail") + 1]
masked_name = list_name + "&#32;&#97;t&#32;python.org"
except ValueError:
# archives and pipermail not in list, e.g. PEP 245
return node[0]
return nodes.raw("", masked_name, format="html")
# archives and pipermail not in list, e.g. PEP 245
return text

View File

@ -85,9 +85,6 @@ def _mask_email(ref: nodes.reference) -> nodes.reference:
The returned node has no refuri link attribute.
"""
if "refuri" not in ref or not ref["refuri"].startswith("mailto:"):
if not ref.get("refuri", "").startswith("mailto:"):
return ref
list_name = ref["refuri"].removeprefix("mailto:").strip()
if list_name in {"peps@python.org", "python-list@python.org", "python-dev@python.org"}:
return ref[0]
return nodes.raw("", ref[0].replace("@", "&#32;&#97;t&#32;"), format="html")