Fix #2470: `typing` backport package causes autodoc errors with python 2.7

This commit is contained in:
Takeshi KOMIYA
2016-05-21 11:50:13 +09:00
parent 0286c6810a
commit 20b3da5cf6
2 changed files with 5 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ Bugs fixed
* #2555: Fix crash on any-references with unicode.
* #2517: wrong bookmark encoding in PDF if using LuaLaTeX
* #2521: generated Makefile causes BSD make crashed if sphinx-build not found
* #2470: ``typing`` backport package causes autodoc errors with python 2.7
Release 1.4.1 (released Apr 12, 2016)

View File

@@ -35,7 +35,10 @@ from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \
from sphinx.util.docstrings import prepare_docstring
try:
import typing
if sys.version_info >= (3,):
import typing
else:
typing = None
except ImportError:
typing = None