scikit-learn: BUG: Stable docs intersphinx has a duplicate std:term:y
When building with intersphinx we get a warning which you can replicate with intersphinx directly
$ python -m sphinx.ext.intersphinx https://scikit-learn.org/stable/objects.inv | grep " y "
WARNING:sphinx.sphinx.util.inventory:inventory <> contains multiple definitions for std:term:y
y : glossary.html#term-y
Only one term shows up in the grep presumably because intersphinx chooses one of the two, but the WARNING line actually shows up in doc builds.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (10 by maintainers)
Thanks @jayaddison, my question was mostly out of curiosity and at this time I feel this is not worth opening a sphinx issue about it because this is a YAGNI. If the use case really happened in scikit-learn and somehow
yandYare moved to separate glossary entries, we will reconsider.As a summary of the previous comments:
yandYare the same entry in the scikit-learn glossary so we can live with the limitation thatobjects.invis case insensitiveobjects.invconsumersI’ve a potential change open at https://github.com/sphinx-doc/sphinx/pull/12586 that would filter these warnings provided that the item being pointed to is the same – so the current warning about
yandYwould disappear… but if they are modified to point to distinct targets, the warning would reappear (because the Intersphinx v2 inventory format does not support case-sensitive matches).I realize that could present some friction in cases where there is a desire to use names that vary only by character-casing; but I think we should surface the ambiguity.
Done
Agreed, seems to have been magically fixed! 🪄