Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Python 3 port available #212

Closed
puzzlet opened this Issue · 11 comments

10 participants

@puzzlet

I'm porting Werkzeug to run in Python 3.2.

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

@mitsuhiko
Owner

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

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 routing.py so that you have to tell that whether the path argument is path (properly decoded unicode string) or path_info (from environ) : puzzlet@dee629b...526617d

Few more differences at https://github.com/puzzlet/werkzeug/blob/py3-dev/README.py3.markdown

@mangecoeur

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 :(

@gillestasse

I would also like to have some news.

@kennethreitz
Collaborator
@soulseekah

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

@explorigin explorigin referenced this issue in mitsuhiko/flask
Closed

Python 3 port is available #587

@piotr-dobrogost

@mitsuhiko
What's the current status?

@ssijak

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
Collaborator

https://gist.github.com/untitaker/5321447

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

@flying-sheep

there is another port proposed at issue #279

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

@mitsuhiko
Owner

Newer port is now in master.

@mitsuhiko mitsuhiko closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.