Skip to content

Commit d083e2e

Browse files
authored
Merge pull request #10267 from nijel/patch-1
environment: Update default value for pep_base_url
2 parents 4e9c101 + ef79a2b commit d083e2e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sphinx/environment/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
'embed_images': False,
4242
'embed_stylesheet': False,
4343
'cloak_email_addresses': True,
44-
'pep_base_url': 'https://www.python.org/dev/peps/',
44+
'pep_base_url': 'https://peps.python.org/',
4545
'pep_references': None,
4646
'rfc_base_url': 'https://datatracker.ietf.org/doc/html/',
4747
'rfc_references': None,

tests/test_build_html.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ def test_html4_output(app, status, warning):
212212
(".//li/p/code/span[@class='pre']", '^a/$'),
213213
(".//li/p/code/em/span[@class='pre']", '^varpart$'),
214214
(".//li/p/code/em/span[@class='pre']", '^i$'),
215-
(".//a[@href='https://www.python.org/dev/peps/pep-0008']"
215+
(".//a[@href='https://peps.python.org/pep-0008']"
216216
"[@class='pep reference external']/strong", 'PEP 8'),
217-
(".//a[@href='https://www.python.org/dev/peps/pep-0008']"
217+
(".//a[@href='https://peps.python.org/pep-0008']"
218218
"[@class='pep reference external']/strong",
219219
'Python Enhancement Proposal #8'),
220220
(".//a[@href='https://datatracker.ietf.org/doc/html/rfc1.html']"

tests/test_markup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ def get(name):
150150
':pep:`8`',
151151
# since docutils-0.19, :pep: role points to python.org via https schema
152152
('<p><span class="target" id="index-0"></span><a class="pep reference external" '
153-
'href="https?://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a></p>'),
153+
'href="https?://(www.python.org/dev/peps|peps.python.org)/pep-0008"><strong>PEP 8</strong></a></p>'),
154154
(r'\\sphinxAtStartPar\n'
155155
r'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
156-
r'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{https?://www.python.org/dev/peps/pep-0008}'
156+
r'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{https?://(www.python.org/dev/peps|peps.python.org)/pep-0008}'
157157
r'{\\sphinxstylestrong{PEP 8}}')
158158
),
159159
(
@@ -162,12 +162,12 @@ def get(name):
162162
':pep:`8#id1`',
163163
# since docutils-0.19, :pep: role points to python.org via https schema
164164
('<p><span class="target" id="index-0"></span><a class="pep reference external" '
165-
'href="https?://www.python.org/dev/peps/pep-0008#id1">'
165+
'href="https?://(www.python.org/dev/peps|peps.python.org)/pep-0008#id1">'
166166
'<strong>PEP 8#id1</strong></a></p>'),
167167
(r'\\sphinxAtStartPar\n'
168168
r'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
169169
r'!PEP 8\\#id1@\\spxentry{PEP 8\\#id1}}\\sphinxhref'
170-
r'{https?://www.python.org/dev/peps/pep-0008\\#id1}'
170+
r'{https?://(www.python.org/dev/peps|peps.python.org)/pep-0008\\#id1}'
171171
r'{\\sphinxstylestrong{PEP 8\\#id1}}')
172172
),
173173
(

0 commit comments

Comments
 (0)