From 9a63ebd48281c994c39c374b5cdc960acb82963c Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 1 Apr 2009 20:38:50 +0000 Subject: sphinxext: Sphinx 0.6 compatibility and deprecation warnings --- doc/sphinxext/autosummary.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc/sphinxext/autosummary.py') diff --git a/doc/sphinxext/autosummary.py b/doc/sphinxext/autosummary.py index c32953ff5..f7e9a1291 100644 --- a/doc/sphinxext/autosummary.py +++ b/doc/sphinxext/autosummary.py @@ -56,11 +56,17 @@ from docutils.parsers.rst import directives from docutils.statemachine import ViewList from docutils import nodes -import sphinx.addnodes, sphinx.roles, sphinx.builder +import sphinx.addnodes, sphinx.roles from sphinx.util import patfilter from docscrape_sphinx import get_doc_object +import warnings +warnings.warn("This autosummary extension will be eventually moved to " + "sphinx.ext.autosummary. One version is already available in " + "Sphinx >= 0.6; expect this module to be deprecated after all " + "remaining features have been integrated there.", + FutureWarning, stacklevel=2) def setup(app): app.add_directive('autosummary', autosummary_directive, True, (0, 0, False), @@ -161,6 +167,7 @@ def autosummary_directive(dirname, arguments, options, content, lineno, tocnode['includefiles'] = docnames tocnode['maxdepth'] = -1 tocnode['glob'] = None + tocnode['entries'] = [(None, docname) for docname in docnames] tocnode = autosummary_toc('', '', tocnode) return warnings + [node] + [tocnode] -- cgit v1.2.1