Python 3 port available #212

puzzlet opened this Issue Sep 1, 2012 · 11 comments


None yet
10 participants

puzzlet commented Sep 1, 2012

I'm porting Werkzeug to run in Python 3.2.

Update: It passes all the tests, and is able to run simple applications.


mitsuhiko commented Sep 2, 2012

I haven't had the time yet to look at it in detail. Is this one source compatible with Python 2 or does it run on 3.x exclusively?


puzzlet commented Sep 3, 2012

3.x exclusively. I think it can also be made to pass through 2to3, but two things making this complex:

  • request / response bodies should be in bytes. It took not so many changes to the actual code, but to test cases. We have to specify every string in the testsuites, which should become bytes or not in Python 3.
  • PEP3333 states that environ['PATH_INFO'] should be a (unicode) str, but the content of it is merely a bytestring decoded in latin1. General path informations in Python 3 web applications are expected to be unicode strings, but the code can't distinguish them from the new WSGI's PATH_INFO. So I had to change the behavior of so that you have to tell that whether the path argument is path (properly decoded unicode string) or path_info (from environ) : puzzlet/werkzeug@dee629b...526617d

Few more differences at

Is there anything new happening on this? I would like to use flask+werkzeug in a python 3 environment - mostly doing scientific stuff (numpy et. al), the Flask part is the only one without Python 3 support now :(

I would also like to have some news.


kennethreitz commented Nov 22, 2012

@puzzlet's 2to3 patches:
Werkzeug: mitsuhiko#231
Flask: mitsuhiko/flask#627

@explorigin explorigin referenced this issue in pallets/flask Feb 11, 2013


Python 3 port is available #587

What's the current status?

ssijak commented Apr 14, 2013

Is there an ETA for Werkzeug+Flask on python 3.X? I want to start using flask, but it seems like there is a lack of support from core developers in recent times, so I am not shure if it would be the right choice to invest time in Flask.


untitaker commented Apr 14, 2013

Also Armin said on Twitter there will be some kind of hackathon within the next weeks for that.

there is another port proposed at issue #279

time to get one of those bad boys in and finally port flask


mitsuhiko commented May 31, 2013

Newer port is now in master.

@mitsuhiko mitsuhiko closed this May 31, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment