[Web-SIG] WSGI, Python 3 and Unicode

Graham Dumpleton graham.dumpleton at gmail.com
Fri Dec 7 00:13:39 CET 2007

Has anyone had any thoughts about how WSGI is going to made to work
with Python 3?

>From what I understand about changes in Python 3, the main issue seems
to be the removal of string type in its current form.

This is an issue as WSGI specification currently states that status,
header names/values and the items returned by the iterable must all be
string instances. This is done to ensure that the application has done
any conversions from Unicode, where knowledge about encoding would be
known, before being passed to WSGI adapter.

In Python 3 the default for string type objects will effectively be
Unicode. Is WSGI going to be made to somehow cope with that, or will
application instead be required to return byte string objects instead?

We can never seem to get enough momentum going for WSGI 2.0, but with
Python 3 coming along we may not have a choice but to come up with
revised version of specification if we want WSGI to continue through
to Python 3.



More information about the Web-SIG mailing list