Fix #5417: Sphinx fails to build with syntax error in Python 2.7.5

This commit is contained in:
Takeshi KOMIYA 2018-09-16 18:49:18 +09:00
parent e756c209a5
commit 1d60e6a90c
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Bugs fixed
* #5418: Incorrect default path for sphinx-build -d/doctrees files
* #5421: autodoc emits deprecation warning for :confval:`autodoc_default_flags`
* #5422: lambda object causes PicklingError on storing environment
* #5417: Sphinx fails to build with syntax error in Python 2.7.5
Testing
--------

View File

@ -153,7 +153,7 @@ class TestDirective(SphinxDirective):
if self.name == 'doctest' and 'pyversion' in self.options:
try:
spec = self.options['pyversion']
python_version = '.'.join(str(v) for v in sys.version_info[:3])
python_version = '.'.join([str(v) for v in sys.version_info[:3]])
if not is_allowed_version(spec, python_version):
flag = doctest.OPTIONFLAGS_BY_NAME['SKIP']
node['options'][flag] = True # Skip the test