Re: [Web-SIG] WSGI2: write callable?

2014-09-29 Thread PJ Eby
On Sun, Sep 28, 2014 at 10:09 PM, Robert Collins robe...@robertcollins.net wrote: On 29 September 2014 08:32, PJ Eby p...@telecommunity.com wrote: On Sat, Sep 27, 2014 at 5:38 PM, Robert Collins robe...@robertcollins.net wrote: I think we're uncovering important assumptions / facts here.

Re: [Web-SIG] WSGI2: write callable?

2014-09-29 Thread Robert Collins
It occurs to me that we're deep into one of Joey Hess's email-thread anti-patterns, so I'm going to leave this here for now. As I've said, I think the next step forward is to do some experimentation, which I'm sure the existing implementors that have expressed interest in this effort will join me

Re: [Web-SIG] WSGI2: write callable?

2014-09-28 Thread PJ Eby
On Sat, Sep 27, 2014 at 5:38 PM, Robert Collins robe...@robertcollins.net wrote: I think we're uncovering important assumptions / facts here. Indeed! For clarity: I'm not interested in a nice API for HTTP/2. I want HTTP/2 and its full featureset to be *possible*, *efficient* and *clear* in

Re: [Web-SIG] WSGI2: write callable?

2014-09-28 Thread Robert Collins
On 29 September 2014 08:32, PJ Eby p...@telecommunity.com wrote: On Sat, Sep 27, 2014 at 5:38 PM, Robert Collins robe...@robertcollins.net wrote: I think we're uncovering important assumptions / facts here. Indeed! For clarity: I'm not interested in a nice API for HTTP/2. I want HTTP/2

Re: [Web-SIG] WSGI2: write callable?

2014-09-27 Thread PJ Eby
On Sat, Sep 27, 2014 at 2:55 PM, PJ Eby p...@telecommunity.com wrote: On Sat, Sep 27, 2014 at 12:20 AM, Robert Collins robe...@robertcollins.net wrote: Right now, anything providing the server profile has to cope with exceptions and translate those to 500 errors, so we have the variation of

Re: [Web-SIG] WSGI2: write callable?

2014-09-27 Thread Robert Collins
I think we're uncovering important assumptions / facts here. For clarity: I'm not interested in a nice API for HTTP/2. I want HTTP/2 and its full featureset to be *possible*, *efficient* and *clear* in a protocol that can replace WSGI - and do so with a fair chance of adoption. Ditto websockets.

Re: [Web-SIG] WSGI2: write callable?

2014-09-26 Thread Benoit Chesneau
On Fri, Sep 26, 2014 at 9:58 PM, PJ Eby p...@telecommunity.com wrote: On Thu, Sep 25, 2014 at 11:32 PM, Robert Collins robe...@robertcollins.net wrote: So I propose we drop the write callable, and include a queue based implementation in the adapter for PEP- code. If you're dropping

Re: [Web-SIG] WSGI2: write callable?

2014-09-26 Thread Robert Collins
On 27 September 2014 08:21, Benoit Chesneau bchesn...@gmail.com wrote: On Fri, Sep 26, 2014 at 5:32 AM, Robert Collins robe...@robertcollins.net wrote: ... So I propose we drop the write callable, and include a queue based implementation in the adapter for PEP- code. -Rob What would

Re: [Web-SIG] WSGI2: write callable?

2014-09-26 Thread PJ Eby
On Fri, Sep 26, 2014 at 5:02 PM, Robert Collins robe...@robertcollins.net wrote: But perhaps it would be nicer to say: iterator of headers_dict_or_body_bytes With the first item yielded having to be headers (or error thrown),and the last item yielded may be a dict to emit trailers. So: def

Re: [Web-SIG] WSGI2: write callable?

2014-09-26 Thread Robert Collins
On 27 September 2014 10:31, PJ Eby p...@telecommunity.com wrote: On Fri, Sep 26, 2014 at 5:02 PM, Robert Collins robe...@robertcollins.net wrote: But perhaps it would be nicer to say: iterator of headers_dict_or_body_bytes With the first item yielded having to be headers (or error thrown),and

Re: [Web-SIG] WSGI2: write callable?

2014-09-26 Thread PJ Eby
On Fri, Sep 26, 2014 at 7:41 PM, Robert Collins robe...@robertcollins.net wrote: One thing we could do with the status code in the headers dict is to default to 200 - the vastly common case (in the same way that throwing an error generates a 500). Then status wouldn't be required at all for