Skip to content

Instantly share code, notes, and snippets.

@tfc
Created February 22, 2023 08:56
Show Gist options
  • Save tfc/980d1a45c88d1b5c2a50338f04c0bcd8 to your computer and use it in GitHub Desktop.
Save tfc/980d1a45c88d1b5c2a50338f04c0bcd8 to your computer and use it in GitHub Desktop.
sphinx 5.3.0 build errors
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing pytest-check-hook
Using pytestCheckPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/8ifqd5qdrnb5gl5d0m8ylqlzc5a5nv7f-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/utils/release-checklist
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing pipBuildPhase
Creating a wheel...
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Processing /build/source
Running command Preparing metadata (pyproject.toml)
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: Sphinx
Running command Building wheel for Sphinx (pyproject.toml)
Building wheel for Sphinx (pyproject.toml) ... done
Created wheel for Sphinx: filename=sphinx-5.3.0-py3-none-any.whl size=3183149 sha256=1b8ebc39f2072286352625d58d90e3db7f08835fb1a3e5211ca32e1f8ddab314
Stored in directory: /build/pip-ephem-wheel-cache-3a1oi9vh/wheels/79/4b/9b/fc24941d75fdb959a71ee80195b2c89d6ae9389f9f0f80fb22
Successfully built Sphinx
Finished creating a wheel...
Finished executing pipBuildPhase
@nix { "action": "setPhase", "phase": "installPhase" }
installing
Executing pipInstallPhase
/build/source/dist /build/source
Processing ./sphinx-5.3.0-py3-none-any.whl
Requirement already satisfied: babel>=2.9 in /nix/store/899mwdh50kxhzf955w5iz6lxxf8zmcsa-python3.10-babel-2.11.0/lib/python3.10/site-packages (from sphinx==5.3.0) (2.11.0)
Requirement already satisfied: docutils<0.20,>=0.14 in /nix/store/jykhzfz3h46jbxwlfg9sfydkx3zb20h3-python3.10-docutils-0.19/lib/python3.10/site-packages (from sphinx==5.3.0) (0.19)
Requirement already satisfied: sphinxcontrib-applehelp in /nix/store/dp2sr3iaqrli4bjrawvjxyhyk5c7dplx-python3.10-sphinxcontrib-applehelp-1.0.2/lib/python3.10/site-packages (from sphinx==5.3.0) (1.0.2)
Requirement already satisfied: alabaster<0.8,>=0.7 in /nix/store/7g3j479qjn8xqrdvmfrmyn356xds80xc-python3.10-alabaster-0.7.12/lib/python3.10/site-packages (from sphinx==5.3.0) (0.7.12)
Requirement already satisfied: Pygments>=2.12 in /nix/store/bwlyld4z8kpj3wrbxq9849jmx379vn17-python3.10-pygments-2.14.0/lib/python3.10/site-packages (from sphinx==5.3.0) (2.14.0)
Requirement already satisfied: sphinxcontrib-devhelp in /nix/store/93bqh6zznsjfp4h700zdnfr3mbayy8nj-python3.10-sphinxcontrib-devhelp-1.0.2/lib/python3.10/site-packages (from sphinx==5.3.0) (1.0.2)
Requirement already satisfied: sphinxcontrib-qthelp in /nix/store/j0xq2hkp2vvnw0why7yyjpxyd0l4hyb0-python3.10-sphinxcontrib-qthelp-1.0.3/lib/python3.10/site-packages (from sphinx==5.3.0) (1.0.3)
Requirement already satisfied: imagesize>=1.3 in /nix/store/qp16975fcbqmw0bcjiric6cpvpxsnrkf-python3.10-imagesize-1.4.1/lib/python3.10/site-packages (from sphinx==5.3.0) (1.4.1)
Requirement already satisfied: requests>=2.5.0 in /nix/store/irz66r145li6xa0x5ia2j3laq0v3frfa-python3.10-requests-2.28.2/lib/python3.10/site-packages (from sphinx==5.3.0) (2.28.2)
Requirement already satisfied: packaging>=21.0 in /nix/store/s93sm7cyxbsfrpam3ainzkqsqdd6z4sm-python3.10-packaging-21.3/lib/python3.10/site-packages (from sphinx==5.3.0) (21.3)
Requirement already satisfied: sphinxcontrib-serializinghtml>=1.1.5 in /nix/store/958p64b5hg748pq3hqrak3v2wpbld9vn-python3.10-sphinxcontrib-serializinghtml-1.1.5/lib/python3.10/site-packages (from sphinx==5.3.0) (1.1.5)
Requirement already satisfied: sphinxcontrib-htmlhelp>=2.0.0 in /nix/store/h8yvlbwpbswjywk66vg7zifjkrh2aiz1-python3.10-sphinxcontrib-htmlhelp-2.0.0/lib/python3.10/site-packages (from sphinx==5.3.0) (2.0.0)
Requirement already satisfied: Jinja2>=3.0 in /nix/store/1pccpc1csqm9vc0h4cnsxpkz6zm67ywm-python3.10-Jinja2-3.1.2/lib/python3.10/site-packages (from sphinx==5.3.0) (3.1.2)
Requirement already satisfied: snowballstemmer>=2.0 in /nix/store/737fqfp0pgmgqpjk9fjar0ni14sxcpzf-python3.10-snowballstemmer-2.2.0/lib/python3.10/site-packages (from sphinx==5.3.0) (2.2.0)
Requirement already satisfied: sphinxcontrib-jsmath in /nix/store/gg8wqfw1hg225c95vqvn9gfwn4bwm5sp-python3.10-sphinxcontrib-jsmath-1.0.1/lib/python3.10/site-packages (from sphinx==5.3.0) (1.0.1)
Requirement already satisfied: pytz>=2015.7 in /nix/store/hph4zx8p313gl9m8bsv5pd1qh0gsz3dl-python3.10-pytz-2022.7.1/lib/python3.10/site-packages (from babel>=2.9->sphinx==5.3.0) (2022.7.1)
Requirement already satisfied: MarkupSafe>=2.0 in /nix/store/cavp3wj664apjnc8vc2lhhyzcznzkfkw-python3.10-markupsafe-2.1.1/lib/python3.10/site-packages (from Jinja2>=3.0->sphinx==5.3.0) (2.1.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /nix/store/kncd63i9ikf66w54md2vpbwl756pzshx-python3.10-pyparsing-3.0.9/lib/python3.10/site-packages (from packaging>=21.0->sphinx==5.3.0) (3.0.9)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /nix/store/i13wcvp87gzdmzqw8f5r9zq3vsbxv4ks-python3.10-urllib3-1.26.13/lib/python3.10/site-packages (from requests>=2.5.0->sphinx==5.3.0) (1.26.13)
Requirement already satisfied: charset-normalizer<4,>=2 in /nix/store/33kz32l89mkp0i9lj24gmbg29j3r17y3-python3.10-charset-normalizer-3.0.1/lib/python3.10/site-packages (from requests>=2.5.0->sphinx==5.3.0) (3.0.1)
Requirement already satisfied: idna<4,>=2.5 in /nix/store/rm8d28j68la8pihp7hyibbqmpxdw8cln-python3.10-idna-3.4/lib/python3.10/site-packages (from requests>=2.5.0->sphinx==5.3.0) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /nix/store/3shkvz7v5m6hdvl35d9nynnxl6aj4s34-python3.10-certifi-2022.12.07/lib/python3.10/site-packages (from requests>=2.5.0->sphinx==5.3.0) (2022.12.7)
Installing collected packages: sphinx
Successfully installed sphinx-5.3.0
/build/source
Finished executing pipInstallPhase
@nix { "action": "setPhase", "phase": "pythonOutputDistPhase" }
pythonOutputDistPhase
Executing pythonOutputDistPhase
Finished executing pythonOutputDistPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0
checking for references to /build/ in /nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0...
patching script interpreter paths in /nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0
stripping (with command strip and flags -S) in /nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0/lib /nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/mcvyr9aryyrvr0n3pvwjmmxhq54fnv1a-python3.10-sphinx-5.3.0-dist
checking for references to /build/ in /nix/store/mcvyr9aryyrvr0n3pvwjmmxhq54fnv1a-python3.10-sphinx-5.3.0-dist...
patching script interpreter paths in /nix/store/mcvyr9aryyrvr0n3pvwjmmxhq54fnv1a-python3.10-sphinx-5.3.0-dist
Rewriting #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9/bin/python3.10 to #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9
wrapping `/nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0/bin/sphinx-build'...
Rewriting #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9/bin/python3.10 to #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9
wrapping `/nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0/bin/sphinx-apidoc'...
Rewriting #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9/bin/python3.10 to #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9
wrapping `/nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0/bin/sphinx-quickstart'...
Rewriting #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9/bin/python3.10 to #!/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9
wrapping `/nix/store/q8jwd2s0cb677c0sblp0wlipxdsg96rn-python3.10-sphinx-5.3.0/bin/sphinx-autogen'...
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
@nix { "action": "setPhase", "phase": "installCheckPhase" }
running install tests
no Makefile or custom installCheckPhase, doing nothing
@nix { "action": "setPhase", "phase": "pythonCatchConflictsPhase" }
pythonCatchConflictsPhase
@nix { "action": "setPhase", "phase": "pythonRemoveBinBytecodePhase" }
pythonRemoveBinBytecodePhase
@nix { "action": "setPhase", "phase": "pythonImportsCheckPhase" }
pythonImportsCheckPhase
Executing pythonImportsCheckPhase
@nix { "action": "setPhase", "phase": "pytestCheckPhase" }
pytestCheckPhase
Executing pytestCheckPhase
============================= test session starts ==============================
platform linux -- Python 3.10.9, pytest-7.2.0, pluggy-1.0.0
libraries: Sphinx-5.3.0, docutils-0.19
base tempdir: /build/pytest-of-nixbld/pytest-0
rootdir: /build/source, configfile: pyproject.toml, testpaths: tests
collected 1862 items / 5 deselected / 1857 selected
tests/test_api_translator.py ........... [ 0%]
tests/test_application.py ........ [ 1%]
tests/test_build.py .......... [ 1%]
tests/test_build_changes.py .. [ 1%]
tests/test_build_dirhtml.py . [ 1%]
tests/test_build_epub.py ..........s [ 2%]
tests/test_build_gettext.py ..s..... [ 2%]
tests/test_build_html.py ............................................... [ 5%]
........................................................................ [ 9%]
.............................................sssssssssssssssss.......... [ 13%]
........................................................................ [ 16%]
........................................................................ [ 20%]
........................................................................ [ 24%]
........................................................................ [ 28%]
........................................................................ [ 32%]
... [ 32%]
tests/test_build_latex.py ssssss........................................ [ 35%]
...........s.................s....... [ 37%]
tests/test_build_linkcheck.py ........................... [ 38%]
tests/test_build_manpage.py ...... [ 38%]
tests/test_build_texinfo.py .s....... [ 39%]
tests/test_build_text.py ............... [ 40%]
tests/test_builder.py .. [ 40%]
tests/test_catalogs.py ... [ 40%]
tests/test_config.py ..................................... [ 42%]
tests/test_correct_year.py ... [ 42%]
tests/test_directive_code.py ......................................... [ 44%]
tests/test_directive_object_description.py . [ 44%]
tests/test_directive_only.py . [ 44%]
tests/test_directive_other.py ....... [ 45%]
tests/test_directive_patch.py ... [ 45%]
tests/test_docutilsconf.py .. [ 45%]
tests/test_domain_c.py .......................... [ 46%]
tests/test_domain_cpp.py ............................................... [ 49%]
........ [ 49%]
tests/test_domain_js.py ......... [ 50%]
tests/test_domain_py.py ................................................ [ 52%]
....... [ 53%]
tests/test_domain_rst.py ........ [ 53%]
tests/test_domain_std.py ..................... [ 54%]
tests/test_environment.py .... [ 55%]
tests/test_environment_indexentries.py ........ [ 55%]
tests/test_environment_record_dependencies.py . [ 55%]
tests/test_environment_toctree.py ........... [ 56%]
tests/test_errors.py .. [ 56%]
tests/test_events.py ... [ 56%]
tests/test_ext_apidoc.py ......................... [ 57%]
tests/test_ext_autodoc.py .............................................. [ 60%]
........................ [ 61%]
tests/test_ext_autodoc_autoattribute.py .............. [ 62%]
tests/test_ext_autodoc_autoclass.py .................. [ 63%]
tests/test_ext_autodoc_autodata.py ........ [ 63%]
tests/test_ext_autodoc_autofunction.py ............. [ 64%]
tests/test_ext_autodoc_automodule.py ...... [ 64%]
tests/test_ext_autodoc_autoproperty.py ... [ 64%]
tests/test_ext_autodoc_configs.py ................................ [ 66%]
tests/test_ext_autodoc_events.py ...... [ 66%]
tests/test_ext_autodoc_mock.py ....... [ 67%]
tests/test_ext_autodoc_preserve_defaults.py . [ 67%]
tests/test_ext_autodoc_private_members.py ..... [ 67%]
tests/test_ext_autosectionlabel.py ... [ 67%]
tests/test_ext_autosummary.py ........................ [ 69%]
tests/test_ext_coverage.py .... [ 69%]
tests/test_ext_doctest.py ...... [ 69%]
tests/test_ext_duration.py . [ 69%]
tests/test_ext_extlinks.py ... [ 69%]
tests/test_ext_githubpages.py ... [ 70%]
tests/test_ext_graphviz.py ssss. [ 70%]
tests/test_ext_ifconfig.py . [ 70%]
tests/test_ext_inheritance_diagram.py sssss. [ 70%]
tests/test_ext_intersphinx.py .................... [ 71%]
tests/test_ext_math.py sss................ [ 72%]
tests/test_ext_napoleon.py ................. [ 73%]
tests/test_ext_napoleon_docstring.py ................................... [ 75%]
................ [ 76%]
tests/test_ext_napoleon_iterators.py ................. [ 77%]
tests/test_ext_todo.py ... [ 77%]
tests/test_ext_viewcode.py F.... [ 77%]
tests/test_extension.py . [ 77%]
tests/test_highlighting.py ..... [ 78%]
tests/test_intl.py ............................................FF...... [ 80%]
tests/test_locale.py ... [ 81%]
tests/test_markup.py .................................... [ 82%]
tests/test_metadata.py . [ 83%]
tests/test_parser.py . [ 83%]
tests/test_project.py ... [ 83%]
tests/test_pycode.py ......... [ 83%]
tests/test_pycode_ast.py .......................................... [ 85%]
tests/test_pycode_parser.py ............................ [ 87%]
tests/test_quickstart.py .......... [ 88%]
tests/test_roles.py . [ 88%]
tests/test_search.py ........... [ 88%]
tests/test_setup_command.py ....... [ 89%]
tests/test_smartquotes.py .......... [ 89%]
tests/test_templating.py ... [ 89%]
tests/test_theming.py ....... [ 90%]
tests/test_toctree.py ... [ 90%]
tests/test_transforms_post_transforms.py .... [ 90%]
tests/test_transforms_post_transforms_code.py ... [ 90%]
tests/test_util.py ........ [ 91%]
tests/test_util_docstrings.py ... [ 91%]
tests/test_util_docutils.py ... [ 91%]
tests/test_util_fileutil.py .. [ 91%]
tests/test_util_i18n.py ....... [ 91%]
tests/test_util_images.py .... [ 92%]
tests/test_util_inspect.py ......................................... [ 94%]
tests/test_util_inventory.py ... [ 94%]
tests/test_util_logging.py .................. [ 95%]
tests/test_util_matching.py ........... [ 96%]
tests/test_util_nodes.py .......................... [ 97%]
tests/test_util_rst.py ....... [ 97%]
tests/test_util_template.py .. [ 97%]
tests/test_util_typing.py ........................... [ 99%]
tests/test_versioning.py .......... [ 99%]
tests/test_writer_latex.py . [100%]
=================================== FAILURES ===================================
________________________________ test_viewcode _________________________________
app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7fffe2841bd0>
warning = <_io.StringIO object at 0x7fffe2841c60>
@pytest.mark.sphinx(testroot='ext-viewcode')
def test_viewcode(app, status, warning):
app.builder.build_all()
warnings = re.sub(r'\\+', '/', warning.getvalue())
assert re.findall(
r"index.rst:\d+: WARNING: Object named 'func1' not found in include " +
r"file .*/spam/__init__.py'",
warnings
)
result = (app.outdir / 'index.html').read_text(encoding='utf8')
assert result.count('href="_modules/spam/mod1.html#func1"') == 2
assert result.count('href="_modules/spam/mod2.html#func2"') == 2
assert result.count('href="_modules/spam/mod1.html#Class1"') == 2
assert result.count('href="_modules/spam/mod2.html#Class2"') == 2
assert result.count('@decorator') == 1
# test that the class attribute is correctly documented
assert result.count('this is Class3') == 2
assert 'this is the class attribute class_attr' in result
# the next assert fails, until the autodoc bug gets fixed
assert result.count('this is the class attribute class_attr') == 2
result = (app.outdir / '_modules/spam/mod1.html').read_text(encoding='utf8')
result = re.sub('<span class=".*?">', '<span>', result) # filter pygments classes
> assert ('<div class="viewcode-block" id="Class1"><a class="viewcode-back" '
'href="../../index.html#spam.Class1">[docs]</a>'
'<span>@decorator</span>\n'
'<span>class</span> <span>Class1</span>'
'<span>(</span><span>object</span><span>):</span>\n'
' <span>&quot;&quot;&quot;</span>\n'
'<span> this is Class1</span>\n'
'<span> &quot;&quot;&quot;</span></div>\n') in result
E assert '<div class="viewcode-block" id="Class1"><a class="viewcode-back" href="../../index.html#spam.Class1">[docs]</a><span>...an>\n <span>&quot;&quot;&quot;</span>\n<span> this is Class1</span>\n<span> &quot;&quot;&quot;</span></div>\n' in '\n<!DOCTYPE html>\n\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="wid..."https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>\n \n </div>\n\n \n\n \n </body>\n</html>'
tests/test_ext_viewcode.py:34: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /build/pytest-of-nixbld/pytest-0/ext-viewcode
# outdir: /build/pytest-of-nixbld/pytest-0/ext-viewcode/_build/html
# status:
Running Sphinx v5.3.0
building [mo]: all of 0 po files
building [html]: all source files
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] objects
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] objects
generating indices... genindex py-modindex done
highlighting module code... [100%] spam.mod2
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
# warning:
/build/pytest-of-nixbld/pytest-0/ext-viewcode/index.rst:23: WARNING: Object named 'func1' not found in include file '/build/pytest-of-nixbld/pytest-0/ext-viewcode/spam/__init__.py'
/build/pytest-of-nixbld/pytest-0/ext-viewcode/spam/mod1.py:docstring of spam.mod1.Class3:1: WARNING: duplicate object description of spam.mod3.Class3, other instance in index, use :noindex: for one of them
/build/pytest-of-nixbld/pytest-0/ext-viewcode/spam/mod1.py:docstring of spam.mod1.Class3:1: WARNING: duplicate object description of spam.mod1.Class3, other instance in index, use :noindex: for one of them
/build/pytest-of-nixbld/pytest-0/ext-viewcode/spam/mod1.py:docstring of spam.mod3.Class3.class_attr:1: WARNING: duplicate object description of spam.mod3.Class3.class_attr, other instance in index, use :noindex: for one of them
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:84: WARNING: Error in declarator
If declarator-id with parameters (e.g., 'void f(int arg)'):
Invalid C declaration: Expected identifier in nested name. [error at 18]
Sphinx_DoSomething()
------------------^
If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 19]
Sphinx_DoSomething()
-------------------^
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:86: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 19]
SphinxStruct.member
-------------------^
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:92: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 13]
sphinx_global
-------------^
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:155: ERROR: Unknown directive type "userdesc".
.. userdesc:: myobj:parameter
Description of userdesc.
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:160: ERROR: Unknown interpreted text role "userdescrole".
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:166: WARNING: Too many template argument lists compared to parameter lists. Argument lists: 1, Parameter lists: 0, Extra empty parameters lists prepended: 1. Declaration:
n::Array<T, d>
/build/pytest-of-nixbld/pytest-0/ext-viewcode/objects.rst:117: WARNING: Unparseable C cross-reference: 'SphinxType *'
Invalid C declaration: Expected end of definition. [error at 11]
SphinxType *
-----------^
_______________ test_additional_targets_should_not_be_translated _______________
app = <sphinx.testing.util.SphinxTestAppWrapperForSkipBuilding object at 0x7ffff2b6c2b0>
@sphinx_intl
@pytest.mark.sphinx('html')
@pytest.mark.test_params(shared_result='test_intl_basic')
def test_additional_targets_should_not_be_translated(app):
app.build()
# [literalblock.txt]
result = (app.outdir / 'literalblock.html').read_text(encoding='utf8')
# title should be translated
expected_expr = 'CODE-BLOCKS'
assert_count(expected_expr, result, 2)
# ruby code block should not be translated but be highlighted
expected_expr = """<span class="s1">&#39;result&#39;</span>"""
assert_count(expected_expr, result, 1)
# C code block without lang should not be translated and *ruby* highlighted
expected_expr = """<span class="c1">#include &lt;stdlib.h&gt;</span>"""
assert_count(expected_expr, result, 1)
# C code block with lang should not be translated but be *C* highlighted
expected_expr = ("""<span class="cp">#include</span>"""
"""<span class="w"> </span>"""
"""<span class="cpf">&lt;stdio.h&gt;</span>""")
assert_count(expected_expr, result, 1)
# literal block in list item should not be translated
expected_expr = ("""<span class="n">literal</span>"""
"""<span class="o">-</span>"""
"""<span class="n">block</span>\n"""
"""<span class="k">in</span> """
"""<span class="n">list</span>""")
> assert_count(expected_expr, result, 1)
tests/test_intl.py:1110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
expected_expr = '<span class="n">literal</span><span class="o">-</span><span class="n">block</span>\n<span class="k">in</span> <span class="n">list</span>'
result = '\n<!DOCTYPE html>\n\n<html lang="xx">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="wid...="_sources/literalblock.txt"\n rel="nofollow">Page source</a>\n </div>\n\n \n\n \n </body>\n</html>'
count = 1
def assert_count(expected_expr, result, count):
find_pair = (expected_expr, result)
> assert len(re.findall(*find_pair)) == count, find_pair
E AssertionError: ('<span class="n">literal</span><span class="o">-</span><span class="n">block</span>
E <span class="k">in</span> <span ..."_sources/literalblock.txt"
E rel="nofollow">Page source</a>
E </div>
E
E
E
E
E </body>
E </html>')
E assert 0 == 1
E + where 0 = len([])
E + where [] = <function findall at 0x7ffff73d8e50>(*('<span class="n">literal</span><span class="o">-</span><span class="n">block</span>\n<span class="k">in</span> <span ..."_sources/literalblock.txt"\n rel="nofollow">Page source</a>\n </div>\n\n \n\n \n </body>\n</html>'))
E + where <function findall at 0x7ffff73d8e50> = re.findall
tests/test_intl.py:84: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# language: xx
# locale_dirs: ['.']
# testroot: root
# builder: html
# srcdir: /build/pytest-of-nixbld/pytest-0/test_intl_basic
# outdir: /build/pytest-of-nixbld/pytest-0/test_intl_basic/_build/html
# status:
Running Sphinx v5.3.0
loading translations [xx]... done
loading pickled environment... done
es that are out of date
writing output... [100%] xx/LC_MESSAGES/noqa.mo
building [text]: targets for 29 source files that are out of date
updating environment: [new config] 29 added, 0 changed, 0 removed
reading sources... [100%] warnings
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] warnings
build succeeded, 22 warnings.
The text files are in ../pytest-of-nixbld/pytest-0/test_intl_basic/_build/text.
# warning:
/build/pytest-of-nixbld/pytest-0/test_intl_basic/admonitions.txt:: WARNING: rST localisation for language "xx" not found.
/build/pytest-of-nixbld/pytest-0/test_intl_basic/admonitions.txt:: WARNING: Language "xx" not supported: Docutils-generated text will be in English.
/build/pytest-of-nixbld/pytest-0/test_intl_basic/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [':term:`Some term`', ':term:`Some other term`'], translated: [':term:`SOME NEW TERM`']
/build/pytest-of-nixbld/pytest-0/test_intl_basic/label_target.txt:41: ERROR: Duplicate target name, cannot be used as a unique reference: "duplicated sub section".
/build/pytest-of-nixbld/pytest-0/test_intl_basic/literalblock.txt:13: WARNING: Literal block expected; none found.
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs.txt:16: WARNING: inconsistent references in translated message. original: ['`download Sphinx`_'], translated: ['`A3 DOWNLOAD SPHINX <download Sphinx_>`_', '`A3 DOWNLOAD SPHINX <download Sphinx_>`_']
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs.txt:32: WARNING: inconsistent references in translated message. original: ['`Translation Tips`_'], translated: ['`X TIPS <Translation Tips_>`_', '`X TIPS <Translation Tips_>`_']
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs.txt:34: WARNING: inconsistent references in translated message. original: ['`Translation Tips`_'], translated: ['`TRANS <X TIPS_>`_', '`LATION <X TIPS_>`_']
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: ['[#]_'], translated: []
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: ['[100]_'], translated: []
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: ['reference_'], translated: ['reference_', 'reference_']
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: ['`I18N WITH REFS INCONSISTENCY`_']
/build/pytest-of-nixbld/pytest-0/test_intl_basic/warnings.txt:4:<translated>:1: WARNING: Inline literal start-string without end-string.
/build/pytest-of-nixbld/pytest-0/test_intl_basic/warnings.txt:4:<translated>:1: WARNING: Inline literal start-string without end-string.
/build/pytest-of-nixbld/pytest-0/test_intl_basic/admonitions.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_intl_basic/label_target.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_intl_basic/noqa.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_python_domain.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_intl_basic/rubric.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_intl_basic/toctree.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced.
/build/pytest-of-nixbld/pytest-0/test_intl_basic/refs_inconsistency.txt:6: WARNING: citation not found: ref3
_________________ test_additional_targets_should_be_translated _________________
app = <SphinxTestApp buildername='html'>
@sphinx_intl
@pytest.mark.sphinx(
'html',
srcdir='test_additional_targets_should_be_translated',
confoverrides={
'language': 'xx', 'locale_dirs': ['.'],
'gettext_compact': False,
'gettext_additional_targets': [
'index',
'literal-block',
'doctest-block',
'raw',
'image',
],
}
)
def test_additional_targets_should_be_translated(app):
app.build()
# [literalblock.txt]
result = (app.outdir / 'literalblock.html').read_text(encoding='utf8')
# title should be translated
expected_expr = 'CODE-BLOCKS'
assert_count(expected_expr, result, 2)
# ruby code block should be translated and be highlighted
expected_expr = """<span class="s1">&#39;RESULT&#39;</span>"""
assert_count(expected_expr, result, 1)
# C code block without lang should be translated and *ruby* highlighted
expected_expr = """<span class="c1">#include &lt;STDLIB.H&gt;</span>"""
assert_count(expected_expr, result, 1)
# C code block with lang should be translated and be *C* highlighted
expected_expr = ("""<span class="cp">#include</span>"""
"""<span class="w"> </span>"""
"""<span class="cpf">&lt;STDIO.H&gt;</span>""")
assert_count(expected_expr, result, 1)
# literal block in list item should be translated
expected_expr = ("""<span class="no">LITERAL</span>"""
"""<span class="o">-</span>"""
"""<span class="no">BLOCK</span>\n"""
"""<span class="no">IN</span> """
"""<span class="no">LIST</span>""")
> assert_count(expected_expr, result, 1)
tests/test_intl.py:1189:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
expected_expr = '<span class="no">LITERAL</span><span class="o">-</span><span class="no">BLOCK</span>\n<span class="no">IN</span> <span class="no">LIST</span>'
result = '\n<!DOCTYPE html>\n\n<html lang="xx">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="wid...="_sources/literalblock.txt"\n rel="nofollow">Page source</a>\n </div>\n\n \n\n \n </body>\n</html>'
count = 1
def assert_count(expected_expr, result, count):
find_pair = (expected_expr, result)
> assert len(re.findall(*find_pair)) == count, find_pair
E AssertionError: ('<span class="no">LITERAL</span><span class="o">-</span><span class="no">BLOCK</span>
E <span class="no">IN</span> <sp..."_sources/literalblock.txt"
E rel="nofollow">Page source</a>
E </div>
E
E
E
E
E </body>
E </html>')
E assert 0 == 1
E + where 0 = len([])
E + where [] = <function findall at 0x7ffff73d8e50>(*('<span class="no">LITERAL</span><span class="o">-</span><span class="no">BLOCK</span>\n<span class="no">IN</span> <sp..."_sources/literalblock.txt"\n rel="nofollow">Page source</a>\n </div>\n\n \n\n \n </body>\n</html>'))
E + where <function findall at 0x7ffff73d8e50> = re.findall
tests/test_intl.py:84: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# language: xx
# locale_dirs: ['.']
# testroot: root
# builder: html
# srcdir: /build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated
# outdir: /build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/_build/html
# status:
Running Sphinx v5.3.0
loading translations [xx]... done
building [mo]: targets for 28 po files that are out of date
writing output... [100%] xx/LC_MESSAGES/versionchange.mo
building [html]: targets for 29 source files that are out of date
updating environment: [new config] 29 added, 0 changed, 0 removed
reading sources... [100%] warnings
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] warnings
generating indices... genindex done
writing additional pages... contents search done
copying images... [100%] i18n.png
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 20 warnings.
The HTML pages are in ../pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/_build/html.
# warning:
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/glossary_terms_inconsistency.txt:6: WARNING: inconsistent term references in translated message. original: [':term:`Some term`', ':term:`Some other term`'], translated: [':term:`SOME NEW TERM`']
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/label_target.txt:41: ERROR: Duplicate target name, cannot be used as a unique reference: "duplicated sub section".
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/literalblock.txt:13: WARNING: Literal block expected; none found.
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs.txt:16: WARNING: inconsistent references in translated message. original: ['`download Sphinx`_'], translated: ['`A3 DOWNLOAD SPHINX <download Sphinx_>`_', '`A3 DOWNLOAD SPHINX <download Sphinx_>`_']
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs.txt:32: WARNING: inconsistent references in translated message. original: ['`Translation Tips`_'], translated: ['`X TIPS <Translation Tips_>`_', '`X TIPS <Translation Tips_>`_']
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs.txt:34: WARNING: inconsistent references in translated message. original: ['`Translation Tips`_'], translated: ['`TRANS <X TIPS_>`_', '`LATION <X TIPS_>`_']
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: ['[#]_'], translated: []
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_inconsistency.txt:6: WARNING: inconsistent footnote references in translated message. original: ['[100]_'], translated: []
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_inconsistency.txt:7: WARNING: inconsistent references in translated message. original: ['reference_'], translated: ['reference_', 'reference_']
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_inconsistency.txt:8: WARNING: inconsistent references in translated message. original: [], translated: ['`I18N WITH REFS INCONSISTENCY`_']
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/warnings.txt:4:<translated>:1: WARNING: Inline literal start-string without end-string.
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/warnings.txt:4:<translated>:1: WARNING: Inline literal start-string without end-string.
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/admonitions.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/label_target.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/noqa.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_python_domain.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/rubric.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/toctree.txt: WARNING: document isn't included in any toctree
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_inconsistency.txt:11: WARNING: Citation [ref2] is not referenced.
/build/pytest-of-nixbld/pytest-0/test_additional_targets_should_be_translated/refs_inconsistency.txt:6: WARNING: citation not found: ref3
=============================== warnings summary ===============================
sphinx/ext/napoleon/iterators.py:9
/build/source/sphinx/ext/napoleon/iterators.py:9: RemovedInSphinx70Warning: sphinx.ext.napoleon.iterators is deprecated.
warnings.warn('sphinx.ext.napoleon.iterators is deprecated.',
tests/test_build_linkcheck.py::test_linkcheck_exclude_documents
<frozen importlib._bootstrap>:110: ResourceWarning: unclosed <socket.socket [closed] fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
tests/test_ext_autodoc.py::test_cython
/nix/store/0pyymzxf7n0fzpaqnvwv92ab72v3jq8d-python3-3.10.9/lib/python3.10/distutils/command/build_ext.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
from distutils.sysconfig import customize_compiler, get_python_version
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_ext_viewcode.py::test_viewcode - assert '<div class="viewcode-block" id="Class1"><a class="viewcode-back" hr...
FAILED tests/test_intl.py::test_additional_targets_should_not_be_translated - AssertionError: ('<span class="n">literal</span><span class="o">-</span><sp...
FAILED tests/test_intl.py::test_additional_targets_should_be_translated - AssertionError: ('<span class="no">LITERAL</span><span class="o">-</span><s...
= 3 failed, 1814 passed, 40 skipped, 5 deselected, 3 warnings in 123.68s (0:02:03) =
/nix/store/b09v23lirgvci3wzszh22mbkdfj0h0yq-stdenv-linux/setup: line 1582: pop_var_context: head of shell_variables not a function context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment