diff options
author | Anthony Sottile <asottile@umich.edu> | 2019-07-03 22:39:49 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2019-07-03 22:39:48 (GMT) |
commit | a6d97e200863e7e5fc60bbc8f121b86a2098ef2d (patch) | |
tree | f04ae3d82d4e9e716a07658688c7ca2f058bf723 | |
parent | af9e126a50eb0317f45e995fb3b32fdda48706bc (diff) | |
download | cpython-a6d97e200863e7e5fc60bbc8f121b86a2098ef2d.zip cpython-a6d97e200863e7e5fc60bbc8f121b86a2098ef2d.tar.gz cpython-a6d97e200863e7e5fc60bbc8f121b86a2098ef2d.tar.bz2 |
Fix 3.6 documentation build for sphinx<1.6 (GH-14576)
-rw-r--r-- | Doc/tools/extensions/suspicious.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/tools/extensions/suspicious.py b/Doc/tools/extensions/suspicious.py index 8d80f67..dfcd0da 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 |