Hi,

I found some bugs with _TracebackLogger when loop.run_until_complete() is used:
http://code.google.com/p/tulip/issues/detail?id=155

Try attached script to reproduce the issue with Tulip and Python 3.3.
You should get:
---
deque([Handle(<bound method _TracebackLogger.activate of...>, ())])
...
    [<asyncio.futures._TracebackLogger object at 0x7facadefb3f8>]

---

The activate() method of the _TracebackLogger is never executed, the
_TracebackLogger is part of a reference cycle and cannot be collected
by the garbage collector, and the unhandled exception is not logged.

If you uncommend "fut = None" in task(), you get:
---
deque([Handle(<bound method _TracebackLogger.activate of
<asyncio.futures._TracebackLogger object at 0x7f9a98f8b3f8>>, ())])
---

The _TracebackLogger is collected, but the unhandled exception is
still not logged.

In Python 3.4, it's better thanks to the PEP 442:
http://legacy.python.org/dev/peps/pep-0442/

In Python 3.3, the problem is that _TracebackLogger contains an
exception which contains a traceback.

For Trollius, it's also different because exception has no
__traceback__ attribute, and so the formatting of the traceback cannot
be deferred.

So well, please take a look at my issue:
http://code.google.com/p/tulip/issues/detail?id=155

Victor

Reply via email to