Open kloczek opened 1 year ago
...
Mermaid error:
Could not import sphinx.util.SphinxParallelError (exception: No module named 'sphinx.util.SphinxParallelError')
The class SphinxParallelError
isn't living in sphinx.util
any more in Sphinx >= 7.0, it was moved to sphinx.errors
.
With the following patches we are able to build sphinxcontrib-mermaid
again with a recent Sphinx version in Debian.
diff --git a/README.rst b/README.rst
index d10dad3..d4d3e0f 100644
--- a/README.rst
+++ b/README.rst
@@ -65,19 +65,19 @@ module (ignoring classes imported from other modules).
For example::
- .. autoclasstree:: sphinx.util.SphinxParallelError sphinx.util.ExtensionError
+ .. autoclasstree:: sphinx.errors.SphinxParallelError sphinx.errors.ExtensionError
:full:
-.. autoclasstree:: sphinx.util.SphinxParallelError sphinx.util.ExtensionError
+.. autoclasstree:: sphinx.errors.SphinxParallelError sphinx.errors.ExtensionError
:full:
Or directly the module::
- .. autoclasstree:: sphinx.util
+ .. autoclasstree:: sphinx.errors
-.. autoclasstree:: sphinx.util
+.. autoclasstree:: sphinx.errors
Installation
--
2.42.0
diff --git a/sphinxcontrib/autoclassdiag.py b/sphinxcontrib/autoclassdiag.py
index f1bf836..bcd8a20 100644
--- a/sphinxcontrib/autoclassdiag.py
+++ b/sphinxcontrib/autoclassdiag.py
@@ -1,6 +1,7 @@
import inspect
-from sphinx.util import ExtensionError, import_object
+from sphinx.errors import ExtensionError
+from sphinx.util import import_object
from .exceptions import MermaidError
--
2.42.0
Hi! I am facing the same problem. How soon is the new version coming out?
On building
sphinxcontrib-mermaid
documentation sphinx cannot findsphinxcontrib.mermaid
So I've checked how it is here with use namespaces na found that it is still used
pkg_resources
which is now deprecated. Below patch moves topkgutil
style namespaces becausepkg_resources
messes withsys.path
However even with that patch sphinx still failed.
So I've removed sphinxcontrib/init.py and with that sphinx shows errors which indicated that
sphinxcontrib-mermaid
needs to be updated for sphinx >=6.xThe same is with pytest