sphinx-doc / sphinx-doc/sphinx
Configuration `suppress_warnings` -> 'ref.term' is ignored
Open
Nobody has claimed this yet.
type:bug
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Despite adding 'ref.term' to suppress_warnings in my conf.py sphinx build still throws:
WARNING: duplicate term description of ..., other instance in ...
I have narrowed down this to:
https://github.com/sphinx-doc/sphinx/blob/b458850b329f3112b6e8df7a19ff21fa478fb2d3/sphinx/domains/std/__init__.py#L663
How to Reproduce
- Add
'ref.term'tosuppress_warningsin yourconf.py - Create two ReST documents:
a.rstandb.rst - Add glossary with the same term in both
- Run build
- Warning is still visible
Environment Information
Platform: darwin; (macOS-15.1.1-arm64-arm-64bit-Mach-O)
Python version: 3.13.0 (main, Oct 7 2024, 05:02:14) [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 8.1.3
sphinx-rtd-theme 3.0.2
sphinxcontrib-applehelp 2.0.0
sphinxcontrib-devhelp 2.0.0
sphinxcontrib-htmlhelp 2.1.0
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 2.0.0
sphinxcontrib-serializinghtml 2.0.0
### Sphinx extensions
Doesn't matter
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading sphinx/domains/std/init.py at the linked warning path, then reproduce the issue with suppress_warnings in conf.py and duplicate glossary terms in a.rst and b.rst. Done means the duplicate term warning is suppressed when ref.term is configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100