mitsuhiko/werkzeug — Issue #141: python2.4: Avoid with statement in test suite
Author: jbergstroem
Created: 2011-12-02 11:23:41+00:00
State: open

Looks like there's a with statement in the test suite. Python 2.4 cries:
{{{
Traceback (most recent call last):
File "setup.py", line 86, in ?
platforms='any'
File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
dist.run_commands()
File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
cmd_obj.run()
File "/usr/lib64/python2.4/site-packages/setuptools/command/test.py", line 137, in run
self.with_project_on_sys_path(self.run_tests)
File "/usr/lib64/python2.4/site-packages/setuptools/command/test.py", line 117, in with_project_on_sys_path
func()
File "/usr/lib64/python2.4/site-packages/setuptools/command/test.py", line 146, in run_tests
testLoader = loader_class()
File "/usr/lib/python2.4/unittest.py", line 758, in __init__
self.parseArgs(argv)
File "/usr/lib/python2.4/unittest.py", line 785, in parseArgs
self.createTests()
File "/usr/lib/python2.4/unittest.py", line 791, in createTests
self.module)
File "/usr/lib/python2.4/unittest.py", line 556, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.4/unittest.py", line 524, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "/home/jbergstroem/Werkzeug-0.8.1/werkzeug/testsuite/__init__.py", line 70
with catcher:
^
SyntaxError: invalid syntax
}}}

Applies both to 0.8.x and HEAD.

Together with issue #104, werkzeug works great on python 2.4.