Closed
Description
Describe the bug
Numpydoc experienced test-suite failures in a mocked sphinx-app due to missing a private _exception_on_warning
attribute. This started happening with sphinx 8.1 and is likely related to #12743.
Generally speaking, I don't think this is a problem with sphinx just a change in the underlying logic related to warningiserror
and _exception_on_warning
. It's likely the behavior change is intentional - in that case please close this. I just thought I'd raise it in case this is unexpected.
The fix in numpydoc is to explicitly add the _exception_on_warning
attribute to the mocked sphinx app instance: numpy/numpydoc#586.
How to Reproduce
pip install numpydoc[test]==1.8.0 sphinx>=8.1
pytest --pyargs numpydoc
Environment Information
Package Version
----------------------------- -----------
alabaster 1.0.0
babel 2.16.0
certifi 2024.8.30
charset-normalizer 3.4.0
contourpy 1.3.0
coverage 7.6.3
cycler 0.12.1
docutils 0.21.2
fonttools 4.54.1
idna 3.10
imagesize 1.4.1
iniconfig 2.0.0
Jinja2 3.1.4
kiwisolver 1.4.7
MarkupSafe 3.0.1
matplotlib 3.9.2
numpy 2.1.2
numpydoc 1.8.0
packaging 24.1
pillow 11.0.0
pip 24.2
pluggy 1.5.0
Pygments 2.18.0
pyparsing 3.2.0
pytest 8.3.3
pytest-cov 5.0.0
python-dateutil 2.9.0.post0
requests 2.32.3
six 1.16.0
snowballstemmer 2.2.0
Sphinx 8.1.3
sphinxcontrib-applehelp 2.0.0
sphinxcontrib-devhelp 2.0.0
sphinxcontrib-htmlhelp 2.1.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 2.0.0
sphinxcontrib-serializinghtml 2.0.0
tabulate 0.9.0
urllib3 2.2.3
Sphinx extensions
numpydoc
Additional context
No response