[2.7] bpo-35605: Fix documentation build for sphinx<1.6 (GH-12413) · python/cpython@869652b (original) (raw)
File tree
3 files changed
lines changed
- Misc/NEWS.d/next/Documentation
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -57,7 +57,7 @@ | ||
57 | 57 | |
58 | 58 | # Custom sidebar templates, filenames relative to this file. |
59 | 59 | html_sidebars = { |
60 | -'index': 'indexsidebar.html', | |
60 | +'index': ['indexsidebar.html'], | |
61 | 61 | } |
62 | 62 | |
63 | 63 | # Additional templates that should be rendered to pages. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -15,7 +15,6 @@ | ||
15 | 15 | from docutils import nodes, utils |
16 | 16 | from docutils.parsers.rst import Directive |
17 | 17 | |
18 | -from sphinx.util import status_iterator | |
19 | 18 | from sphinx.util.nodes import split_explicit_title |
20 | 19 | from sphinx.writers.html import HTMLTranslator |
21 | 20 | from sphinx.writers.latex import LaTeXTranslator |
@@ -173,6 +172,11 @@ def get_target_uri(self, docname, typ=None): | ||
173 | 172 | return '' # no URIs |
174 | 173 | |
175 | 174 | def write(self, *ignored): |
175 | +try: # sphinx>=1.6 | |
176 | +from sphinx.util import status_iterator | |
177 | +except ImportError: # sphinx<1.6 | |
178 | +status_iterator = self.status_iterator | |
179 | + | |
176 | 180 | writer = TextWriter(self) |
177 | 181 | for label in status_iterator(pydoc_topic_labels, |
178 | 182 | 'building topics... ', |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 | +Fix documentation build for sphinx<1.6. Patch by Anthony Sottile. |