Fix the 'as' syntax, used for exception handling. The 'as' syntax is incompatible with python<=2.5.
The json module is not available in python<=2.5, simplejson can be used instead of json for python<=2.5.
Load the requirements from requirements.txt so the package is more "pip-friendly".
Use unittest2 instead of standard unittest so the tests run the same in python==2.4, python==2.5, python==2.6 and python==2.7.