someone remind me: where is the canonical WSGI 2 spec? I assume there is a way to "wrap" WSGI 1 applications without breaking them? Or is this the regex-->re fiasco all over again?
-- Aaron Watters --- On Thu, 4/8/10, Manlio Perillo <manlio_peri...@libero.it> wrote: > From: Manlio Perillo <manlio_peri...@libero.it> > Subject: [Web-SIG] WSGI and start_response > To: "'Web SIG'" <web-sig@python.org> > Date: Thursday, April 8, 2010, 10:08 AM > Hi. > > Some time ago I objected the decision to remove > start_response function > from next version WSGI, using as rationale the fact that > without > start_callable, asynchronous extension are impossible to > support. > > Now I have found that removing start_response will also > make impossible > to support coroutines (or, at least, some coroutines > usage). > > Here is an example (this is the same example I posted few > days ago): > http://paste.pocoo.org/show/199202/ > > Forgetting about the write callable, the problem is that > the application > starts to yield data when tmpl.render_unicode function is > called. > > Please note that this has *nothing* to do with asynchronus > applications. > The code should work with *all* WSGI implementations. > > > In the pasted example, the Mako render_unicode function is > "turned" into > a generator, with a simple function that allows to flush > the current buffer. > > > Can someone else confirm that this code is impossible to > support in WSGI > 2.0? > > If my suspect is true, I once again object against removing > start_response. > > WSGI 1.0 is really a well designed protocol, since it is > able to support > both asynchonous application (with a custom extension) and > coroutines, > *even* if this was not considered during protocol design. > > > ThanksĀ Manlio > _______________________________________________ > 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/arw1961%40yahoo.com > _______________________________________________ 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/archive%40mail-archive.com