Control: reopen -1
Dear Maintainer,
autopkg tests still fail [1] with this error:
49s ============================= test session starts
==============================
49s platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0
49s rootdir: /tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src
49s configfile: pyproject.toml
49s plugins: cov-4.1.0
49s collected 286 items
49s
49s numpydoc/numpydoc.py . [
0%]
49s numpydoc/validate.py . [
0%]
49s numpydoc/tests/test_docscrape.py ....................................... [
14%]
49s ..................... [
21%]
50s numpydoc/tests/test_full.py FF... [
23%]
50s numpydoc/tests/test_main.py ....... [
25%]
51s numpydoc/tests/test_numpydoc.py ............. [
30%]
51s numpydoc/tests/test_validate.py ........................................ [
44%]
51s ............................................................x..x........ [
69%]
51s ........... [
73%]
51s numpydoc/tests/test_xref.py ............................................ [
88%]
52s ................... [
95%]
52s numpydoc/tests/hooks/test_utils.py ..... [
97%]
52s numpydoc/tests/hooks/test_validate_hook.py ........
[100%]
52s
52s =================================== FAILURES
===================================
52s _________________________________ test_MyClass
_________________________________
52s
52s sphinx_app = <sphinx.application.Sphinx object at 0x7fcd2d320e10>
52s
52s def test_MyClass(sphinx_app):
52s """Test that class documentation is reasonable."""
52s src_dir, out_dir = sphinx_app.srcdir, sphinx_app.outdir
52s class_rst = op.join(src_dir, "generated",
"numpydoc_test_module.MyClass.rst")
52s with open(class_rst) as fid:
52s rst = fid.read()
52s assert r"numpydoc\_test\_module" in rst # properly escaped
52s class_html = op.join(out_dir, "generated",
"numpydoc_test_module.MyClass.html")
52s with open(class_html) as fid:
52s html = fid.read()
52s # ensure that no autodoc weirdness ($) occurs
52s assert "$self" not in html
52s assert "/," not in html
52s assert "__init__" in html # inherited
52s # escaped * chars should no longer be preceded by \'s,
52s # if we see a \* in the output we know it's incorrect:
52s assert r"\*" not in html
52s # "self" should not be in the parameter list for the class:
52s assert "self," not in html
52s # check xref was embedded properly (dict should link using xref):
52s > assert "stdtypes.html#dict" in html
52s E assert 'stdtypes.html#dict' in '<!DOCTYPE html>\n\n<html lang="en"
data-content_root="../">\n <head>\n <meta charset="utf-8" />\n <meta
name="...test_module.MyClass.rst.txt"\n rel="nofollow">Page
source</a>\n </div>\n\n \n\n \n </body>\n</html>'
52s
52s class_html =
'/tmp/pytest-of-debci/pytest-0/root/_build/html/generated/numpydoc_test_module.MyClass.html'
52s class_rst =
'/tmp/pytest-of-debci/pytest-0/root/generated/numpydoc_test_module.MyClass.rst'
52s fid = <_io.TextIOWrapper
name='/tmp/pytest-of-debci/pytest-0/root/_build/html/generated/numpydoc_test_module.MyClass.html'
mode='r' encoding='UTF-8'>
52s html = '<!DOCTYPE html>\n\n<html lang="en"
data-content_root="../">\n <head>\n <meta charset="utf-8" />\n <meta
name="...test_module.MyClass.rst.txt"\n rel="nofollow">Page
source</a>\n </div>\n\n \n\n \n </body>\n</html>'
52s out_dir = _StrPath('/tmp/pytest-of-debci/pytest-0/root/_build/html')
52s rst =
'\ufeffnumpydoc\\_test\\_module.MyClass\n==============================\n\n..
currentmodule:: numpydoc_test_module\n\n...bric:: Methods\n\n ..
autosummary::\n \n
~MyClass.__init__\n ~MyClass.example\n \n \n\n \n \n '
52s sphinx_app = <sphinx.application.Sphinx object at 0x7fcd2d320e10>
52s src_dir = _StrPath('/tmp/pytest-of-debci/pytest-0/root')
52s
52s numpydoc/tests/test_full.py:62: AssertionError
52s ---------------------------- Captured stdout setup
-----------------------------
52s [01mRunning Sphinx v7.2.6[39;49;00m
52s [01mmaking output directory... [39;49;00mdone
52s loading intersphinx inventory from
/usr/share/doc/python3/html/objects.inv...
52s [autosummary] generating autosummary for: index.rst
52s [autosummary] generating autosummary for:
/tmp/pytest-of-debci/pytest-0/root/generated/numpydoc_test_module.MyClass.rst,
/tmp/pytest-of-debci/pytest-0/root/generated/numpydoc_test_module.my_function.rst
52s [01mbuilding [mo]: [39;49;00mtargets for 0 po files that are out of date
52s [01mwriting output... [39;49;00m
52s [01mbuilding [html]: [39;49;00mtargets for 1 source files that are out
of date
52s [01mupdating environment: [39;49;00m[new config] 3 added, 0 changed, 0
removed
52s [2K[01mreading sources... [39;49;00m[ 33%]
[35mgenerated/numpydoc_test_module.MyClass[39;49;00m
[2K[01mreading sources... [39;49;00m[ 67%]
[35mgenerated/numpydoc_test_module.my_function[39;49;00m
[2K[01mreading sources... [39;49;00m[100%] [35mindex[39;49;00m
52s [01mlooking for now-outdated files... [39;49;00mnone found
52s [01mpickling environment... [39;49;00mdone
52s [01mchecking consistency... [39;49;00mdone
52s [01mpreparing documents... [39;49;00mdone
52s [01mcopying assets... [39;49;00m[01mcopying static files...
[39;49;00mdone
52s [01mcopying extra files... [39;49;00mdone
52s done
52s [2K[01mwriting output... [39;49;00m[ 33%]
[32mgenerated/numpydoc_test_module.MyClass[39;49;00m
[2K[01mwriting output... [39;49;00m[ 67%]
[32mgenerated/numpydoc_test_module.my_function[39;49;00m
[2K[01mwriting output... [39;49;00m[100%] [32mindex[39;49;00m
52s [01mgenerating indices... [39;49;00mgenindex py-modindex done
52s [01mwriting additional pages... [39;49;00msearch done
52s [01mdumping search index in English (code: en)... [39;49;00mdone
52s [01mdumping object inventory... [39;49;00mdone
52s [01mbuild finished with problems, 6 warnings.[39;49;00m
52s ---------------------------- Captured stderr setup
-----------------------------
52s [91mWARNING: failed to reach any of the inventories with the following
issues:
52s intersphinx inventory '/usr/share/doc/python3/html/objects.inv' not
fetchable due to <class 'FileNotFoundError'>: [Errno 2] No such file or
directory:
'/usr/share/doc/python3/html/objects.inv'[39;49;00m
52s
[91m/tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src/numpydoc/tests/tinybuild/numpydoc_test_module.py:docstring
of numpydoc_test_module.MyClass:9: WARNING: term not in glossary:
'python:iterable'[39;49;00m
52s
[91m/tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src/numpydoc/tests/tinybuild/numpydoc_test_module.py:docstring
of numpydoc_test_module.MyClass:21: WARNING: py:class reference target not
found: python:dict[39;49;00m
52s
[91m/tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src/numpydoc/tests/tinybuild/numpydoc_test_module.py:docstring
of numpydoc_test_module.my_function:9: WARNING: term not in glossary:
'python:iterable'[39;49;00m
52s
[91m/tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src/numpydoc/tests/tinybuild/numpydoc_test_module.py:docstring
of numpydoc_test_module.my_function:12: WARNING: py:class reference target not
found: python:dict[39;49;00m
52s
[91m/tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src/numpydoc/tests/tinybuild/numpydoc_test_module.py:docstring
of numpydoc_test_module.my_function:25: WARNING: py:data reference target not
found: python:None[39;49;00m
52s _______________________________ test_my_function
_______________________________
52s
52s sphinx_app = <sphinx.application.Sphinx object at 0x7fcd2d320e10>
52s
52s def test_my_function(sphinx_app):
52s """Test that function documentation is reasonable."""
52s out_dir = sphinx_app.outdir
52s function_html = op.join(
52s out_dir, "generated", "numpydoc_test_module.my_function.html"
52s )
52s with open(function_html) as fid:
52s html = fid.read()
52s assert r"\*args" not in html
52s assert "*args" in html
52s # check xref (iterable should link using xref):
52s > assert "glossary.html#term-iterable" in html
52s E assert 'glossary.html#term-iterable' in '<!DOCTYPE html>\n\n<html
lang="en" data-content_root="../">\n <head>\n <meta charset="utf-8" />\n
<meta
name="..._module.my_function.rst.txt"\n rel="nofollow">Page
source</a>\n </div>\n\n \n\n \n </body>\n</html>'
52s
52s fid = <_io.TextIOWrapper
name='/tmp/pytest-of-debci/pytest-0/root/_build/html/generated/numpydoc_test_module.my_function.html'
mode='r' encoding='UTF-8'>
52s function_html =
'/tmp/pytest-of-debci/pytest-0/root/_build/html/generated/numpydoc_test_module.my_function.html'
52s html = '<!DOCTYPE html>\n\n<html lang="en"
data-content_root="../">\n <head>\n <meta charset="utf-8" />\n <meta
name="..._module.my_function.rst.txt"\n rel="nofollow">Page
source</a>\n </div>\n\n \n\n \n </body>\n</html>'
52s out_dir = _StrPath('/tmp/pytest-of-debci/pytest-0/root/_build/html')
52s sphinx_app = <sphinx.application.Sphinx object at 0x7fcd2d320e10>
52s
52s numpydoc/tests/test_full.py:76: AssertionError
52s =============================== warnings summary
===============================
52s ../../../../../usr/lib/python3/dist-packages/babel/messages/catalog.py:13
52s /usr/lib/python3/dist-packages/babel/messages/catalog.py:13:
DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
52s from cgi import parse_header
52s
52s -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
52s - generated xml file:
/tmp/autopkgtest-lxc.4al_chdi/downtmp/build.77I/src/junit-results.xml -
52s =========================== short test summary info
============================
52s XFAIL
numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadParameters-blank_lines-msgs30]
52s XFAIL
numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadReturns-no_type-msgs33]
52s FAILED numpydoc/tests/test_full.py::test_MyClass - assert
'stdtypes.html#dict...
52s FAILED numpydoc/tests/test_full.py::test_my_function - assert
'glossary.html#...
52s ============= 2 failed, 282 passed, 2 xfailed, 1 warning in 4.17s
==============
52s autopkgtest [16:07:25]: test command1: -----------------------]
52s autopkgtest [16:07:25]: test command1: - - - - - - - - - - results - - -
- - - - - - -
52s command1 FAIL non-zero exit status 1
52s autopkgtest [16:07:25]: @@@@@@@@@@@@@@@@@@@@ summary
52s command1 FAIL non-zero exit status 1
Attached patch makes autopkg tests pass again with numpydoc
in trixie and python3-defaults from unstable.
I guess is fine to stop treating sphinx warnings as errors
that make documentation unbuildable, but evaluate by yourself
if this change is appropriate.
Kind Regards
[1] https://ci.debian.net/packages/n/numpydoc/testing/amd64/
Index: numpydoc-1.6.0/numpydoc/tests/tinybuild/Makefile
===================================================================
--- numpydoc-1.6.0.orig/numpydoc/tests/tinybuild/Makefile
+++ numpydoc-1.6.0/numpydoc/tests/tinybuild/Makefile
@@ -5,7 +5,7 @@ clean:
rm -rf generated/
html:
- sphinx-build -nWT --keep-going -b html -d _build/doctrees . _build/html
+ sphinx-build -nT --keep-going -b html -d _build/doctrees . _build/html
show:
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(PWD)/_build/html/index.html')"