|
13 | 13 | import sys |
14 | 14 | from os.path import abspath, dirname, join |
15 | 15 |
|
| 16 | +from sphinx import version_info as sphinx_version |
| 17 | + |
16 | 18 | # Workaround for sphinx-build recursion limit overflow: |
17 | 19 | # pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL) |
18 | 20 | # RuntimeError: maximum recursion depth exceeded while pickling an object |
@@ -138,13 +140,15 @@ def django_release(): |
138 | 140 | extlinks = { |
139 | 141 | "bpo": ("https://bugs.python.org/issue?@action=redirect&bpo=%s", "bpo-%s"), |
140 | 142 | "commit": ("https://github.com/django/django/commit/%s", "%s"), |
141 | | - "cve": ("https://nvd.nist.gov/vuln/detail/CVE-%s", "CVE-%s"), |
142 | 143 | "pypi": ("https://pypi.org/project/%s/", "%s"), |
143 | 144 | # A file or directory. GitHub redirects from blob to tree if needed. |
144 | 145 | "source": ("https://github.com/django/django/blob/main/%s", "%s"), |
145 | 146 | "ticket": ("https://code.djangoproject.com/ticket/%s", "#%s"), |
146 | 147 | } |
147 | 148 |
|
| 149 | +if sphinx_version < (8, 1): |
| 150 | + extlinks["cve"] = ("https://www.cve.org/CVERecord?id=CVE-%s", "CVE-%s") |
| 151 | + |
148 | 152 | # The language for content autogenerated by Sphinx. Refer to documentation |
149 | 153 | # for a list of supported languages. |
150 | 154 | # language = None |
|
0 commit comments