latest Jinja2 (2.7) requires Python 2.6 or later

Alexander Dupuy avatarAlexander Dupuy created an issue

Currently, the requirements in setup.py simply demand "Jinja2>=2.3"; however, this breaks Python 2.4, 2.5, 3.1, and 3.2, which are not supported by Jinja2 2.7:

http://jinja.pocoo.org/docs/changelog/#version-2-7

Ideally, for these older Python versions, the requirement could be stated instead as 'Jinja2>=2.3,<2.7' I'm not sure if the requirement in setup.py can be simply made conditional on the Python version with something like this:

if sys.hexversion < 0x02060000 or 0x03000000 <= sys.hexversion < 0x03030000: requires = ['Pygments>=1.2', 'Jinja2>=2.3,<2.7', 'docutils>=0.7'] else: requires = ['Pygments>=1.2', 'Jinja2>=2.3', 'docutils>=0.7']

but that might be worth a try.

It might also be worth adding some kind of mention of this issue to http://sphinx-doc.org/intro.html#prerequisites

Comments (5)

  1. Alexander Dupuy

    Sorry, omitted Markdown code-block for example code above, here it is a bit more readably:

    if sys.hexversion < 0x02060000 or 0x03000000 <= sys.hexversion < 0x03030000:
        requires = ['Pygments>=1.2', 'Jinja2>=2.3,<2.7', 'docutils>=0.7']
    else:
        requires = ['Pygments>=1.2', 'Jinja2>=2.3', 'docutils>=0.7']
    
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.