Skip to content

4.9.0: sphinx warnings reference target not found #173

Closed

Description

First of all currently it is not possible to use straight sphinx-build command to build documentation out of source tree

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.1
making output directory... done
WARNING: html_static_path entry '_static' does not exist
loading intersphinx inventory from https://docs.python.org/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 10 added, 0 changed, 0 removed
reading sources... [100%] using
WARNING: autodoc: failed to import class 'mapping.PersistentMapping' from module 'persistent'; the following exception was raised:
No module named 'persistent'
WARNING: autodoc: failed to import class 'list.PersistentList' from module 'persistent'; the following exception was raised:
No module named 'persistent'
WARNING: autodoc: failed to import module 'interfaces' from module 'persistent'; the following exception was raised:
No module named 'persistent'
WARNING: autodoc: failed to import class 'Persistent' from module 'persistent'; the following exception was raised:
No module named 'persistent'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-persistent.3 { using api api/interfaces api/collections api/attributes api/pickling api/cache changes glossary } /home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/index.rst:1: WARNING: py:mod reference target not found: persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:2: WARNING: py:mod reference target not found: persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:6: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:9: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:88: WARNING: py:attr reference target not found: _p_changed
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:99: WARNING: py:attr reference target not found: _p_state
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:109: WARNING: py:attr reference target not found: _p_jar
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:117: WARNING: py:attr reference target not found: _p_oid
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:210: WARNING: py:class reference target not found: PersistentList
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:210: WARNING: py:class reference target not found: PersistentMapping
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:219: WARNING: py:meth reference target not found: persistent.Persistent._p_activate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:219: WARNING: py:meth reference target not found: persistent.Persistent._p_deactivate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:219: WARNING: py:meth reference target not found: persistent.Persistent._p_invalidate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:328: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:412: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:423: WARNING: py:meth reference target not found: __getattribute__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:417: WARNING: py:meth reference target not found: persistent.IPersistent._p_getattr
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:432: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:426: WARNING: py:meth reference target not found: persistent.IPersistent._p_setattr
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:441: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:435: WARNING: py:meth reference target not found: persistent.IPersistent._p_delattr
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:446: WARNING: py:meth reference target not found: __getattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api.rst:1: WARNING: py:mod reference target not found: persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/interfaces.rst:1: WARNING: py:mod reference target not found: persistent.interfaces
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/interfaces.rst:21: WARNING: py:class reference target not found: IPersistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:4: WARNING: py:meth reference target not found: __getattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:46: WARNING: py:meth reference target not found: __getattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:52: WARNING: py:meth reference target not found: __getattribute__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:52: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:52: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:68: WARNING: py:meth reference target not found: __getattribute__`
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:71: WARNING: py:meth reference target not found: __getattribute__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:128: WARNING: py:meth reference target not found: __setattr__`
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:131: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:135: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:208: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:222: WARNING: py:meth reference target not found: __delattr__`
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:229: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:298: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:44: WARNING: py:meth reference target not found: __getnewargs__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:44: WARNING: py:meth reference target not found: __getstate__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:44: WARNING: py:meth reference target not found: __setstate__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:76: WARNING: py:attr reference target not found: __slots__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:125: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:125: WARNING: py:attr reference target not found: __slots
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:7: WARNING: py:class reference target not found: persistent.interfaces.IPeristent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:11: WARNING: py:meth reference target not found: _p_deactivate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:11: WARNING: py:meth reference target not found: _p_invalidate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:14: WARNING: py:attr reference target not found: _p_changed
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:14: WARNING: py:meth reference target not found: _p_deactivate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:16: WARNING: py:attr reference target not found: _p_changed
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:16: WARNING: py:meth reference target not found: _p_invalidate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:33: WARNING: py:meth reference target not found: new_ghost
done
build succeeded, 58 warnings.

First part of warnings can be fixed by patch like below:

--- a/docs/conf.py~     2022-03-10 06:52:53.000000000 +0000
+++ b/docs/conf.py      2022-06-13 22:30:57.149489504 +0000
@@ -16,7 +16,7 @@
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath("../src"))

 # -- General configuration -----------------------------------------------------

This patch fixes what is in the comment and that can of fix is suggested in sphinx example copy.py https://www.sphinx-doc.org/en/master/usage/configuration.html#example-of-configuration-file

Than .. on building my packages I'm using sphinx-build command with -n switch which shows warmings about missing references. These are not critical issues.

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.1
making output directory... done
WARNING: html_static_path entry '_static' does not exist
loading intersphinx inventory from https://docs.python.org/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 10 added, 0 changed, 0 removed
reading sources... [100%] using
WARNING: autodoc: failed to import class 'mapping.PersistentMapping' from module 'persistent'; the following exception was raised:
cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
WARNING: autodoc: failed to import class 'list.PersistentList' from module 'persistent'; the following exception was raised:
cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
WARNING: autodoc: failed to import class 'Persistent' from module 'persistent'; the following exception was raised:
cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-persistent.3 { using api api/interfaces api/collections api/attributes api/pickling api/cache changes glossary } /home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/index.rst:1: WARNING: py:mod reference target not found: persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:2: WARNING: py:mod reference target not found: persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:6: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:9: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:88: WARNING: py:attr reference target not found: _p_changed
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:99: WARNING: py:attr reference target not found: _p_state
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:109: WARNING: py:attr reference target not found: _p_jar
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:117: WARNING: py:attr reference target not found: _p_oid
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:210: WARNING: py:class reference target not found: PersistentList
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:210: WARNING: py:class reference target not found: PersistentMapping
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:219: WARNING: py:meth reference target not found: persistent.Persistent._p_activate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:219: WARNING: py:meth reference target not found: persistent.Persistent._p_deactivate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:219: WARNING: py:meth reference target not found: persistent.Persistent._p_invalidate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:328: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:412: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:423: WARNING: py:meth reference target not found: __getattribute__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:417: WARNING: py:meth reference target not found: persistent.IPersistent._p_getattr
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:432: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:426: WARNING: py:meth reference target not found: persistent.IPersistent._p_setattr
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:441: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:435: WARNING: py:meth reference target not found: persistent.IPersistent._p_delattr
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/using.rst:446: WARNING: py:meth reference target not found: __getattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api.rst:1: WARNING: py:mod reference target not found: persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:4: WARNING: py:meth reference target not found: __getattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:46: WARNING: py:meth reference target not found: __getattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:52: WARNING: py:meth reference target not found: __getattribute__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:52: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:52: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:68: WARNING: py:meth reference target not found: __getattribute__`
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:71: WARNING: py:meth reference target not found: __getattribute__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:128: WARNING: py:meth reference target not found: __setattr__`
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:131: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:135: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:208: WARNING: py:meth reference target not found: __setattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:222: WARNING: py:meth reference target not found: __delattr__`
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:229: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/attributes.rst:298: WARNING: py:meth reference target not found: __delattr__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:44: WARNING: py:meth reference target not found: __getnewargs__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:44: WARNING: py:meth reference target not found: __getstate__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:44: WARNING: py:meth reference target not found: __setstate__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:76: WARNING: py:attr reference target not found: __slots__
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:125: WARNING: py:class reference target not found: persistent.Persistent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/pickling.rst:125: WARNING: py:attr reference target not found: __slots
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:7: WARNING: py:class reference target not found: persistent.interfaces.IPeristent
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:11: WARNING: py:meth reference target not found: _p_deactivate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:11: WARNING: py:meth reference target not found: _p_invalidate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:14: WARNING: py:attr reference target not found: _p_changed
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:14: WARNING: py:meth reference target not found: _p_deactivate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:16: WARNING: py:attr reference target not found: _p_changed
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:16: WARNING: py:meth reference target not found: _p_invalidate
/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/docs/api/cache.rst:33: WARNING: py:meth reference target not found: new_ghost
done
build succeeded, 55 warnings.

You can peak on fixes that kind of issues in other projects
latchset/jwcrypto#289
click-contrib/sphinx-click@abc31069
latchset/jwcrypto#289
RDFLib/rdflib-sqlalchemy#95
sissaschool/elementpath@bf869d9e
jaraco/cssutils#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions