]> granicus.if.org Git - python/commit
asyncio: repr(Task) now also contains the line number even if the coroutine is
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 24 Jun 2014 20:57:14 +0000 (22:57 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 24 Jun 2014 20:57:14 +0000 (22:57 +0200)
commitdf29c4a83d13d96cfcf809e648ee9b31a4174729
treeb6ace06d471e23e2aabaf352fde32f8ed02241f0
parent14199f939278d67804cf44ef0b9d32f998c62d58
asyncio: repr(Task) now also contains the line number even if the coroutine is
done: use the first line number of the code object instead of the current line
number of the generator frame.

The name of the coroutine is not enough because many coroutines may have the
same name. It's a common case in asyncio tests for example.
Lib/asyncio/tasks.py
Lib/test/test_asyncio/test_tasks.py