Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-16 19:56:38 +0300
committerGitHub <noreply@github.com>2022-03-16 19:56:38 +0300
commitd083e2ee027046b6e0783870e3a4403ed2fa0c07 (patch)
tree6997acca25244c5115c795eda61492425154ce46
parent4e9c1017edc3253f8cd95c9d5fef7bbac4b18211 (diff)
parentef79a2bc70987727b183685b67cf550de294eecb (diff)
Merge pull request #10267 from nijel/patch-1
environment: Update default value for pep_base_url
-rw-r--r--sphinx/environment/__init__.py2
-rw-r--r--tests/test_build_html.py4
-rw-r--r--tests/test_markup.py8
3 files changed, 7 insertions, 7 deletions
diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py
index b5b135241..07c003b3e 100644
--- a/sphinx/environment/__init__.py
+++ b/sphinx/environment/__init__.py
@@ -41,7 +41,7 @@ default_settings: Dict[str, Any] = {
'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,
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index f50f72a9c..77371d002 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -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']"
diff --git a/tests/test_markup.py b/tests/test_markup.py
index 39ad62784..6ec592073 100644
--- a/tests/test_markup.py
+++ b/tests/test_markup.py
@@ -150,10 +150,10 @@ def get_verifier(verify, verify_re):
':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}}')
),
(
@@ -162,12 +162,12 @@ def get_verifier(verify, verify_re):
':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}}')
),
(