Pylons/webob — Issue #9: Import fails in compat.py on python 2.5
Author: campey
Created: 2011-11-14 15:28:00+00:00
State: open

# Context

I'm writing an appengine project on python 2.5.4. Running the appengine local dev environment works fine. When I try to run unittests with 1.2b2 it fails in the following way.

# Problem

When importing compat.py, on python 2.5 somehow we end up on line 89 as in the following build error:

```
File "/home/ccomb/buildout-eggs/WebOb-1.2b2-py2.5.egg/webob/compat.py", line 89
return b''
^
SyntaxError: invalid syntax
```

A full log is here:
http://buildbot.afpy.org/formalchemy/builders/FormAlchemy%20Python2.5.5%2064bit%20Linux/builds/405/steps/test/logs/stdio/text
(not mine, but it's the same error in the end)

It's really weird, because afaict the "if PY3:" block that the def is in should mean we never get there.

# Workaround

Reverting to 1.1.1 with easy_install fixes the problem for me.