pytest-dev / pytest-dev/pluggy

1.2.0: strange output on generate documentation.

Open
#417 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
160
Avg merge
21h 4m
Merged PRs (30d)
6

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/index.rst around lines 471 and 483 and CHANGELOG.rst around line 67, then run the shown sphinx-build command for the man output. Trace the references to pluggy._callers._Result.force_exception and compare them with the generated autodoc output. Done means documentation generation no longer reports the missing target and autodoc warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.