diff --git a/CHANGES b/CHANGES index d95a4026f..f2ec8b162 100644 --- a/CHANGES +++ b/CHANGES @@ -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 -------- diff --git a/sphinx/ext/doctest.py b/sphinx/ext/doctest.py index fa6cbed6d..c35b3d284 100644 --- a/sphinx/ext/doctest.py +++ b/sphinx/ext/doctest.py @@ -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