Merge pull request #5510 from tk0miya/5492_crashed_with_py352

Fix #5492: sphinx-build fails to build docs w/ Python < 3.5.2
This commit is contained in:
Takeshi KOMIYA 2018-10-07 00:44:09 +09:00 committed by GitHub
commit 6ccd53eefb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@ Bugs fixed
---------- ----------
* #5490: latex: enumerated list causes a crash with recommonmark * #5490: latex: enumerated list causes a crash with recommonmark
* #5492: sphinx-build fails to build docs w/ Python < 3.5.2
Testing Testing
-------- --------

View File

@ -10,7 +10,6 @@
""" """
import warnings import warnings
from typing import TYPE_CHECKING
from docutils import nodes from docutils import nodes
from docutils.writers.docutils_xml import XMLTranslator from docutils.writers.docutils_xml import XMLTranslator
@ -20,7 +19,8 @@ from sphinx.deprecation import RemovedInSphinx30Warning
from sphinx.transforms import SphinxTransform from sphinx.transforms import SphinxTransform
from sphinx.util import logging from sphinx.util import logging
if TYPE_CHECKING: if False:
# For type annotation
from typing import Any, Callable, Dict, Iterable, List, Tuple # NOQA from typing import Any, Callable, Dict, Iterable, List, Tuple # NOQA
from docutils.parsers.rst.states import Inliner # NOQA from docutils.parsers.rst.states import Inliner # NOQA
from docutils.writers.html4css1 import Writer # NOQA from docutils.writers.html4css1 import Writer # NOQA