pytest-dev / pluggy

A minimalist production ready plugin system
https://pluggy.readthedocs.io/en/latest/
MIT License
1.29k stars 123 forks source link

1.2.0: strange output on generate documentation. #417

Open kloczek opened 1 year ago

kloczek commented 1 year ago

Here is sphinx output

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v6.2.1
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://docs.pytest.org/en/latest/objects.inv...
loading intersphinx inventory from https://setuptools.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://tox.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://devpi.net/docs/devpi/devpi/stable/+doc/objects.inv...
loading intersphinx inventory from https://kedro.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: https://setuptools.readthedocs.io/en/latest/objects.inv -> https://setuptools.pypa.io/en/latest/objects.inv
intersphinx inventory has moved: https://tox.readthedocs.io/en/latest/objects.inv -> https://tox.wiki/en/latest/objects.inv
intersphinx inventory has moved: https://kedro.readthedocs.io/en/latest/objects.inv -> https://docs.kedro.org/en/latest/objects.inv
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [100%] index
WARNING: autodoc: failed to import method '_Result.force_exception' from module 'pluggy._callers'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/util/inspect.py", line 341, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: type object '_Result' has no attribute 'force_exception'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 106, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 324, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2769, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/usr/lib/python3.8/site-packages/sphinx/util/inspect.py", line 357, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: force_exception

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pluggy.3 { api_reference changelog } /home/tkloczko/rpmbuild/BUILD/pluggy-1.2.0/docs/index.rst:471: WARNING: py:meth reference target not found: pluggy._callers._Result.force_exception
/home/tkloczko/rpmbuild/BUILD/pluggy-1.2.0/docs/index.rst:483: WARNING: py:meth reference target not found: pluggy._callers._Result.force_exception
/home/tkloczko/rpmbuild/BUILD/pluggy-1.2.0/CHANGELOG.rst:67: WARNING: py:meth reference target not found: pluggy._callers._Result.force_exception
done
build succeeded, 4 warnings.
kloczek commented 1 year ago

In case of reference target not found warning you can peak on below examples how to fix that https://github.com/RDFLib/rdflib-sqlalchemy/issues/95 https://github.com/RDFLib/rdflib/pull/2036 https://github.com/click-contrib/sphinx-click/commit/abc31069 https://github.com/frostming/unearth/issues/14 https://github.com/jaraco/cssutils/issues/21 https://github.com/latchset/jwcrypto/pull/289 https://github.com/latchset/jwcrypto/pull/289 https://github.com/pypa/distlib/commit/98b9b89f https://github.com/pywbem/pywbem/pull/2895 https://github.com/sissaschool/elementpath/commit/bf869d9e https://github.com/sissaschool/xmlschema/commit/42ea98f2 https://github.com/sqlalchemy/sqlalchemy/commit/5e88e6e8