Skip to content

Commit e18488c

Browse files
committed
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
1 parent 68cee15 commit e18488c

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
@@ -13,6 +13,8 @@
1313
import sys
1414
from os.path import abspath, dirname, join
1515

16+
from sphinx import version_info as sphinx_version
17+
1618
# Workaround for sphinx-build recursion limit overflow:
1719
# pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
1820
# RuntimeError: maximum recursion depth exceeded while pickling an object
@@ -138,13 +140,15 @@ def django_release():
138140
extlinks = {
139141
"bpo": ("https://bugs.python.org/issue?@action=redirect&bpo=%s", "bpo-%s"),
140142
"commit": ("https://github.com/django/django/commit/%s", "%s"),
141-
"cve": ("https://nvd.nist.gov/vuln/detail/CVE-%s", "CVE-%s"),
142143
"pypi": ("https://pypi.org/project/%s/", "%s"),
143144
# A file or directory. GitHub redirects from blob to tree if needed.
144145
"source": ("https://github.com/django/django/blob/main/%s", "%s"),
145146
"ticket": ("https://code.djangoproject.com/ticket/%s", "#%s"),
146147
}
147148

149+
if sphinx_version < (8, 1):
150+
extlinks["cve"] = ("https://www.cve.org/CVERecord?id=CVE-%s", "CVE-%s")
151+
148152
# The language for content autogenerated by Sphinx. Refer to documentation
149153
# for a list of supported languages.
150154
# language = None

0 commit comments

Comments
 (0)