fix for sphinx_gallery < 0.16.0 by trygvrad · Pull Request #31044 · matplotlib/matplotlib · GitHub
Skip to content

fix for sphinx_gallery < 0.16.0 - #31044

Merged
QuLogic merged 1 commit into
matplotlib:mainfrom
trygvrad:fix-for-sphinx_gallery-0.16.0
Jan 27, 2026
Merged

QuLogic merged 1 commit into
matplotlib:mainfrom
trygvrad:fix-for-sphinx_gallery-0.16.0

Conversation

@trygvrad

Copy link
Copy Markdown
Contributor

This is a simple PR that fixes a bug I discovered when trying to build the docs.
Because I have not updated my system, I have sphinx_gallery 0.14.0, and the docs do not compile due to the following line.
'reset_modules': ('matplotlib', clear_basic_units, 'sphinxext.util.patch_header'),
This is the relevant commit c9f7289
image

This PR changes how sphinxext.util.patch_header is imported so that it behaves the same as sphinxext.util.clear_basic_units, which differs depending on the version of sphinx_gallery.

An alternative solution is probably to require sphinx_gallery >= 0.16.0, but I have not evaluated this.

@trygvrad
trygvrad force-pushed the fix-for-sphinx_gallery-0.16.0 branch from aa6c4a1 to b208e7f Compare January 27, 2026 19:01
@github-actions github-actions Bot added the Documentation: build building the docs label Jan 27, 2026
@QuLogic
QuLogic merged commit cc1d9b6 into matplotlib:main Jan 27, 2026
22 of 24 checks passed
@QuLogic QuLogic added this to the v3.11.0 milestone Jan 27, 2026
andreas16700 added a commit to andreas16700/matplotlib that referenced this pull request Jan 28, 2026
andreas16700 added a commit to andreas16700/matplotlib that referenced this pull request Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: build building the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants