15

I use webapp2 with python 2.7 with or without googleAppEngine. I'm now trying to use it with Python 3.3

I've used PIP to install webapp2 Install run with success but when I try to import webapp2 from IDLE gaves me the folowing error:

File "<pyshell#0>", line 1, in <module>
    import webapp2
    File "C:\Python3\lib\webapp2.py", line 571
    except Exception, e:
                    ^

I suspect it's a thing that must be updated in order to work with Python3... ?anybody done this already or should I wait for an updated version of webapp2 ?is there any a beta version for Python 3 that we can access

ZEE
  • 2,931
  • 5
  • 35
  • 47
  • 1
    App Engine doesn't run Python 3 so no effort has been made to make webapp2 work there (while it does have to run on 2.5); You could try to run 2to3 on it, but you certainly can't expect it to run without modifications. – Wooble Mar 26 '13 at 14:26

2 Answers2

7

It seems like webapp2 is now compatible with Python3 from version webapp2>=3.0.0b1. This is still a "development" version - you have to specify that you want this version installed as:

pip install webapp2>=3.0.0b1

Hope it helps somebody that comes across this (old) question as I did.

silence
  • 101
  • 1
  • 6
6

Indeed, webapp2 is not Python 3 compatible.

There is a issue on Python 3 in the issue tracker for the project, but there is next to no content in that issue. There does not appear to be any effort towards a port yet.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • I've just visited and leave a comment, thanks for your info https://code.google.com/p/webapp-improved/issues/detail?id=40 – ZEE Mar 26 '13 at 14:32