Skip to content

Commit

Permalink
environment: Update default value for pep_base_url
Browse files Browse the repository at this point in the history
This matches docutils change in https://sourceforge.net/p/docutils/code/9045/

Fixes #10253
  • Loading branch information
nijel committed Mar 16, 2022
1 parent b12b39d commit ef79a2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sphinx/environment/__init__.py
Expand Up @@ -41,7 +41,7 @@
'embed_images': False,
'embed_stylesheet': False,
'cloak_email_addresses': True,
'pep_base_url': 'https://www.python.org/dev/peps/',
'pep_base_url': 'https://peps.python.org/',
'pep_references': None,
'rfc_base_url': 'https://datatracker.ietf.org/doc/html/',
'rfc_references': None,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_build_html.py
Expand Up @@ -212,9 +212,9 @@ def test_html4_output(app, status, warning):
(".//li/p/code/span[@class='pre']", '^a/$'),
(".//li/p/code/em/span[@class='pre']", '^varpart$'),
(".//li/p/code/em/span[@class='pre']", '^i$'),
(".//a[@href='https://www.python.org/dev/peps/pep-0008']"
(".//a[@href='https://peps.python.org/pep-0008']"
"[@class='pep reference external']/strong", 'PEP 8'),
(".//a[@href='https://www.python.org/dev/peps/pep-0008']"
(".//a[@href='https://peps.python.org/pep-0008']"
"[@class='pep reference external']/strong",
'Python Enhancement Proposal #8'),
(".//a[@href='https://datatracker.ietf.org/doc/html/rfc1.html']"
Expand Down
8 changes: 4 additions & 4 deletions tests/test_markup.py
Expand Up @@ -150,10 +150,10 @@ def get(name):
':pep:`8`',
# since docutils-0.19, :pep: role points to python.org via https schema
('<p><span class="target" id="index-0"></span><a class="pep reference external" '
'href="https?://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a></p>'),
'href="https?://(www.python.org/dev/peps|peps.python.org)/pep-0008"><strong>PEP 8</strong></a></p>'),
(r'\\sphinxAtStartPar\n'
r'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
r'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{https?://www.python.org/dev/peps/pep-0008}'
r'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{https?://(www.python.org/dev/peps|peps.python.org)/pep-0008}'
r'{\\sphinxstylestrong{PEP 8}}')
),
(
Expand All @@ -162,12 +162,12 @@ def get(name):
':pep:`8#id1`',
# since docutils-0.19, :pep: role points to python.org via https schema
('<p><span class="target" id="index-0"></span><a class="pep reference external" '
'href="https?://www.python.org/dev/peps/pep-0008#id1">'
'href="https?://(www.python.org/dev/peps|peps.python.org)/pep-0008#id1">'
'<strong>PEP 8#id1</strong></a></p>'),
(r'\\sphinxAtStartPar\n'
r'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
r'!PEP 8\\#id1@\\spxentry{PEP 8\\#id1}}\\sphinxhref'
r'{https?://www.python.org/dev/peps/pep-0008\\#id1}'
r'{https?://(www.python.org/dev/peps|peps.python.org)/pep-0008\\#id1}'
r'{\\sphinxstylestrong{PEP 8\\#id1}}')
),
(
Expand Down

0 comments on commit ef79a2b

Please sign in to comment.