Re: [Tutor] asyncio and wsgiref problem

2017-11-09 Thread Etienne Robillard
OK i figured that wsgiref (PEP-) is currently incompatible with asyncio. I'm not sure about the motivations of this incompatibility. Would it be so hard to make a "wsgiref.asyncio_server" extension for people wanting to use wsgiref for development without having to use a third-party extensi

Re: [Tutor] asyncio and wsgiref problem

2017-11-08 Thread Etienne Robillard
This code is compatible with PEP- on Python 3.5.3: @asyncio.coroutine def app(environ, start_response): try: result = (yield from AsyncIOController().application(environ, start_response)) except: raise else: #XXX result is a generator. this should not be

[Tutor] asyncio and wsgiref problem

2017-11-08 Thread Etienne Robillard
Hi, I'm trying to implement the asyncio.coroutine decorator in my wsgi app. Here's my server code: class AsyncIOController(WSGIController): def __init__(self, settings=None, executor=None, loop=None ): super(AsyncIOController, self).__init__(settings) # asyncio confi