summaryrefslogtreecommitdiff
path: root/doc/sphinxext/autosummary.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2009-04-01 20:38:50 +0000
committerPauli Virtanen <pav@iki.fi>2009-04-01 20:38:50 +0000
commit9a63ebd48281c994c39c374b5cdc960acb82963c (patch)
tree56b5d77ed9ff806e0ef422e261135d86830d09e4 /doc/sphinxext/autosummary.py
parent745ebc091aa6e761f9180964ae2c60e1caa92f9a (diff)
downloadnumpy-9a63ebd48281c994c39c374b5cdc960acb82963c.tar.gz
sphinxext: Sphinx 0.6 compatibility and deprecation warnings
Diffstat (limited to 'doc/sphinxext/autosummary.py')
-rw-r--r--doc/sphinxext/autosummary.py9
1 files changed, 8 insertions, 1 deletions
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]