Skip to content

Module omitted from index can be linked in Sphinx 8.0.2, fails in 8.1.3Β #13059

@nedbat

Description

@nedbat

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:

/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.

Environment Information

Platform:              darwin; (macOS-14.7-arm64-arm-64bit)
Python version:        3.11.10 (main, Oct 20 2024, 13:53:59) [Clang 16.0.0 (clang-1600.0.26.3)])
Python implementation: CPython
Sphinx version:        8.1.3
Docutils version:      0.21.2
Jinja2 version:        3.1.4
Pygments version:      2.18.0

Sphinx extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions