Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 15b6dee

Browse filesBrowse files
authored
Merge pull request #26552 from QuLogic/auto-backport-of-pr-26493-on-v3.7.x
2 parents ade5315 + 6115784 commit 15b6dee
Copy full SHA for 15b6dee

File tree

1 file changed

+7
-1
lines changed
Filter options

1 file changed

+7
-1
lines changed

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
from urllib.parse import urlsplit, urlunsplit
2121
import warnings
2222

23+
import sphinx
24+
2325
import matplotlib
2426

2527
from datetime import timezone
@@ -347,6 +349,9 @@ def add_html_cache_busting(app, pagename, templatename, context, doctree):
347349
This adds the Matplotlib version as a query to the link reference in the
348350
HTML, if the path is not absolute (i.e., it comes from the `_static`
349351
directory) and doesn't already have a query.
352+
353+
.. note:: Sphinx 7.1 provides asset checksums; so this hook only runs on
354+
Sphinx 7.0 and earlier.
350355
"""
351356
from sphinx.builders.html import Stylesheet, JavaScript
352357

@@ -723,4 +728,5 @@ def setup(app):
723728
else:
724729
bld_type = 'rel'
725730
app.add_config_value('releaselevel', bld_type, 'env')
726-
app.connect('html-page-context', add_html_cache_busting, priority=1000)
731+
if sphinx.version_info[:2] < (7, 1):
732+
app.connect('html-page-context', add_html_cache_busting, priority=1000)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.