From 94ba146d11869288ab3def8c7426b3b36701416a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 27 Apr 2014 10:44:22 -0700 Subject: asyncio: Add __weakref__ slots to Handle and CoroWrapper. Upstream issue #166. --- Lib/asyncio/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/asyncio/tasks.py') diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index e8ee947501d..45a6342eea4 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -36,7 +36,7 @@ _DEBUG = (not sys.flags.ignore_environment class CoroWrapper: # Wrapper for coroutine in _DEBUG mode. - __slots__ = ['gen', 'func', '__name__', '__doc__'] + __slots__ = ['gen', 'func', '__name__', '__doc__', '__weakref__'] def __init__(self, gen, func): assert inspect.isgenerator(gen), gen -- cgit v1.2.3