Re: WSGI2: write callable?
Benoit Chesneau <[email protected]> Fri, 26 Sep 2014 22:21:57 +0200
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <CAJNb-9r3PqS0a51YSVYO=VVTASoFGit44Hujn1sn9sP3PaMejQ@mail.gmail.com> |
On Fri, Sep 26, 2014 at 5:32 AM, Robert Collins <[email protected]> wrote: > Is the write callable still needed? Its documented as a undesirable > thunk in PEP-3333; is there a good reason to keep it, or can we make > start_response return None and require the use of a generator to > supply content for the body? > > (Remembering that for backwards compatibility we're going to write an > adapter, and a generator adapter is straightforward (if tedious) using > a threading.Queue). > > I haven't done a survey, but I don't recall seeing anything except > bespoke WSGI code that used the write interface - all the frameworks > I've seen in some time use the iterator protocol. > > So I propose we drop the write callable, and include a queue based > implementation in the adapter for PEP-3333 code. > > -Rob > > What would be the advantage of using a queue compared to simply write to the server? Internally the server can use queue, but why the client should know it? What is the reasoning behind it? - benoit > -- > Robert Collins <[email protected]> > Distinguished Technologist > HP Converged Cloud > _______________________________________________ > Web-SIG mailing list > [email protected] > Web SIG: http://www.python.org/sigs/web-sig > Unsubscribe: > https://mail.python.org/mailman/options/web-sig/bchesneau%40gmail.com > _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: https://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org