-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: mpltype custom role breaks sphinx build for third-party projects that have intersphinx links to matplotlib #28234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Edit: Looking at the error message, I suspect this is not an intersphinx issue. Instead. You are deriving from Matplotlib and by that inherit the docstring from |
TODO: Do we have to make this role publically available via |
Maybe it makes sense to make it publically available as well as But isn't the reason for lack of earlier bug reports that very few projects inherit the doc-strings? |
I don't understand how sphinx registers things well enough, but could it be b/c :rc: is a node object (same with :mathmpl:) while I'm not sure what's going on with :mpltype: |
Matplotlib 3.9.0 added a custom Sphinx role that breaks packages that link against Matplotlib's docs using intersphinx. See matplotlib/matplotlib#28234
There are two ways you can get Sphinx extensions:
We currently have :mpltype: in (1), which I believed was enough because it’s intended for internal use only. However, it’s usage can leak into other documentations via docstring inheritance. There are three ways we can handle this:
I‘m inclined towards (3) because it’s a rare effect and (3) is the least work for us. |
Am slightly confused cause we do this in our conf far as I can tell: Line 121 in b63d846
|
(3) would mean that projects like mine would need to write dummy Sphinx extensions, right? If so, I would prefer (2). |
We should promote |
`matplotlib` 3.9.0 is causing documentation build failures for projects that inherit docstrings that use the `:mpltype:` custom role: matplotlib/matplotlib#28234 [ci skip]
I thought this problem would be gone with 3.9.1 release but it didn't... Is it just me? Example log: https://readthedocs.org/projects/astropy/builds/24905370/ |
Nvm, when I actually look at the diff of #28289 , I see now that there might be something extra I need to do downstream. |
@pllim Yeah, you have to opt-into using the extra extensions. |
`matplotlib` 3.9.0 is causing documentation build failures for projects that inherit docstrings that use the `:mpltype:` custom role: matplotlib/matplotlib#28234 [ci skip]
Bug summary
Sphinx docs builds for third-party packages that have intersphinx cross-references to matplotlib are now failing with the following error message:
This is because #27557 and Matplotlib 3.9.0 added the
:mpltype:
custom role to the docs. Would you please provide some guidance for how packages that depend on Matplotlib should be building their sphinx docs?Code for reproduction
# See https://git.ligo.org/lscsoft/ligo.skymap
Actual outcome
See https://git.ligo.org/leo-singer/ligo.skymap/-/jobs/3342134
Expected outcome
Build should complete without errors
Additional information
No response
Operating system
No response
Matplotlib Version
3.9.0
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: