trio icon indicating copy to clipboard operation
trio copied to clipboard

Sphinx warnings in Sphinx 4.3.1

Open kloczek opened this issue 3 years ago • 10 comments

With the proposed upgrade to Sphinx 4.3.1 in #2185, there are some new build warnings:

/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.Listener:1: WARNING: py:obj reference target not found: trio._abc.T_resource
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.SendChannel:1: WARNING: py:obj reference target not found: trio._abc.SendType
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.SendChannel.send:: WARNING: py:class reference target not found: trio._abc.SendType
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.ReceiveChannel:1: WARNING: py:obj reference target not found: trio._abc.ReceiveType
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.ReceiveChannel.receive:: WARNING: py:class reference target not found: trio._abc.ReceiveType
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.Channel:1: WARNING: py:obj reference target not found: trio._abc.T
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2185/trio/abc.py:docstring of trio.abc.Channel:1: WARNING: py:obj reference target not found: trio._abc.T

These are not present on 3.3.1

kloczek avatar May 24 '21 04:05 kloczek

BTW I think that it would be good to make new release :)

kloczek avatar Jun 05 '21 18:06 kloczek

Are we sure this is an active issue? I am fixing a different set of sphinx warnings in #2195 and did not see any of these.

So my inclination would be to close this issue.

tjstum avatar Dec 10 '21 17:12 tjstum

Moment will try to rerun build against lates sphinx.

kloczek avatar Dec 10 '21 17:12 kloczek

Here is the output against 0.19.0

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.3.1
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://outcome.readthedocs.io/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 13 added, 0 changed, 0 removed
reading sources... [100%] tutorial
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-trio.3 { tutorial awesome-trio-libraries reference-core reference-io reference-testing reference-lowlevel design history contributing releasing code-of-conduct } /data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.Listener:1: WARNING: py:obj reference target not found: trio._abc.T_resource
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.SendChannel:1: WARNING: py:obj reference target not found: trio._abc.SendType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.SendChannel.send:: WARNING: py:class reference target not found: trio._abc.SendType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.ReceiveChannel:1: WARNING: py:obj reference target not found: trio._abc.ReceiveType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.ReceiveChannel.receive:: WARNING: py:class reference target not found: trio._abc.ReceiveType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.Channel:1: WARNING: py:obj reference target not found: trio._abc.T
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.Channel:1: WARNING: py:obj reference target not found: trio._abc.T
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/socket.py:docstring of trio.socket.socket:1: WARNING: py:func reference target not found: socket.socket
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/socket.py:docstring of trio.socket.from_stdlib_socket:1: WARNING: py:func reference target not found: socket.socket
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/docs/source/reference-io.rst:304: WARNING: py:func reference target not found: socket.socket
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/docs/source/reference-io.rst:382: WARNING: py:func reference target not found: socket.socket
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/docs/source/reference-io.rst:423: WARNING: py:func reference target not found: socket.socket
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/docs/source/reference-io.rst:439: WARNING: py:func reference target not found: socket.socket
done
build succeeded, 13 warnings.

kloczek avatar Dec 10 '21 17:12 kloczek

The socket issues are resolved in #2195.

For the other ones, I can repro this using Sphinx 4.3.1. However, docs-requirements.txt currently specifies 3.3.1. Looks like #2185 wants to bump the sphinx version but is failing in the same way (in addition to failing on the "too many checks are broken on unmodified code" issues that we're encountering.

It would be great if you could contribute to #2185 (or make a separate pull request) that fixes the trio._abc complaints in the sphinx build. But for now, I'll update the title/summary in your initial report.

tjstum avatar Dec 10 '21 17:12 tjstum

OK here is result with https://github.com/python-trio/trio/pull/2195

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.3.1
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://outcome.readthedocs.io/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 13 added, 0 changed, 0 removed
reading sources... [100%] tutorial
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-trio.3 { tutorial awesome-trio-libraries reference-core reference-io reference-testing reference-lowlevel design history contributing releasing code-of-conduct } /data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.Listener:1: WARNING: py:obj reference target not found: trio._abc.T_resource
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.SendChannel:1: WARNING: py:obj reference target not found: trio._abc.SendType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.SendChannel.send:: WARNING: py:class reference target not found: trio._abc.SendType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.ReceiveChannel:1: WARNING: py:obj reference target not found: trio._abc.ReceiveType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.ReceiveChannel.receive:: WARNING: py:class reference target not found: trio._abc.ReceiveType
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.Channel:1: WARNING: py:obj reference target not found: trio._abc.T
/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/abc.py:docstring of trio.abc.Channel:1: WARNING: py:obj reference target not found: trio._abc.T
done
build succeeded, 7 warnings.

Just found that pytest is failing

+ PYTHONPATH=/data/home/tkloczko/rpmbuild/BUILDROOT/python-trio-0.19.0-2.2.fc35.x86_64/usr/lib64/python3.8/site-packages:/data/home/tkloczko/rpmbuild/BUILDROOT/python-trio-0.19.0-2.2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=3222368218
rootdir: /data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0, configfile: pyproject.toml
plugins: shutil-1.7.0, virtualenv-1.7.0, mock-3.6.1, cov-2.12.1, anyio-3.3.4, forked-1.3.0, xdist-2.3.0, flaky-3.7.0, tornasync-0.6.0.post2, console-scripts-1.2.0, trio-0.7.0, timeout-2.0.1, asyncio-0.16.0, freezegun-0.4.2, flake8-1.0.7, pyfakefs-4.5.3, benchmark-3.4.1, profiling-1.7.0, datadir-1.3.1, regressions-2.2.0, randomly-3.8.0, rerunfailures-9.1.1, yagot-0.5.0, requests-mock-1.9.3, subtests-0.5.0, easy-server-0.8.0, django-4.5.2, hypothesis-6.31.0
collected 0 items / 1 error

================================================================================== ERRORS ==================================================================================
______________________________________________________________________ ERROR collecting test session _______________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/config/__init__.py:570: in _importconftest
    mod = import_path(conftestpath, mode=importmode)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('trio._core.tests.conftest', '/data/home/tkloczko/rpmbuild/BUILDROOT/python-trio-0.19.0-2.2.fc35.x86_64/usr/lib/python3.8/site-packages/trio/_core/tests/conftest.py', PosixPath('/data/home/tkloczko/rpmbuild/BUILD/trio-0.19.0/trio/_core/tests/conftest.py'))
========================================================================= short test summary info ==========================================================================
ERROR  - _pytest.pathlib.ImportPathMismatchError: ('trio._core.tests.conftest', '/data/home/tkloczko/rpmbuild/BUILDROOT/python-trio-0.19.0-2.2.fc35.x86_64/usr/lib/python...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.42s =============================================================================

I'm not sure is it result of that PR or some updates in set of modules used in build env.

kloczek avatar Dec 10 '21 17:12 kloczek

Tested .. that pytest fail is not result of that socket.socket PR.

kloczek avatar Dec 10 '21 17:12 kloczek

https://github.com/python-trio/trio/pull/2203 looks like it is about openssl and it nout touches any of the documentation files :)

kloczek avatar Dec 24 '21 05:12 kloczek

Oh, I'm sorry, I got this one confused with another docs issue. I'll reopen.

Fuyukai avatar Dec 24 '21 20:12 Fuyukai

No problem :)

kloczek avatar Dec 25 '21 00:12 kloczek