Re: [Web-SIG] WSGI 2

2009-08-11 Thread Ian Bicking
On Tue, Aug 11, 2009 at 11:58 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > 2009/8/12 Ian Bicking : > > On Tue, Aug 11, 2009 at 11:19 PM, Robert Brewer > wrote: > >> > >> > 5. When running under Python 3, servers MUST provide CGI HTTP and > >> > server variables as strings. Where su

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Graham Dumpleton
2009/8/12 Ian Bicking : > On Tue, Aug 11, 2009 at 11:19 PM, Robert Brewer wrote: >> >> > 5. When running under Python 3, servers MUST provide CGI HTTP and >> > server variables as strings. Where such values are sourced from a byte >> > string, be that a Python byte string or C string, they should

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Ian Bicking
On Tue, Aug 11, 2009 at 11:19 PM, Robert Brewer wrote: > > 5. When running under Python 3, servers MUST provide CGI HTTP and > > server variables as strings. Where such values are sourced from a byte > > string, be that a Python byte string or C string, they should be > > converted as 'UTF-8'. I

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Robert Brewer
Graham Dumpleton wrote: > So, for WSGI 1.0 style of interface and Python 3.0, the following is > what I was going to implement. FWIW, I'll answer with what we've implemented for CherryPy 3.2. > 1. When running under Python 3, applications SHOULD produce bytes > output, status line and headers. Y

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Graham Dumpleton
2009/8/12 Henry Precheur : > On Wed, Aug 12, 2009 at 09:25:21AM +1000, Graham Dumpleton wrote: >> Use of bytes everywhere can be inconvenient on the gateway/server >> side, at least as far as end result for user. > > Yes, but wouldn't it be simpler for mod_wsgi to only deal with bytes? > unicode C

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Henry Precheur
On Wed, Aug 12, 2009 at 09:25:21AM +1000, Graham Dumpleton wrote: > Use of bytes everywhere can be inconvenient on the gateway/server > side, at least as far as end result for user. Yes, but wouldn't it be simpler for mod_wsgi to only deal with bytes? unicode C strings -> bytes and char* -> bytes

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Graham Dumpleton
2009/8/12 Ian Bicking : > On Tue, Aug 11, 2009 at 6:25 PM, Graham Dumpleton > wrote: >> >> 2009/8/12 Henry Precheur : >> > Using bytes for all `environ` values is easy to understand on the >> > application side as long as you are aware of the encoding problem. The >> > cost is inconvenience, but t

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Ian Bicking
On Tue, Aug 11, 2009 at 6:25 PM, Graham Dumpleton < graham.dumple...@gmail.com> wrote: > 2009/8/12 Henry Precheur : > > Using bytes for all `environ` values is easy to understand on the > > application side as long as you are aware of the encoding problem. The > > cost is inconvenience, but that's

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Graham Dumpleton
2009/8/12 Henry Precheur : > Using bytes for all `environ` values is easy to understand on the > application side as long as you are aware of the encoding problem. The > cost is inconvenience, but that's probably OK. It's also simpler to > implement on the gateway/server side. Use of bytes everywh

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Henry Precheur
Using bytes for all `environ` values is easy to understand on the application side as long as you are aware of the encoding problem. The cost is inconvenience, but that's probably OK. It's also simpler to implement on the gateway/server side. By choosing bytes, WSGI passes the encoding problem to