Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RFC base url #9858

Merged
merged 1 commit into from Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/usage/configuration.rst
Expand Up @@ -1005,7 +1005,7 @@ that use Sphinx's HTMLWriter class.
to indicate the location of document using `The Canonical Link Relation`_.
Default: ``''``.

.. _The Canonical Link Relation: https://tools.ietf.org/html/rfc6596
.. _The Canonical Link Relation: https://datatracker.ietf.org/doc/html/rfc6596
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off topic: We have to use :rfc: role!


.. versionadded:: 1.8

Expand Down Expand Up @@ -2679,7 +2679,7 @@ Options for the linkcheck builder
doubling the wait time between attempts until it succeeds or exceeds the
``linkcheck_rate_limit_timeout``. By default, the timeout is 5 minutes.

.. _Retry-After: https://tools.ietf.org/html/rfc7231#section-7.1.3
.. _Retry-After: https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.3

.. versionadded:: 3.4

Expand Down
2 changes: 1 addition & 1 deletion sphinx/environment/__init__.py
Expand Up @@ -51,7 +51,7 @@
'cloak_email_addresses': True,
'pep_base_url': 'https://www.python.org/dev/peps/',
'pep_references': None,
'rfc_base_url': 'https://tools.ietf.org/html/',
'rfc_base_url': 'https://datatracker.ietf.org/doc/html/',
'rfc_references': None,
'input_encoding': 'utf-8-sig',
'doctitle_xform': False,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_build_html.py
Expand Up @@ -225,9 +225,9 @@ def test_html4_output(app, status, warning):
(".//a[@href='https://www.python.org/dev/peps/pep-0008']"
"[@class='pep reference external']/strong",
'Python Enhancement Proposal #8'),
(".//a[@href='https://tools.ietf.org/html/rfc1.html']"
(".//a[@href='https://datatracker.ietf.org/doc/html/rfc1.html']"
"[@class='rfc reference external']/strong", 'RFC 1'),
(".//a[@href='https://tools.ietf.org/html/rfc1.html']"
(".//a[@href='https://datatracker.ietf.org/doc/html/rfc1.html']"
"[@class='rfc reference external']/strong", 'Request for Comments #1'),
(".//a[@href='objects.html#envvar-HOME']"
"[@class='reference internal']/code/span[@class='pre']", 'HOME'),
Expand Down
10 changes: 5 additions & 5 deletions tests/test_markup.py
Expand Up @@ -36,7 +36,7 @@ def settings(app):
settings.env = app.builder.env
settings.env.temp_data['docname'] = 'dummy'
settings.contentsname = 'dummy'
settings.rfc_base_url = 'http://tools.ietf.org/html/'
settings.rfc_base_url = 'http://datatracker.ietf.org/doc/html/'
domain_context = sphinx_domains(settings.env)
domain_context.enable()
yield settings
Expand Down Expand Up @@ -181,22 +181,22 @@ def get(name):
'verify',
':rfc:`2324`',
('<p><span class="target" id="index-0"></span><a class="rfc reference external" '
'href="http://tools.ietf.org/html/rfc2324.html"><strong>RFC 2324</strong></a></p>'),
'href="http://datatracker.ietf.org/doc/html/rfc2324.html"><strong>RFC 2324</strong></a></p>'),
('\\sphinxAtStartPar\n'
'\\index{RFC@\\spxentry{RFC}!RFC 2324@\\spxentry{RFC 2324}}'
'\\sphinxhref{http://tools.ietf.org/html/rfc2324.html}'
'\\sphinxhref{http://datatracker.ietf.org/doc/html/rfc2324.html}'
'{\\sphinxstylestrong{RFC 2324}}')
),
(
# rfc role with anchor
'verify',
':rfc:`2324#id1`',
('<p><span class="target" id="index-0"></span><a class="rfc reference external" '
'href="http://tools.ietf.org/html/rfc2324.html#id1">'
'href="http://datatracker.ietf.org/doc/html/rfc2324.html#id1">'
'<strong>RFC 2324#id1</strong></a></p>'),
('\\sphinxAtStartPar\n'
'\\index{RFC@\\spxentry{RFC}!RFC 2324\\#id1@\\spxentry{RFC 2324\\#id1}}'
'\\sphinxhref{http://tools.ietf.org/html/rfc2324.html\\#id1}'
'\\sphinxhref{http://datatracker.ietf.org/doc/html/rfc2324.html\\#id1}'
'{\\sphinxstylestrong{RFC 2324\\#id1}}')
),
(
Expand Down