[Web-SIG] WSGI and Py3k
graham.dumpleton at gmail.com
Tue Dec 23 23:34:53 CET 2008
2008/12/24 Dmitry Vasiliev <dima at hlabs.spb.ru>:
> Currently wsgiref package in Py3k just broken so I've filled ticket
> #4718 (http://bugs.python.org/issue4718). Actually there are more than
> one ticket about the problem - see the link for details. In a comment to
> the ticket Phillip said we need to open discussion here then update
> PEP-333 and only then fix the package. I think it's important to fix
> wsgiref *somehow* (for example we can temporarily disable it) in the
> upcoming Python 3.0.1 release so there is the main question:
> - Which Py3k data type to use as "strings" mentioned in the PEP?
> For now the PEP explicitly say to *always* use "str" type
> (http://www.python.org/dev/peps/pep-0333/#unicode-issues) but in Py3k
> "str" is just like "unicode" in Python 2.*. Moreover from Py3k's point
> of view there is a conflict in the PEP because of 'strings must be of
> type str, and must not be of type unicode'.
> The type corresponding to "str" from Python 2.* in Py3k is "bytes" so at
> first it seems convenient to use "bytes". But it violates the current
> version of the PEP and 2to3 utility (for now?) convert old "str" as new
> "str", not "bytes". However I believe it's not too hard to encode new
> "str" (converted by 2to3) to "bytes" before returning from an WSGI
> Also we can support both new "str" and "bytes" in some transitional period.
Have you read:
As much as could be done was worked out quite a while back. I don't
quite understand why PJE is ignoring/forgetting about that list in the
I haven't read the bug reports properly yet, but some of the comments
in the thread says certain things are broken yet that is what was
worked out already as way of doing it.
Have you tried out mod_wsgi (source from subversion repository), which
also has been ported to Python 3.0 already as per proposals in that
When get chance I will read bug reports.
More information about the Web-SIG