summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-10-11 13:50:51 +0200
committerNatalia <124304+nessita@users.noreply.github.com>2024-11-26 10:09:37 -0300
commitb381b19854f32c9ff03e6bd98865ddffbb7e7082 (patch)
tree74cc76221e92057a76f0e527b9730911534a8eb7
parentea4a1fb61e0bc6a4294a0123b82183da947e5efb (diff)
[4.2.x] Fixed docs build on Sphinx 8.1+.
Sphinx 8.1 added :cve: role, so there is no need to define it in Django: - https://github.com/sphinx-doc/sphinx/pull/11781 This also changes used URL to the one used by Python and soonish to be used by Sphinx itself: - https://github.com/sphinx-doc/sphinx/pull/13006 Backport of 263f7319192b217c4e3b1eea0ea7809836392bbc from main.
-rw-r--r--docs/conf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 8f0a3e35e8..8e353c359b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -12,6 +12,8 @@
import sys
from os.path import abspath, dirname, join
+from sphinx import version_info as sphinx_version
+
# Workaround for sphinx-build recursion limit overflow:
# pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
# RuntimeError: maximum recursion depth exceeded while pickling an object
@@ -133,13 +135,15 @@ django_next_version = "5.0"
extlinks = {
"bpo": ("https://bugs.python.org/issue?@action=redirect&bpo=%s", "bpo-%s"),
"commit": ("https://github.com/django/django/commit/%s", "%s"),
- "cve": ("https://nvd.nist.gov/vuln/detail/CVE-%s", "CVE-%s"),
"pypi": ("https://pypi.org/project/%s/", "%s"),
# A file or directory. GitHub redirects from blob to tree if needed.
"source": ("https://github.com/django/django/blob/main/%s", "%s"),
"ticket": ("https://code.djangoproject.com/ticket/%s", "#%s"),
}
+if sphinx_version < (8, 1):
+ extlinks["cve"] = ("https://www.cve.org/CVERecord?id=CVE-%s", "CVE-%s")
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None