Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 port available #212

Closed
puzzlet opened this issue Sep 1, 2012 · 11 comments
Closed

Python 3 port available #212

puzzlet opened this issue Sep 1, 2012 · 11 comments

Comments

@puzzlet
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

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 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/werkzeug@dee629b...526617d

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

@mangecoeur
Copy link

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
Copy link

I would also like to have some news.

@kennethreitz
Copy link
Contributor

/cc @mitsuhiko

@soulseekah
Copy link

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

@piotr-dobrogost
Copy link

@mitsuhiko
What's the current status?

@ssijak
Copy link

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
Copy link
Contributor

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
Copy link

there is another port proposed at issue #279

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

@mitsuhiko
Copy link
Contributor

Newer port is now in master.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants