From 2dba23af7145f3edc608dc16209e6ead38c0f6c8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 3 Jul 2014 00:59:00 +0200 Subject: asyncio: sync with Tulip * _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode, not in read mode * Examples: close the event loop at exit * More reliable CoroWrapper.__del__. If the constructor is interrupted by KeyboardInterrupt or the coroutine objet is destroyed lately, some the _source_traceback attribute doesn't exist anymore. * repr(Task): include also the future the task is waiting for --- Lib/asyncio/tasks.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Lib/asyncio/tasks.py') diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index e9adf1dfb1..dd191e770b 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -109,6 +109,9 @@ class Task(futures.Future): if self._callbacks: info.append(self._format_callbacks()) + if self._fut_waiter is not None: + info.append('wait_for=%r' % self._fut_waiter) + return '<%s %s>' % (self.__class__.__name__, ' '.join(info)) def get_stack(self, *, limit=None): -- cgit v1.2.1