summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-07-03 18:39:49 -0400
committerNed Deily <nad@python.org>2019-07-03 18:39:48 -0400
commita6d97e200863e7e5fc60bbc8f121b86a2098ef2d (patch)
treef04ae3d82d4e9e716a07658688c7ca2f058bf723
parentPost release updates (diff)
downloadcpython-a6d97e200863e7e5fc60bbc8f121b86a2098ef2d.tar.gz
cpython-a6d97e200863e7e5fc60bbc8f121b86a2098ef2d.tar.bz2
cpython-a6d97e200863e7e5fc60bbc8f121b86a2098ef2d.zip
Fix 3.6 documentation build for sphinx<1.6 (GH-14576)
-rw-r--r--Doc/tools/extensions/suspicious.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/tools/extensions/suspicious.py b/Doc/tools/extensions/suspicious.py
index 8d80f6759bf..dfcd0da9fdb 100644
--- a/Doc/tools/extensions/suspicious.py
+++ b/Doc/tools/extensions/suspicious.py
@@ -50,6 +50,12 @@ from docutils import nodes
from sphinx.builders import Builder
import sphinx.util
+try: # sphinx>=1.6
+ from sphinx.util.logging import getLogger
+except ImportError: # sphinx<1.6
+ from logging import getLogger
+
+
detect_all = re.compile(r'''
::(?=[^=])| # two :: (but NOT ::=)
:[a-zA-Z][a-zA-Z0-9]+| # :foo
@@ -86,7 +92,7 @@ class CheckSuspiciousMarkupBuilder(Builder):
Checks for possibly invalid markup that may leak into the output.
"""
name = 'suspicious'
- logger = sphinx.util.logging.getLogger("CheckSuspiciousMarkupBuilder")
+ logger = getLogger("CheckSuspiciousMarkupBuilder")
def init(self):
# create output file