#943: cherrypy's wsgi support not to spec for Python 3.x
--------------------------------+-------------------------------------------
Reporter:
arcr...@gmail.com | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: CherryPy code | Resolution:
Keywords: |
--------------------------------+-------------------------------------------
Comment (by
Graham.D...@gmail.com):
Actually, neither the proposed ammendments or the discussion about them
has explicitly said what 'status' value passed as first argument to
start_response() should be. If one were to follow what was being done with
the headers, then bytes should perhaps be accepted, with WSGI server
converting any unicode string to bytes per latin-1 encoding otherwise.
Thus, mod_wsgi is perhaps doing the wrong thing, but only because fixing
up that code for Python 3.0 was overlooked. :-)
BTW, do note that irrespective of the fact that there are proposed
ammendments, there is no WSGI specification for Python 3.0 and so although
producers of WSGI servers may try and implement what they think is
reasonable, it may not actually match what the WSGI specification for
Python 3.0, if one is ever produced, may say.
For that reason, for mod_wsgi at least there is a huge disclaimer in
documentation which says:
"""All ability to use Python 3.0 with mod_wsgi is not supported. If you
have a problem with mod_wsgi and what it does, first go get the Python
WEB-SIG people to agree on what it should do first."""
So be warned, if you are trying to write WSGI applications for Python 3.0,
then don't necessarily expect that it will work with any WSGI
specification for Python 3.0 if one is produced. Also don't complain to
the authors of the WSGI servers if it doesn't do what you expect, go
petition the Python WEB-SIG or even Guido himself to sort this mess out
and come out with an official WSGI specification update for Python 3.0.
Personally, I have given up trying any more and will not be doing any more
development work around Python 3.0 for mod_wsgi until there is a
specification, although I will fix up at least how 'status' is treated as
it doesn't match how other bits of mod_wsgi currently work with Python
3.0.