On 15 October 2014 07:30, Antoine Pitrou <solip...@pitrou.net> wrote: > On Tue, 14 Oct 2014 09:47:35 -0700 > Guido van Rossum <gu...@python.org> wrote: >> >> I'm wondering if a small extension to the WSGI protocol might be sufficient >> to support this: the special environ variable "wsgi.async_input" could >> optionally be tied to a standard asyncio stream reader ( >> https://docs.python.org/3/library/asyncio-stream.html#streamreader), from >> which bytes can be read using "yield from stream.read([nbytes])" or "yield >> from stream.readline()". > > I think it would be frankly better to hook at the transport/protocol > level, and let people wrap that inside an asyncio stream if that's their > preference.
For things like mod_wsgi and uwsgi, we're not actually implementing the transport or protocol inside of Python at all - its all happening in C and often in an entirely separate process. I think it's entirely reasonable to want to write middleware/frameworks in that context using asyncio, and today there isn't a defined protocol for doing that. -Rob -- Robert Collins <rbtcoll...@hp.com> Distinguished Technologist HP Converged Cloud _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: https://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com