Skip to content

DOC: Unterminated string literal error with __array_namespace_info__ #30674

@danielzgtg

Description

@danielzgtg

Issue with current documentation:

A clean build of spin docs fails:

$ rm -rf doc/source/_contents/ doc/build/
$ spin docs
[...]
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 2652 source files that are out of date
updating environment: [new config] 2652 added, 0 changed, 0 removed
reading sources... [100%] user/whatisnumpy
WARNING: error while formatting arguments for numpy.__array_namespace_info__: Handler <function update_annotations_using_type_comments at 0x75fb4107d8a0> for event 'autodoc-before-process-signature' threw an exception (exception: 'tuple' object does not support item assignment)
WARNING: error while formatting arguments for numpy.__array_namespace_info__: Handler <function update_annotations_using_type_comments at 0x75fb4107d8a0> for event 'autodoc-before-process-signature' threw an exception (exception: 'tuple' object does not support item assignment)
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [100%] user/whatisnumpy
generating indices... genindex done
writing additional pages... search done
copying images... [100%] ../build/plot_directive/user/quickstart-2.png
dumping search index in English (code: en)... done
dumping object inventory... done
[jupyterlite-sphinx] Running JupyterLite build
[jupyterlite-sphinx] Command: ['/home/home/CLionProjects/numpy/venv/bin/python3', '-m', 'jupyter', 'lite', 'build', '--debug', '--contents', '/home/home/CLionProjects/numpy/doc/source/_contents', '--output-dir', '/home/home/CLionProjects/numpy/doc/build/html/lite', '--apps', 'notebooks', '--apps', 'edit', '--apps', 'lab', '--apps', 'repl', '--apps', 'tree', '--apps', 'consoles', '--lite-dir', '/home/home/CLionProjects/numpy/doc/source']
[jupyterlite-sphinx] JupyterLite build done
build finished with problems, 2 warnings.
make: *** [Makefile:148: html-build] Error 1
$

The second build does not fail.

Idea or request for content:

Consider reverting 611113c. __module__ = 'numpy' is hacky and breaking inspect.getsource, whereupon Sphinx relies.

Previously reported as #30212, which was closed prematurely. Misdiagnosed as a dependency issue in #28694.

CC: @asmeurer
CC: #26572

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions