Skip to content

Commit c8ce36b

Browse files
felixxmnessita
authored andcommitted
[5.0.x] Fixed docs build on Sphinx 8.1+.
Sphinx 8.1 added :cve: role, so there is no need to define it in Django: - sphinx-doc/sphinx#11781 This also changes used URL to the one used by Python and soonish to be used by Sphinx itself: - sphinx-doc/sphinx#13006 Backport of 263f731 from main.
1 parent 5064ddb commit c8ce36b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import sys
1313
from os.path import abspath, dirname, join
1414

15+
from sphinx import version_info as sphinx_version
16+
1517
# Workaround for sphinx-build recursion limit overflow:
1618
# pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
1719
# RuntimeError: maximum recursion depth exceeded while pickling an object
@@ -133,13 +135,15 @@ def django_release():
133135
extlinks = {
134136
"bpo": ("https://bugs.python.org/issue?@action=redirect&bpo=%s", "bpo-%s"),
135137
"commit": ("https://github.com/django/django/commit/%s", "%s"),
136-
"cve": ("https://nvd.nist.gov/vuln/detail/CVE-%s", "CVE-%s"),
137138
"pypi": ("https://pypi.org/project/%s/", "%s"),
138139
# A file or directory. GitHub redirects from blob to tree if needed.
139140
"source": ("https://github.com/django/django/blob/main/%s", "%s"),
140141
"ticket": ("https://code.djangoproject.com/ticket/%s", "#%s"),
141142
}
142143

144+
if sphinx_version < (8, 1):
145+
extlinks["cve"] = ("https://www.cve.org/CVERecord?id=CVE-%s", "CVE-%s")
146+
143147
# The language for content autogenerated by Sphinx. Refer to documentation
144148
# for a list of supported languages.
145149
# language = None

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy