From 6fb1490c10045cf3ee379f0b7ddf4effaaf2fc5d Mon Sep 17 00:00:00 2001 From: Antti Kaihola Date: Mon, 9 Apr 2018 22:48:50 +0300 Subject: [PATCH] Fixes #14: Directive now imported directly from docutils.parsers.rst Sphinx 1.7 no longer provides the `Directive` class through `sphinx.util.compat`. This fix was originally included in fac65da4b64794c1d1c8bc57a10a531244510710 by Sylvain Delisle, but that commit was never merged upstream. Also added the change and its author in the new CHANGES and AUTHORS files and bumped the version number to 0.3.dev. --- AUTHORS | 5 +++++ CHANGES | 7 +++++++ setup.py | 2 +- sphinxcontrib/ditaa.py | 3 +-- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 AUTHORS create mode 100644 CHANGES diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..36dabd0 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,5 @@ +The ditaa Sphinx extension is written by Arthur Gautier. + +Other contributors, listed alphabetically, are: + +* Antti Kaihola -- Sphinx 1.7 compatibility bug fix diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..c8716a9 --- /dev/null +++ b/CHANGES @@ -0,0 +1,7 @@ +Release 0.3 (in development) +============================ + +Bugs fixed +---------- + +* #14: import ``Directive`` directly from ``docutils.parsers.rst`` diff --git a/setup.py b/setup.py index 012bc13..7a9460f 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ setup( name='sphinx-ditaa', - version='0.2', + version='0.3.dev', url='https://github.com/baloo/sphinx-ditaa', license='BSD License', author='Arthur Gautier', diff --git a/sphinxcontrib/ditaa.py b/sphinxcontrib/ditaa.py index 1ec9bde..7dfaaf8 100644 --- a/sphinxcontrib/ditaa.py +++ b/sphinxcontrib/ditaa.py @@ -26,11 +26,10 @@ from sha import sha from docutils import nodes -from docutils.parsers.rst import directives +from docutils.parsers.rst import Directive, directives from sphinx.errors import SphinxError from sphinx.util.osutil import ensuredir, ENOENT, EPIPE -from sphinx.util.compat import Directive import sys