[Python-checkins] r71499 - python/branches/release26-maint/Doc/tools/sphinxext/pyspecific.py

georg.brandl python-checkins at python.org
Sat Apr 11 22:34:18 CEST 2009


Author: georg.brandl
Date: Sat Apr 11 22:34:17 2009
New Revision: 71499

Log:
Add a monkeypatching hack so that the docs can still be built with Sphinx 0.5.

Modified:
   python/branches/release26-maint/Doc/tools/sphinxext/pyspecific.py

Modified: python/branches/release26-maint/Doc/tools/sphinxext/pyspecific.py
==============================================================================
--- python/branches/release26-maint/Doc/tools/sphinxext/pyspecific.py	(original)
+++ python/branches/release26-maint/Doc/tools/sphinxext/pyspecific.py	Sat Apr 11 22:34:17 2009
@@ -5,7 +5,7 @@
 
     Sphinx extension with Python doc-specific markup.
 
-    :copyright: 2008 by Georg Brandl.
+    :copyright: 2008, 2009 by Georg Brandl.
     :license: Python license.
 """
 
@@ -59,7 +59,11 @@
 try:
     from sphinx.builders import Builder
 except ImportError:
+    # using Sphinx < 0.6, which has a different package layout
     from sphinx.builder import Builder
+    # monkey-patch toctree directive to accept (and ignore) the :numbered: flag
+    from sphinx.directives.other import toctree_directive
+    toctree_directive.options['numbered'] = toctree_directive.options['glob']
 
 try:
     from sphinx.writers.text import TextWriter


More information about the Python-checkins mailing list