2.4.0: sphinx warnings
kloczek opened this issue · 4 comments
kloczek commented
Looks like lates sphix shows some warnings on generate documentation
running build_sphinx
Running Sphinx v4.5.0
making output directory... done
Temporary build environment: /tmp/pep517-build-env-6x29zbw8
Calling pip to install ['setuptools>=56', 'setuptools_scm[toml]>=3.4.1']
Collecting setuptools>=56
Using cached setuptools-62.0.0-py3-none-any.whl (1.1 MB)
Collecting setuptools_scm[toml]>=3.4.1
Using cached setuptools_scm-6.4.2-py3-none-any.whl (37 kB)
Collecting tomli>=1.0.0
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting packaging>=20.0
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Installing collected packages: tomli, setuptools, pyparsing, packaging, setuptools_scm
Successfully installed packaging pyparsing setuptools setuptools_scm tomli
Got build requires: ['wheel']
Calling pip to install ['wheel']
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.1
Installed dynamic build dependencies
Trying to build metadata in /tmp/tmpfuibm8h5
loading intersphinx inventory from 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] 17 added, 0 changed, 0 removed
reading sources... [100%] variables
WARNING: autodoc: failed to import class 'CSSCalc' from module 'cssutils.css'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/util/inspect.py", line 440, in safe_getattr
return getattr(obj, name, *defargs)
AttributeError: module 'cssutils.css' has no attribute 'CSSCalc'
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 102, in import_object
obj = attrgetter(obj, mangled_name)
File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 327, 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 2827, in autodoc_attrgetter
return safe_getattr(obj, name, *defargs)
File "/usr/lib/python3.8/site-packages/sphinx/util/inspect.py", line 456, in safe_getattr
raise AttributeError(name) from exc
AttributeError: CSSCalc
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/docs/variables.rst:4: WARNING: duplicate object description of cssutils.css, other instance in css, use :noindex: for one of them
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-cssutils.3 { history migrate known issues parse utilities settings serialize css stylesheets profiles variables logging scripts codec encutils backlog } CHANGES (links).rst:492: WARNING: py:meth reference target not found: cssutils.css.Property.validate(profiles=None)
CHANGES (links).rst:517: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.Profiles.CSS_LEVEL_2
CHANGES (links).rst:519: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.Profiles.CSS_COLOR_LEVEL_3
CHANGES (links).rst:522: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.Profiles.CSS_BOX_LEVEL_3
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/__init__.py:docstring of cssutils.getUrls:1: WARNING: py:class reference target not found: cssutils.css.CSSValue
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/__init__.py:docstring of cssutils.replaceUrls:1: WARNING: py:class reference target not found: cssutils.css.CSSValue
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/docs/serialize.rst:60: WARNING: py:attr reference target not found: cssutils.ser
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/docs/serialize.rst:62: WARNING: py:attr reference target not found: cssutils.ser.prefs
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/docs/css.rst:11: WARNING: py:attr reference target not found: cssutils.css.CSSStyleSheet.cssRules
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/css/cssrule.py:docstring of cssutils.css.cssrule.CSSRule:1: WARNING: py:class reference target not found: CSSUnknownRule
docstring of cssutils.css.CSSRule.UNKNOWN_RULE:1: WARNING: py:class reference target not found: cssutils.css.CSSUnknownRule
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/css/cssstyledeclaration.py:docstring of cssutils.css.cssstyledeclaration.CSSStyleDeclaration.getPropertyCSSValue:10: WARNING: py:class reference target not found: cssutils.css.CSSValue
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/docs/css.rst:267: WARNING: py:class reference target not found: cssutils.css.CSSValueList
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/docs/css.rst:267: WARNING: py:class reference target not found: cssutils.css.CSSValue
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/stylesheets/mediaquery.py:docstring of cssutils.stylesheets.mediaquery.MediaQuery:1: WARNING: py:const reference target not found: MediaQuery.MEDIA_TYPES
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/stylesheets/mediaquery.py:docstring of cssutils.stylesheets.MediaQuery.mediaType:1: WARNING: py:attr reference target not found: MEDIA_TYPES
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:8: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.CSS_LEVEL_2
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:10: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.CSS3_BASIC_USER_INTERFACE
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:12: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.CSS3_BOX
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:14: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.CSS3_COLOR
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:17: WARNING: py:attr reference target not found: cssutils.profiles.Profiles.CSS3_PAGED_MEDIA
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:21: WARNING: py:attr reference target not found: cssutils.profiles.Profiles._TOKEN_MACROS
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles:24: WARNING: py:attr reference target not found: cssutils.profiles.Profiles._MACROS
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles.addProfile:20: WARNING: py:attr reference target not found: Profiles._TOKEN_MACROS
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles.addProfile:20: WARNING: py:attr reference target not found: Profiles._MACROS
/home/tkloczko/rpmbuild/BUILD/cssutils-2.4.0/cssutils/profiles.py:docstring of cssutils.profiles.Profiles.removeProfile:12: WARNING: py:exc reference target not found: cssutils.profiles.NoSuchProfileException
done
build succeeded, 28 warnings.
jaraco commented
One of the warnings is:
/Users/jaraco/code/main/cssutils/docs/css.rst:11: WARNING: py:attr reference target not found: cssutils.css.CSSStyleSheet.cssRules
cssutils.css.CSSStyleSheet.cssRules
is a property, which appears to have issues when referenced as py:attr (sphinx-doc/sphinx#7183). Tracing the "fix" for that issue, I think the recommendation is to use py:method
for properties.
jaraco commented
I tried using :meth:
but it produces the same error.
jaraco commented
Looks like Sphinx supports @property
but not property()
.
kloczek commented
Just tested 2.4.2 and all looks good now.
Thank you 👍
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.1
making output directory... done
loading intersphinx inventory from 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] 17 added, 0 changed, 0 removed
reading sources... [100%] variables
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-cssutils.3 { history migrate known issues parse utilities settings serialize css stylesheets profiles variables logging scripts codec encutils backlog } done
build succeeded.