From 3d8f7ef4a11b4a1af0594cc18c68bfc335005d6b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 29 Aug 2017 15:20:58 +0100 Subject: [PATCH] doc: Remove deprecated call to sphinx.util.compat This call generates the following deprecation warning: RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will be removed in Sphinx 1.7, please use docutils' instead. Resolve this. Change-Id: I1083d3d6f3e646249f187a1bdade61eecc93c7e0 --- os_api_ref/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_api_ref/__init__.py b/os_api_ref/__init__.py index ea83d34..7c0fffa 100644 --- a/os_api_ref/__init__.py +++ b/os_api_ref/__init__.py @@ -15,10 +15,10 @@ import os import re from docutils import nodes +from docutils.parsers import rst from docutils.parsers.rst.directives.tables import Table from docutils.statemachine import ViewList import pbr.version -from sphinx.util.compat import Directive from sphinx.util.osutil import copyfile import yaml @@ -123,7 +123,7 @@ class rest_expand_all(nodes.Part, nodes.Element): pass -class RestExpandAllDirective(Directive): +class RestExpandAllDirective(rst.Directive): # This tells sphinx that the directive will need to generate # content during the final build phase. has_content = True @@ -149,7 +149,7 @@ class RestExpandAllDirective(Directive): return [node] -class RestMethodDirective(Directive): +class RestMethodDirective(rst.Directive): # this enables content in the directive has_content = True