Open KaKkouo opened 3 years ago
It seems TeXInfo and ManPage builders raise NoUri exception: https://github.com/sphinx-doc/sphinx/blob/4c91c038b220d07bbdfe0c1680af42fe897f342c/sphinx/builders/texinfo.py#L62-L70 https://github.com/sphinx-doc/sphinx/blob/4c91c038b220d07bbdfe0c1680af42fe897f342c/sphinx/builders/manpage.py#L51-L54
Thank you for taking the time to write a comment. I'm sorry, but I'm curious about something, so let me check.
Is this understanding correct? If so, I have no further questions.
Is this understanding correct? If so, I have no further questions.
No. The IndexEntries class is also used in other builders. For example, LaTeX builder uses it to generate indices: https://github.com/sphinx-doc/sphinx/blob/4c91c038b220d07bbdfe0c1680af42fe897f342c/sphinx/writers/latex.py#L498-L535
It seems texinfo also uses it. At present, manpage does not use it. But it does not mean manpage will not support indices in the future.
$ grep -lr IndexEntry sphinx | grep -v pyc
sphinx/domains/__init__.py
sphinx/domains/python.py
sphinx/writers/texinfo.py
sphinx/writers/latex.py
sphinx/util/nodes.py
sphinx/builders/html/__init__.py
Of course, 3rd party builders can also use it. Nothing prohibited.
The class name is "IndexEngries", not "IndexEntry". All of the content you showed me was about "IndexEntry" and not about "IndexEntries". It seems that "IndexEntries" is only used in "html".
$ find . -name \*.py -exec egrep -n IndexEntries {} \; -print
35:from sphinx.environment.adapters.indexentries import IndexEntries
690: genindex = IndexEntries(self.env).create_index(self)
./builders/html/__init__.py
26:class IndexEntries:
./environment/adapters/indexentries.py
$
Describe the bug
The get_relative_uri function doesn't raise NoUri. But It is assumed in IndexEntries class.
sphinx/environment/adapters/indexentries.py
sphinx/builders/html/init.py
sphinx/builders/init.py
sphinx/util/osutil.py
How to Reproduce
There is currently no situation in which NoUri occurs.
Expected behavior
I don't know whether NoUri should be triggered or whether there is no situation to trigger NoUri.
Your project
none
Screenshots
No response
OS
Windows10
Python version
3.8.10
Sphinx version
4.2.0
Sphinx extensions
No response
Extra tools
No response
Additional context
No response