You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the coverage.py docs, I use .. module:: coverage in a few places. They all have :no-index: on them. Sphinx 8.0.2 let me use ":mod:`coverage`" to refer to the module. Upgrading to Sphinx 8.1.3 causes a warning:
/Users/ned/coverage/trunk/doc/api.rst:12: WARNING: py:mod reference target not found: coverage [ref.mod]
If I remove :no-index: from one of the directives, then the link is made correctly.
How to Reproduce
To reproduce, clone the coverage.py repo and run tox -e doc. Three commits of interest:
5369f8ad: Sphinx 8.0.2 with the docs building correctly
13a52255: Upgrade to Sphinx 8.1.3, generates a warning, no link created
c179fb2f: Removed :no-index:, all builds properly.
c179fb2f: Removed :no-index:, all builds properly.
I read the code containing .. module:: coverage and it's used once without :no-index: in api_module.rst and twice with :no-index: in api_coverage.rst and api_coveragedata.rst... There's no instance of .. automodule:: coverage (if there were it could also function as a reST module declaration, but there isn't).
If I remove :no-index: from one of the directives, then the link is made correctly.
This is expected behavior..! Those reST directives are declarations, so at least one of them has to be inserted into the index in order for the cross-reference :mod:`coverage` to have a valid target. I'm not sure if I'm following but I'm pretty certain that's always been the Sphinx behavior since at least Sphinx 5.
So if PR c179fb2f is building why not go with it? To me it seems to have correct reStructuredText syntax.
Describe the bug
In the coverage.py docs, I use
.. module:: coverage
in a few places. They all have:no-index:
on them. Sphinx 8.0.2 let me use ":mod:`coverage`" to refer to the module. Upgrading to Sphinx 8.1.3 causes a warning:If I remove
:no-index:
from one of the directives, then the link is made correctly.How to Reproduce
To reproduce, clone the coverage.py repo and run
tox -e doc
. Three commits of interest::no-index:
, all builds properly.Environment Information
Sphinx extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: