[Web-SIG] Python 3.0 and WSGI 1.0.

Robert Brewer fumanchu at aminus.org
Wed Apr 1 18:37:38 CEST 2009


Guido van Rossum wrote:
> Sent: Wednesday, April 01, 2009 9:34 AM
> To: Robert Brewer
> Cc: Web SIG
> Subject: Re: [Web-SIG] Python 3.0 and WSGI 1.0.
> 
> On Wed, Apr 1, 2009 at 5:18 AM, Robert Brewer <fumanchu at aminus.org>
> wrote:
> > Good timing. We had been thinking to make everything strings except
> for
> > SCRIPT_NAME, PATH_INFO, and QUERY_STRING, since these few are pulled
> > from the Request-URI, which may be in any encoding. It was thought
> that
> > the app would be best-qualified to decode those three.
> 
> Argh. The *meaning* of these fields is clearly text. It would be most
> unfortunately if all apps were required to deal with decoding bytes
> for these (there is no choice any more, unlike in 2.x). I appreciate
> the sentiment that the encoding is unknown, but I would much prefer it
> if there was a default encoding that the app could override, or if
> there was some other mechanism whereby the app would not have to be
> bothered with decoding bytes unless it cared.
> 
> Note that Py3k also treats filenames as text, with an optional escape
> hatch for using bytes that only very few apps will need to use.

Understood. I think we have plenty of options here for returning text.
We'll discuss this ASAP in the room.


Robert Brewer
fumanchu at aminus.org



More information about the Web-SIG mailing list