[Web-SIG] PEP 444 / WSGI 2 Async

Alice Bevan–McGregor alice at gothcandy.com
Fri Jan 7 21:29:56 CET 2011


On 2011-01-07 09:04:07 -0800, Antoine Pitrou said:
> Alice Bevan–McGregor <alice at ...> writes:
>>> I don't understand why you want a "yield" at this level. IMHO, WSGI 
>>> needn't involve generators. A higher-level wrapper (framework, 
>>> middleware, whatever) can wrap fd-waiting in fancy generator stuff if 
>>> so desired. Or, in some other environments, delegate it to a reactor 
>>> with callbacks and deferreds. Or whatever else, such as futures.
>> 
>> WSGI already involves generators: the response body.
> 
> Wrong.

I'm aware that it can be any form of iterable, from a list-wrapped 
string all the way up to generators or other nifty things.  I 
mistakenly omitted these assuming that the other iterables were 
universally understood and implied.

However, using a generator is a known, vlaid use case that I do see in 
the wild.  (And also rely upon in some of my own applications.)

> Right, that's why I was suggesting you drop your concern for Python 2 
> compatibility.

-1

There is practically no reason for doing so; esp. considering that I've 
managed to write a 2k/3k polygot server that is more performant out of 
the box than any other WSGI HTTP server I've come across and is far 
simpler in implementation than most of the ones I've come across with 
roughly equivelant feature sets.

Cross compatibility really isn't that hard, and arguing that 2.x 
support should be dropped for the sole reason that "it might be dead by 
the time this is ratified" is a bit off.

Python 2.x will be around for a long time.

	- Alice.




More information about the Web-SIG mailing list