Open maxnoe opened 4 months ago
To reproduce quickly:
❯ python -m sphinx.ext.intersphinx https://ipywidgets.readthedocs.io/en/stable/objects.inv | grep 'Widget Layout.ipynb#display'
WARNING:sphinx.sphinx.util.inventory:inventory <> contains multiple definitions for std:label:examples/Widget Layout.ipynb#display
examples/Widget Layout.ipynb#display display : examples/Widget%20Layout.html#id1
Hitting this as well: https://gitlab.arm.com/tooling/lisa/-/jobs/71175/raw:
loading intersphinx inventory 'IPython' from https://ipython.readthedocs.io/en/stable/objects.inv...
WARNING: inventory <https://ipywidgets.readthedocs.io/en/latest/> contains multiple definitions for std:label:examples/Widget Layout.ipynb#display
with latest sphinx on python 3.9
See here for a quick fix: https://github.com/sphinx-doc/sphinx/issues/12585#issuecomment-2228420035
E.g. see our fix here: https://github.com/cta-observatory/ctapipe/blob/fix_intersphinx_warning/docs/conf.py#L417-L419
That's what I did, but it has the unfortunate side effect that sphinx will now never complain about any broken intersphinx cross reference, even for the packages that have a working inventory. I'm relying on that in the CI to ensure we don't make typos and accidentally break links
Description
The intersphinx inventory contains duplicated definitions
Reproduce
Include
ipywidgets
in the intersphinx config, build documentation.The build warns about duplicated definitions:
Expected behavior
No duplicated object definitions, no warnings