Skip to content

Many new and bogus "nitpick" warnings when upgrading to sphinx 1.7.0 #4609

Closed
@njsmith

Description

@njsmith

Problem

When building my docs nitpicky mode enabled, with sphinx 1.7.0 (but not 1.6.7), I get tons of new warnings, many of which look obviously bogus.

Procedure to reproduce the problem

$ git clone https://github.com/python-trio/trio
$ cd trio
$ git checkout 317020537ecefa9d6c6214c3caf4011ca4cfb564
$ virtualenv -p python3.6 ve
$ ve/bin/pip install . -r ci/rtd-requirements.txt
$ cd docs
$ ../ve/bin/sphinx-build -E -n -nb html source build -v

Error logs / results

Running Sphinx v1.7.0
making output directory...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 11 source files that are out of date
updating environment: 11 added, 0 changed, 0 removed
reading sources... [  9%] code-of-conduct
reading sources... [ 18%] contributing
reading sources... [ 27%] design
reading sources... [ 36%] glossary
reading sources... [ 45%] history
reading sources... [ 54%] index
reading sources... [ 63%] reference-core
reading sources... [ 72%] reference-hazmat
reading sources... [ 81%] reference-io
reading sources... [ 90%] reference-testing
reading sources... [100%] tutorial

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [  9%] code-of-conduct
writing output... [ 18%] contributing
writing output... [ 27%] design
writing output... [ 36%] glossary
writing output... [ 45%] history
writing output... [ 54%] index
writing output... [ 63%] reference-core
writing output... [ 72%] reference-hazmat
writing output... [ 81%] reference-io
writing output... [ 90%] reference-testing
writing output... [100%] tutorial

/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.Semaphore:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.run_sync_in_worker_thread:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.run_sync_in_worker_thread:: WARNING: py:class reference target not found: CapacityLimiter-like object
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.serve_tcp:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.serve_ssl_over_tcp:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.serve_ssl_over_tcp:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_all:6: WARNING: py:meth reference target not found: HalfCloseableStream.send_eof
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:3: WARNING: py:meth reference target not found: AsyncResource.aclose
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:3: WARNING: py:meth reference target not found: ReceiveStream.receive_some
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:3: WARNING: py:meth reference target not found: AsyncResource.aclose
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:3: WARNING: py:class reference target not found: SendStream
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:20: WARNING: py:class reference target not found: HalfCloseableStream
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:27: WARNING: py:class reference target not found: Stream
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:27: WARNING: py:class reference target not found: HalfCloseableStream
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:35: WARNING: py:meth reference target not found: SendStream.send_all
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.send_eof:35: WARNING: py:meth reference target not found: SendStream.wait_send_all_might_not_block
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.SocketStream.wait_send_all_might_not_block:13: WARNING: py:meth reference target not found: HalfCloseableStream.send_eof
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.open_tcp_listeners:: WARNING: py:class reference target not found: bytes-like
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.open_tcp_listeners:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.open_tcp_listeners:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.open_ssl_over_tcp_listeners:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/__init__.py:docstring of trio.open_ssl_over_tcp_listeners:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/ssl.py:docstring of trio.ssl.SSLStream:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/testing/__init__.py:docstring of trio.testing.MemorySendStream.get_data:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/testing/__init__.py:docstring of trio.testing.memory_stream_pump:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/socket.py:docstring of trio.socket.set_custom_hostname_resolver:: WARNING: py:class reference target not found: None
/tmp/repro-dir/trio/trio/socket.py:docstring of trio.socket.set_custom_socket_factory:: WARNING: py:class reference target not found: None
generating indices... genindex py-modindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 27 warnings.

If we run the exact same commands, but using sphinx==1.6.7, then the build completes successfully with no warnings.

Note that "CapacityLimiter-like object" and "bytes-like" are both listed in conf.py's nitpick_ignore list, so they definitely shouldn't be triggering warnings.

Also note all the error messages about "py:class reference target not found: None". The docs here don't attempt to refer to a class called "None". It's hard to know what is actually triggering this.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions