[python-tulip] asyncio.wait_for and Condition

2014-11-20 Thread David Coles
Hi, I've been experimenting with asyncio in Python 3.4.2 and run into some interesting behaviour when attempting to use ayncio.wait_for with a Condition: import asyncio loop = asyncio.get_event_loop() cond = asyncio.Condition() @asyncio.coroutine def foo(): #with (yield from cond):

[python-tulip] Trollius 1.0.3

2014-11-20 Thread Victor Stinner
Hi, Almost 3 weeks after the previous release, I released a new version of Trollius because it was too annoying to work with Trollius 1.0.2. To develop the new aiogreen project, I'm using Python 2 and Trollius. The problem is that run_until_complete() and other functions looses the original

Re: [python-tulip] asyncio.wait_for and Condition

2014-11-20 Thread Guido van Rossum
Hi David, I've confirmed the issue and I agree with your diagnosis. There are two tasks, one representing foo() and one representing cond.wait(). When the timeout happens, both become runnable. Due to the way scheduling works (I haven't carefully analyzed this yet) the task representing foo() is

Re: [python-tulip] asyncio.wait_for and Condition

2014-11-20 Thread David Coles
Hi Guido, My understanding seems to be that a wait_for timeout effectively unchains the two tasks, thus making it tricky to ensure consistency. One option would be changing wait_for to always wait for the target task (cond.wait()) to complete, even on a timeout. This would at least guarantee

[python-tulip] Re: Python 3.4.2 released, release of asyncio 3.4.2?

2014-11-20 Thread Victor Stinner
Hi, The version 3.4.2 is still not released yet. Can you please allow me to push to PyPI? my login there is haypo. I can build 32 and 64 bits Windows binaries for Python 3.3. Victor Le vendredi 31 octobre 2014, Guido van Rossum gu...@python.org a écrit : I still haven't gotten to this. But at