Closed heirecka closed 4 months ago
Have the same. Additionally there are some pytest warnings
=============================== warnings summary ===============================
tests/test_builders.py: 11 warnings
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: 'sphinx.builders.html.StandaloneHTMLBuilder.css_files' is deprecated. Check CHANGES for Sphinx API modifications.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py: 60 warnings
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: The str interface for _CascadingStyleSheet objects is deprecated. Use css.filename instead.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py: 11 warnings
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:116: RemovedInSphinx90Warning: 'sphinx.builders.html.StandaloneHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
hasattr(app.builder, 'script_files'),
tests/test_builders.py: 11 warnings
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: 'sphinx.builders.html.StandaloneHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
js_file not in app.builder.script_files,
tests/test_builders.py: 150 warnings
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: The str interface for _JavaScript objects is deprecated. Use js.filename instead.
js_file not in app.builder.script_files,
tests/test_builders.py::test_basic
tests/test_builders.py::test_basic
/home/tkloczko/rpmbuild/BUILD/sphinx_rtd_theme-2.0.0/tests/test_builders.py:21: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
assert app.env.get_doctree('index').traverse(addnodes.toctree)
tests/test_builders.py::test_basic
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: 'sphinx.builders.html.SingleFileHTMLBuilder.css_files' is deprecated. Check CHANGES for Sphinx API modifications.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py::test_basic
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:116: RemovedInSphinx90Warning: 'sphinx.builders.html.SingleFileHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
hasattr(app.builder, 'script_files'),
tests/test_builders.py::test_basic
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: 'sphinx.builders.html.SingleFileHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
js_file not in app.builder.script_files,
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
/home/tkloczko/rpmbuild/BUILD/sphinx_rtd_theme-2.0.0/tests/test_builders.py:69: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
assert app.env.get_doctree('index').traverse(addnodes.toctree)
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsBuilder.css_files' is deprecated. Check CHANGES for Sphinx API modifications.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:116: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
hasattr(app.builder, 'script_files'),
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
js_file not in app.builder.script_files,
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsDirectoryHTMLBuilder.css_files' is deprecated. Check CHANGES for Sphinx API modifications.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:116: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsDirectoryHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
hasattr(app.builder, 'script_files'),
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsDirectoryHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
js_file not in app.builder.script_files,
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsSingleFileHTMLBuilder.css_files' is deprecated. Check CHANGES for Sphinx API modifications.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:116: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsSingleFileHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
hasattr(app.builder, 'script_files'),
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsSingleFileHTMLBuilder.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
js_file not in app.builder.script_files,
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:102: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsSingleFileHTMLBuilderLocalMedia.css_files' is deprecated. Check CHANGES for Sphinx API modifications.
if inject_css and theme_css not in app.builder.css_files:
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:116: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsSingleFileHTMLBuilderLocalMedia.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
hasattr(app.builder, 'script_files'),
tests/test_builders.py::test_empty
tests/test_builders.py::test_missing_toctree
/usr/lib/python3.10/site-packages/readthedocs_ext/readthedocs.py:117: RemovedInSphinx90Warning: 'sphinx.builders.html.ReadtheDocsSingleFileHTMLBuilderLocalMedia.script_files' is deprecated. Check CHANGES for Sphinx API modifications.
js_file not in app.builder.script_files,
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
tests/test_builders.py::test_missing_toctree
/home/tkloczko/rpmbuild/BUILD/sphinx_rtd_theme-2.0.0/tests/test_builders.py:84: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
assert app.env.get_doctree('index').traverse(addnodes.toctree) == []
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
The issue that emerges in sphinx_rtd_theme comes from a Sphinx' bugfix and is an intended change: https://www.sphinx-doc.org/en/master/changes.html#id87, https://github.com/sphinx-doc/sphinx/pull/11970
Therefore, to make the test pass and the theme to build, the expected output should be changed.
Problem
tests/test_builders.py::test_basic fails with Sphinx 7.3.7 whereas it didn't fail with 7.2.6. From a superficial look it seems like the file part (index.html) is omitted now and only the anchor
#document-foo
remains, triggering the assert.Error Logs/Results
Expected Results
Test passes
Environment Info