Fix Python version compatibility with Jinja2 2.7. closes #1173

This commit is contained in:
Takayuki Shimizukawa 2013-05-29 09:16:14 +00:00
parent 9d3bac3b8e
commit b2997a652e
2 changed files with 9 additions and 2 deletions

View File

@ -9,6 +9,8 @@ Features added
Bugs fixed Bugs fixed
---------- ----------
* #1173: Newest Jinja2 2.7 breaks Python version compatibilities because the
Jinja2 2.7 drops support for Python 2.5, 3.1, 3.2. Thanks to Alexander Dupuy.
* #1160: Citation target missing cause AssertionError. * #1160: Citation target missing cause AssertionError.
* #1157: Combination of 'globaltoc.html' and hidden toctree cause exception. * #1157: Combination of 'globaltoc.html' and hidden toctree cause exception.
* Fix: 'make gettext' cause UnicodeDecodeError when templates contain utf-8 * Fix: 'make gettext' cause UnicodeDecodeError when templates contain utf-8

View File

@ -44,10 +44,15 @@ A development egg can be found `here
<http://bitbucket.org/birkenfeld/sphinx/get/tip.gz#egg=Sphinx-dev>`_. <http://bitbucket.org/birkenfeld/sphinx/get/tip.gz#egg=Sphinx-dev>`_.
''' '''
requires = ['Pygments>=1.2', 'Jinja2>=2.3', 'docutils>=0.7'] requires = ['Pygments>=1.2', 'docutils>=0.7']
if sys.version_info[:3] >= (3, 3, 0): if sys.version_info[:3] >= (3, 3, 0):
requires[2] = 'docutils>=0.10' requires[1] = 'docutils>=0.10'
if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3):
requires.append('Jinja2>=2.3,<2.7')
else:
requires.append('Jinja2>=2.3')
if sys.version_info < (2, 5): if sys.version_info < (2, 5):
print('ERROR: Sphinx requires at least Python 2.5 to run.') print('ERROR: Sphinx requires at least Python 2.5 to run.')