Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6d97e2

Browse files
asottilened-deily
authored andcommitted
Fix 3.6 documentation build for sphinx<1.6 (GH-14576)
1 parent af9e126 commit a6d97e2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Doc/tools/extensions/suspicious.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
from sphinx.builders import Builder
5151
import sphinx.util
5252

53+
try: # sphinx>=1.6
54+
from sphinx.util.logging import getLogger
55+
except ImportError: # sphinx<1.6
56+
from logging import getLogger
57+
58+
5359
detect_all = re.compile(r'''
5460
::(?=[^=])| # two :: (but NOT ::=)
5561
:[a-zA-Z][a-zA-Z0-9]+| # :foo
@@ -86,7 +92,7 @@ class CheckSuspiciousMarkupBuilder(Builder):
8692
Checks for possibly invalid markup that may leak into the output.
8793
"""
8894
name = 'suspicious'
89-
logger = sphinx.util.logging.getLogger("CheckSuspiciousMarkupBuilder")
95+
logger = getLogger("CheckSuspiciousMarkupBuilder")
9096

9197
def init(self):
9298
# create output file

0 commit comments

Comments
 (0)