mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #5417: Sphinx fails to build with syntax error in Python 2.7.5
This commit is contained in:
parent
e756c209a5
commit
1d60e6a90c
1
CHANGES
1
CHANGES
@ -19,6 +19,7 @@ Bugs fixed
|
|||||||
* #5418: Incorrect default path for sphinx-build -d/doctrees files
|
* #5418: Incorrect default path for sphinx-build -d/doctrees files
|
||||||
* #5421: autodoc emits deprecation warning for :confval:`autodoc_default_flags`
|
* #5421: autodoc emits deprecation warning for :confval:`autodoc_default_flags`
|
||||||
* #5422: lambda object causes PicklingError on storing environment
|
* #5422: lambda object causes PicklingError on storing environment
|
||||||
|
* #5417: Sphinx fails to build with syntax error in Python 2.7.5
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -153,7 +153,7 @@ class TestDirective(SphinxDirective):
|
|||||||
if self.name == 'doctest' and 'pyversion' in self.options:
|
if self.name == 'doctest' and 'pyversion' in self.options:
|
||||||
try:
|
try:
|
||||||
spec = self.options['pyversion']
|
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):
|
if not is_allowed_version(spec, python_version):
|
||||||
flag = doctest.OPTIONFLAGS_BY_NAME['SKIP']
|
flag = doctest.OPTIONFLAGS_BY_NAME['SKIP']
|
||||||
node['options'][flag] = True # Skip the test
|
node['options'][flag] = True # Skip the test
|
||||||
|
Loading…
Reference in New Issue
Block a user