My mistake. I somehow didn't run it with Python 3.3 (and I'd somehow not
realized it was a 3.3-only problem -- silly me :-). I've now reproduced
your output with 3.3.

But I still believe the problem is not "real" -- e.g. if I add this after
the "fun = None" line to flush the ready queue, it works as expected:

loop.run_until_complete(asyncio.sleep(0.01))



On Thu, Feb 27, 2014 at 3:10 PM, Victor Stinner <[email protected]>wrote:

> 2014-02-27 19:25 GMT+01:00 Guido van Rossum <[email protected]>:
> > When I run the (unchanged) script under Python 3.3 or 3.4 I get this:
> >
> > deque([])
> > ERROR:asyncio:Future/Task exception was never retrieved
> > future: Future<exception=RuntimeError()>
> > Traceback (most recent call last):
> >   File "tb_bug.py", line 9, in task
> >     raise RuntimeError()
> > RuntimeError
> >
> > That looks fine to me. Is that not what you see? What would you like to
> see?
>
> Ah? Did you update Tulip repository?
>
> $ hg path
> default = https://[email protected]/p/tulip/
> $ hg id
> 94497fae0a3d tip
> $ md5sum ~/tb_bug.py
> 4b387dc5e8ce7c3627cd713161deac66  /home/haypo/tb_bug.py
> $ python3
> Python 3.3.2 (default, Nov  7 2013, 10:01:05)
> [GCC 4.8.1 20130814 (Red Hat 4.8.1-6)] on linux
> $ PYTHONPATH=$PWD python3 ~/tb_bug.py
> deque([Handle(<bound method _TracebackLogger.activate of ...
>
> The idea is that the task() future is completed before activate is
> called. Maybe my test script is not reliable.
>
> Another test: add "import gc; gc.set_debug(gc.DEBUG_UNCOLLECTABLE)" to
> test_tasks.py.
>
> Victor
>



-- 
--Guido van Rossum (python.org/~guido)

Reply via email to