diff -up matplotlib-3.7.2/doc/conf.py.orig matplotlib-3.7.2/doc/conf.py
--- matplotlib-3.7.2/doc/conf.py.orig 2023-08-11 13:11:52.705650329 -0400
+++ matplotlib-3.7.2/doc/conf.py 2023-08-11 13:13:04.662668088 -0400
@@ -20,6 +20,8 @@ import sys
from urllib.parse import urlsplit, urlunsplit
import warnings
+import sphinx
+
import matplotlib
from datetime import timezone
@@ -347,6 +349,9 @@ def add_html_cache_busting(app, pagename
This adds the Matplotlib version as a query to the link reference in the
HTML, if the path is not absolute (i.e., it comes from the `_static`
directory) and doesn't already have a query.
+
+ .. note:: Sphinx 7.1 provides asset checksums; so this hook only runs on
+ Sphinx 7.0 and earlier.
"""
from sphinx.builders.html import Stylesheet, JavaScript
@@ -723,4 +728,5 @@ def setup(app):
else:
bld_type = 'rel'
app.add_config_value('releaselevel', bld_type, 'env')
- app.connect('html-page-context', add_html_cache_busting, priority=1000)
+ if sphinx.version_info[:2] < (7, 1):
+ app.connect('html-page-context', add_html_cache_busting, priority=1000)