Linkify the PEP numbers in "Superseded-By" header. (#726)
We're already linking PEP numbers in "Replaces:", and "Requires:". Adjusted the code so it can link "Superseded-By:". Add the "Replaces:" header where they're missing.
This commit is contained in:
parent
9c61127920
commit
3c0a1e18d3
|
@ -8,6 +8,7 @@ Type: Informational
|
||||||
Content-Type: text/x-rst
|
Content-Type: text/x-rst
|
||||||
Created: 22-Aug-2001
|
Created: 22-Aug-2001
|
||||||
Post-History:
|
Post-History:
|
||||||
|
Replaces: 102
|
||||||
|
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
|
|
|
@ -9,6 +9,7 @@ Content-Type: text/x-rst
|
||||||
Created: 18-Jun-2002
|
Created: 18-Jun-2002
|
||||||
Python-Version: 2.4
|
Python-Version: 2.4
|
||||||
Post-History: 18-Jun-2002, 23-Mar-2004, 22-Aug-2004
|
Post-History: 18-Jun-2002, 23-Mar-2004, 22-Aug-2004
|
||||||
|
Replaces: 215
|
||||||
|
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
|
|
|
@ -11,6 +11,7 @@ Content-Type: text/x-rst
|
||||||
Created: 2013-02-23
|
Created: 2013-02-23
|
||||||
Python-Version: 3.4
|
Python-Version: 3.4
|
||||||
Post-History: 2013-02-23, 2013-05-02
|
Post-History: 2013-02-23, 2013-05-02
|
||||||
|
Replaces: 354
|
||||||
Resolution: https://mail.python.org/pipermail/python-dev/2013-May/126112.html
|
Resolution: https://mail.python.org/pipermail/python-dev/2013-May/126112.html
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ Type: Standards Track
|
||||||
Content-Type: text/x-rst
|
Content-Type: text/x-rst
|
||||||
Created: 5-August-2013
|
Created: 5-August-2013
|
||||||
Python-Version: 3.4
|
Python-Version: 3.4
|
||||||
|
Replaces: 433
|
||||||
|
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
|
|
|
@ -10,6 +10,7 @@ Type: Standards Track
|
||||||
Content-Type: text/x-rst
|
Content-Type: text/x-rst
|
||||||
Created: 12-Dec-2012
|
Created: 12-Dec-2012
|
||||||
Post-History: 21-Dec-2012
|
Post-History: 21-Dec-2012
|
||||||
|
Replaces: 3153
|
||||||
Resolution: https://mail.python.org/pipermail/python-dev/2013-November/130419.html
|
Resolution: https://mail.python.org/pipermail/python-dev/2013-November/130419.html
|
||||||
|
|
||||||
Abstract
|
Abstract
|
||||||
|
|
|
@ -235,7 +235,7 @@ def fixfile(inpath, input_lines, outfile):
|
||||||
else:
|
else:
|
||||||
mailtos.append(part)
|
mailtos.append(part)
|
||||||
v = COMMASPACE.join(mailtos)
|
v = COMMASPACE.join(mailtos)
|
||||||
elif k.lower() in ('replaces', 'replaced-by', 'requires'):
|
elif k.lower() in ('replaces', 'superseded-by', 'requires'):
|
||||||
otherpeps = ''
|
otherpeps = ''
|
||||||
for otherpep in re.split(',?\s+', v):
|
for otherpep in re.split(',?\s+', v):
|
||||||
otherpep = int(otherpep)
|
otherpep = int(otherpep)
|
||||||
|
@ -409,7 +409,7 @@ class PEPHeaders(Transform):
|
||||||
for node in para:
|
for node in para:
|
||||||
if isinstance(node, nodes.reference):
|
if isinstance(node, nodes.reference):
|
||||||
node.replace_self(peps.mask_email(node, pep))
|
node.replace_self(peps.mask_email(node, pep))
|
||||||
elif name in ('replaces', 'replaced-by', 'requires'):
|
elif name in ('replaces', 'superseded-by', 'requires'):
|
||||||
newbody = []
|
newbody = []
|
||||||
space = nodes.Text(' ')
|
space = nodes.Text(' ')
|
||||||
for refpep in re.split(r',?\s+', body.astext()):
|
for refpep in re.split(r',?\s+', body.astext()):
|
||||||
|
|
|
@ -224,7 +224,7 @@ def fixfile(inpath, input_lines, outfile):
|
||||||
else:
|
else:
|
||||||
mailtos.append(part)
|
mailtos.append(part)
|
||||||
v = COMMASPACE.join(mailtos)
|
v = COMMASPACE.join(mailtos)
|
||||||
elif k.lower() in ('replaces', 'replaced-by', 'requires'):
|
elif k.lower() in ('replaces', 'superseded-by', 'requires'):
|
||||||
otherpeps = ''
|
otherpeps = ''
|
||||||
for otherpep in re.split(',?\s+', v):
|
for otherpep in re.split(',?\s+', v):
|
||||||
otherpep = int(otherpep)
|
otherpep = int(otherpep)
|
||||||
|
|
Loading…
Reference in New Issue