Bug 2330152

Summary: python-sphinx-autoapi fails to build with sphinx 8.x: Failed: DID NOT RAISE <class 'sphinx.errors.SphinxWarning'>
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-sphinx-autoapiAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 42CC: quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-sphinx-autoapi-3.6.0-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-10-01 14:44:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2275375    

Description Tomáš Hrnčiar 2024-12-03 12:32:06 UTC
python-sphinx-autoapi fails to build with sphinx 8.x in Fedora 42 (currently Rawhide).

The issue detected:
```
=================================== FAILURES ===================================
____________________ test_nothing_to_render_raises_warning _____________________

builder = <function builder.<locals>.build at 0x7f973155d580>

    def test_nothing_to_render_raises_warning(builder):
>       with pytest.raises(sphinx.errors.SphinxWarning) as exc_info:
E       Failed: DID NOT RAISE <class 'sphinx.errors.SphinxWarning'>

/builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/test_pyintegration.py:1206: Failed
----------------------------- Captured stdout call -----------------------------
Running Sphinx v8.1.3
loading translations [en]... done
making output directory... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
[AutoAPI] Reading files... [100%] /builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/example/_example.py

[AutoAPI] Mapping Data... [100%] /builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/example/_example.py

[AutoAPI] Rendering Data... 
[autosummary] generating autosummary for: index.rst
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
[AutoAPI] Adding AutoAPI TOCTree [autoapi/index] to index.rst

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/_build/html/_static/basic.css
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/_build/html/_static/documentation_options.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/_build/html/_static/language_data.js
Writing evaluated template result to /builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/_build/html/_static/alabaster.css
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build finished with problems, 6 warnings (with warnings treated as errors).
----------------------------- Captured stderr call -----------------------------
WARNING: No modules were rendered. Do you need to set autoapi_options to render additional objects? [autoapi.nothing_rendered]
/builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/index.rst:9: WARNING: toctree contains reference to nonexisting document 'autoapi/index' [toc.not_readable]
/builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/index.rst:15: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
/builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/index.rst:15: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
/builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/index.rst:15: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
/builddir/build/BUILD/python-sphinx-autoapi-3.2.1-build/sphinx_autoapi-3.2.1/tests/python/pynorender/index.rst:15: WARNING: toctree contains reference to nonexisting document 'autoapi/index'
=========================== short test summary info ============================
FAILED tests/python/test_pyintegration.py::test_nothing_to_render_raises_warning
================= 1 failed, 310 passed, 2 deselected in 20.16s =================
```

This issue is fixed in the latest version of python-sphinx-autoapi. Please, backport the patch or update the package. I plan to ship sphinx 8 in two weeks.

https://github.com/readthedocs/sphinx-autoapi/commit/23eca06f8d66763ea82ad704d370e840cb961cfe


For the logs from testing build attempts, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/python-sphinx/package/python-sphinx-autoapi/

You can test you package in mock running:

$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ --no-clean your.src.rpm
$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ shell

We'd like to include Sphinx 8 in Fedora 42.
Let us know here if you have any questions. Thank you!

Comment 1 Elliott Sales de Andrade 2025-01-19 10:46:24 UTC
It seems that Release Monitoring didn't have the link to Fedora, so I've missed a few updates. The latest version should work with Sphinx 8, but there are a couple bugs to work out first.

Comment 2 Aoife Moloney 2025-02-26 13:19:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 3 Fedora Update System 2025-09-22 00:47:21 UTC
FEDORA-2025-ca7e27ab41 (python-sphinx-autoapi-3.6.0-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-ca7e27ab41

Comment 4 Fedora Update System 2025-09-23 02:45:28 UTC
FEDORA-2025-ca7e27ab41 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-ca7e27ab41`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-ca7e27ab41

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2025-10-01 14:44:11 UTC
FEDORA-2025-ca7e27ab41 (python-sphinx-autoapi-3.6.0-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.