[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-web-sig
Subject:    Re: [Web-SIG] decoding environ
From:       Graham Dumpleton <graham.dumpleton () gmail ! com>
Date:       2010-07-17 11:29:36
Message-ID: AANLkTimrG4EftKTPAuztlAUp-kBe3tJ37ZxFw92zcJAX () mail ! gmail ! com
[Download RAW message or body]

On Saturday, July 17, 2010, Antoine Pitrou <solipsis@pitrou.net> wrote:
> Ian Bicking <ianb@...> writes:
>>
>> So... there's been some discussion of WSGI on Python 3 lately.
>> I'm not feeling as pessimistic as some people, I feel like we were close
>> but just didn't *quite* get there.
>> Here's my thoughts:
>> * Everyone agrees keys in the environ should be native strings
>
> I don't know how that related to WSGI but it should be noted that Python 3.2
> comes with two synchronized views of the environment: os.environ (str -> str
> mapping) and os.environb (bytes -> bytes mapping).
>
> See http://docs.python.org/dev/library/os.html#os.environ
>
> Also, the way os.environ is decoded from bytes values involves the
> "surrogateescape" error handler, which ensures that non-decodeable bytes get
> their own unicode escape sequences, and can get re-encoded losslessly:
>
> http://www.python.org/dev/peps/pep-0383/

Only relevant to the extent it is needed for implementing a CGI/WSGI
bridge. Not relevant to WSGI itself.

Graham
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/python-web-sig%40marc.info
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic