summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-10-06 23:49:46 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-10-06 23:49:46 +0900
commit86c48c4b82eddcbf3b083643b0862f59a61ec1ad (patch)
tree5bd7ad8e5c943fe7970c9042bafbdb6ed231879f
parente5b8f6a67989426a93971acc187b821a86314e59 (diff)
downloadsphinx-git-86c48c4b82eddcbf3b083643b0862f59a61ec1ad.tar.gz
Fix #5492: sphinx-build fails to build docs w/ Python < 3.5.2
-rw-r--r--CHANGES1
-rw-r--r--sphinx/transforms/post_transforms/compat.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 5b8954af4..ea18c839f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,7 @@ Bugs fixed
----------
* #5490: latex: enumerated list causes a crash with recommonmark
+* #5492: sphinx-build fails to build docs w/ Python < 3.5.2
Testing
--------
diff --git a/sphinx/transforms/post_transforms/compat.py b/sphinx/transforms/post_transforms/compat.py
index c67f7149f..9a03ff6b5 100644
--- a/sphinx/transforms/post_transforms/compat.py
+++ b/sphinx/transforms/post_transforms/compat.py
@@ -10,7 +10,6 @@
"""
import warnings
-from typing import TYPE_CHECKING
from docutils import nodes
from docutils.writers.docutils_xml import XMLTranslator
@@ -20,7 +19,8 @@ from sphinx.deprecation import RemovedInSphinx30Warning
from sphinx.transforms import SphinxTransform
from sphinx.util import logging
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Callable, Dict, Iterable, List, Tuple # NOQA
from docutils.parsers.rst.states import Inliner # NOQA
from docutils.writers.html4css1 import Writer # NOQA