diff options
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/events.py | 2 | ||||
-rw-r--r-- | Lib/asyncio/tasks.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index 57af68a..31592d1 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -16,7 +16,7 @@ import socket class Handle: """Object returned by callback registration methods.""" - __slots__ = ['_callback', '_args', '_cancelled', '_loop'] + __slots__ = ['_callback', '_args', '_cancelled', '_loop', '__weakref__'] def __init__(self, callback, args, loop): assert not isinstance(callback, Handle), 'A Handle is not a callback' diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index e8ee947..45a6342 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 |