[Web-SIG] WSGI and start_response
pje at telecommunity.com
Thu Apr 8 16:53:35 CEST 2010
At 04:08 PM 4/8/2010 +0200, Manlio Perillo wrote:
>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):
>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
I don't understand why it's a problem. See my previous post here:
for a sketch of a WSGI 1-to-2 converter. It takes a WSGI 1
application callable as the input, and returns a WSGI 2 function.
More information about the Web-SIG