Skip to content

Commit 869652b

Browse files
authored
[2.7] bpo-35605: Fix documentation build for sphinx<1.6 (GH-12413)
(cherry picked from commit dfc8fc15fa989acba3c372572e52bbcb5ab38a37)
1 parent 8c380e9 commit 869652b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

‎Doc/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
# Custom sidebar templates, filenames relative to this file.
5959
html_sidebars = {
60-
'index': 'indexsidebar.html',
60+
'index': ['indexsidebar.html'],
6161
}
6262

6363
# Additional templates that should be rendered to pages.

‎Doc/tools/extensions/pyspecific.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from docutils import nodes, utils
1616
from docutils.parsers.rst import Directive
1717

18-
from sphinx.util import status_iterator
1918
from sphinx.util.nodes import split_explicit_title
2019
from sphinx.writers.html import HTMLTranslator
2120
from sphinx.writers.latex import LaTeXTranslator
@@ -173,6 +172,11 @@ def get_target_uri(self, docname, typ=None):
173172
return '' # no URIs
174173

175174
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+
176180
writer = TextWriter(self)
177181
for label in status_iterator(pydoc_topic_labels,
178182
'building topics... ',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix documentation build for sphinx<1.6. Patch by Anthony Sottile.

0 commit comments

Comments
 (0)