foundation-sphinx-theme icon indicating copy to clipboard operation
foundation-sphinx-theme copied to clipboard

`sphinx.util.compat.Directive` class is deprecated

Open youqad opened this issue 6 years ago • 5 comments

Hi! First of all, thanks a lot for your awesome theme! Unfortunately, as said in the title: now you get an error when building the documentation in readthedocs.org:

Build error

since sphinx.util.compat.Directive is now deprecated: it has become docutils.parsers.rst.Directive (http://www.sphinx-doc.org/en/master/extdev/index.html#deprecated-apis). Would it be possible to fix this?

Thanks in advance!

youqad avatar Jun 09 '18 07:06 youqad

Same issue!

danielsnider avatar Jun 30 '18 16:06 danielsnider

I got around the issue by updating the import:

index 5fbf9e3..62afb5c 100644
--- a/foundation_sphinx_theme/__init__.py
+++ b/foundation_sphinx_theme/__init__.py
@@ -1,7 +1,7 @@
 import os
 import re

-from sphinx.util.compat import Directive
+from docutils.parsers.rst import Directive


 HTML_THEME_PATH = [os.path.abspath(os.path.join(os.path.dirname(__file__),

Also, I got it running with:

$ git clone https://github.com/peterhudec/foundation-sphinx-theme
$ cd foundation-sphinx-theme/sample-project/
$ ./make.bat html

Then go see the working documentation page in your browser: file:///C:/Users/danie/Documents/GitHub/foundation-sphinx-theme/sample-project/build/html/index.html

danielsnider avatar Jun 30 '18 17:06 danielsnider

Same issue!

IcyW avatar Oct 21 '18 07:10 IcyW

this needs to be fixed. @peterhudec

geyang avatar Apr 10 '19 00:04 geyang

Please refer to #3 for the fix. @peterhudec

geyang avatar Apr 10 '19 00:04 geyang