Re: [python-tulip] Cross-framework coroutines

2015-01-27 Thread Ben Darnell
On Tue, Jan 27, 2015 at 11:37 AM, Guido van Rossum wrote: > Thanks for the patch. I think I understand most of it now. Have you > written and tested the Tornado conversion yet? What does it look like? > See below. > > Now let's go back to the Deferred converter you showed. The asyncio > conver

[python-tulip] Re: Call protocol.connection_lost() when the creation of transport failed?

2015-01-27 Thread Antoine Pitrou
On Tue, 27 Jan 2015 23:40:04 +0100 Victor Stinner wrote: > > I propose to call the connection_lost() method of the protocol with > the exception, even if the connection_made() method of the protocol > was not called (and will never be called). This is a breach of the API's contract. Once I propo

[python-tulip] Call protocol.connection_lost() when the creation of transport failed?

2015-01-27 Thread Victor Stinner
Hi, While working on the Python issue #23243 "asyncio: emit ResourceWarning warnings if transports/event loops are not explicitly closed" (*), I saw that SelectorEventLoop._accept_connection() currently ignores errors on the creation of a transport. (*) http://bugs.python.org/issue23243 When a s

Re: [python-tulip] Bugfixes in the ProactorEventLoop

2015-01-27 Thread Guido van Rossum
On Tue, Jan 27, 2015 at 9:09 AM, Victor Stinner wrote: > The ProactorEventLoop still lacks some features: UDP and signal handling. > https://docs.python.org/dev/library/asyncio-eventloops.html#windows > > add_reader() and add_writer() are not supported, but I'm not sure that > it's possible to im

Re: [python-tulip] Bugfixes in the ProactorEventLoop

2015-01-27 Thread Ludovic Gasc
Hi, Thank you Victor. I've a development in few weeks on Windows, I'll use that with Qt for rendering. Regards. Ludovic Gasc (GMLudo) On 27 Jan 2015 18:10, "Victor Stinner" wrote: > Hi, > > The ProactorEventLoop still lacks some features: UDP and signal handling. > https://docs.python.org/dev

Re: [python-tulip] Bugfixes in the ProactorEventLoop

2015-01-27 Thread Victor Stinner
Hi, The ProactorEventLoop still lacks some features: UDP and signal handling. https://docs.python.org/dev/library/asyncio-eventloops.html#windows add_reader() and add_writer() are not supported, but I'm not sure that it's possible to implement them. They don't fit into IOCP design (being notified

Re: [python-tulip] Cross-framework coroutines

2015-01-27 Thread Guido van Rossum
Thanks for the patch. I think I understand most of it now. Have you written and tested the Tornado conversion yet? What does it look like? Now let's go back to the Deferred converter you showed. The asyncio converter would be very similar, just calling f.set_exception() instead of f.set_exc_info()

Re: [python-tulip] Bugfixes in the ProactorEventLoop

2015-01-27 Thread Guido van Rossum
Thanks for your work Victor! I occasionally get questions about asyncio's stability on Windows. I am now much more confident. On Mon, Jan 26, 2015 at 3:38 PM, Victor Stinner wrote: > Hi, > > I spent last weeks on fixing issues specific to the Windows > ProactorEventLoop. Even if the code "was wo