Skip to content

[3.6] bpo-35605: Fix documentation build for sphinx<1.6 #11368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Doc/tools/extensions/escape4chm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
import re
from html.entities import codepoint2name

from sphinx.util.logging import getLogger
try: # sphinx>=1.6
from sphinx.util.logging import getLogger
except ImportError: # sphinx<1.6
from logging import getLogger

# escape the characters which codepoint > 0x7F
def _process(string):
Expand Down
6 changes: 5 additions & 1 deletion Doc/tools/extensions/pyspecific.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from sphinx import addnodes
from sphinx.builders import Builder
from sphinx.locale import translators
from sphinx.util import status_iterator
from sphinx.util.nodes import split_explicit_title
from sphinx.writers.html import HTMLTranslator
from sphinx.writers.text import TextWriter, TextTranslator
Expand Down Expand Up @@ -314,6 +313,11 @@ def get_target_uri(self, docname, typ=None):
return '' # no URIs

def write(self, *ignored):
try: # sphinx>=1.6
from sphinx.util import status_iterator
except ImportError: # sphinx<1.6
status_iterator = self.status_iterator

writer = TextWriter(self)
for label in status_iterator(pydoc_topic_labels,
'building topics... ',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix documentation build for sphinx<1.6. Patch by Anthony Sottile.