From 21f4dd61f8da104308e6c32a926635aaa3594d44 2017-06-21 10:26:18 From: Thomas Kluyver Date: 2017-06-21 10:26:18 Subject: [PATCH] Backport PR #10668: Fix #10666: Prepare for removal of sphinx.util.compat module at Sphinx 1.7 Since Sphinx 1.6, the ``sphinx.util.compat.Directive`` class is deprecated. And the entire ``sphinx.util.compat`` module will be removed at 1.7. This PR follows [Sphinx CHANGES](http://www.sphinx-doc.org/en/master/changes.html) tip about using ``docutils.parsers.rst.Directive`` instead. Relates 10666 --- diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py index 63ad0c1..7a294f1 100644 --- a/IPython/sphinxext/ipython_directive.py +++ b/IPython/sphinxext/ipython_directive.py @@ -139,7 +139,7 @@ import shutil # Third-party from docutils.parsers.rst import directives -from sphinx.util.compat import Directive +from docutils.parsers.rst import Directive # Our own from traitlets.config import Config