You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Sphinx builds on Jenkins have started failing since I've upgraded to SQLAlchemy 0.9.6. The build log shows the following error:
#!python
Fatal error: Failed to build documentation.
/.../virtualenvs/ed16c39d/lib/python2.7/site-packages/foo/models.py:docstring of foo.models.case:12: ERROR: Unknown interpreted text role "paramref".
My project does not use :paramref: directives, but Sphinx produces an error because my project imports 3rd-party code which does use :paramref: directives. I could work aroudn this issue by adding the "paramlinks" extension to my project, but it seems less than ideal to have to include Sphinx extensions because of choices made in external projects/dependencies.
The Keystone (OpenStack) project encountered a similar issue and resolved it by importing the sqlalchemy package instead of the culprit functions themselves:
I am experiencing the same issue with some project using SQLAlchemy. As suggested by @shimizukawa, I tried the autodoc_mock_imports feature. Unfortunately this makes things even worse, as it makes sphinx unable to load SQLAlchemy and thus fail to load my modules at all.
Correct me if I am wrong, but my understanding of autodoc_mock_imports is that the feature has been added to prevent sphinx to fail on modules that can't be imported at build time (as hinted in the documentation).
My Sphinx builds on Jenkins have started failing since I've upgraded to SQLAlchemy 0.9.6. The build log shows the following error:
Where models.py includes:
The
case
import causes Sphinx to load SQLAlchemy code which uses the :paramref: directives from this Sphinx Extension.My project does not use :paramref: directives, but Sphinx produces an error because my project imports 3rd-party code which does use :paramref: directives. I could work aroudn this issue by adding the "paramlinks" extension to my project, but it seems less than ideal to have to include Sphinx extensions because of choices made in external projects/dependencies.
The Keystone (OpenStack) project encountered a similar issue and resolved it by importing the
sqlalchemy
package instead of the culprit functions themselves:For example:
It'd be great if Sphinx could avoid this type of issue itself, or if there was an option to ignore errors of this sort.
The text was updated successfully, but these errors were encountered: