aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/futures.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-04 23:00:13 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-12-04 23:00:13 +0100
commitfe22e0985adae5ccfe230c815267fd410de59148 (patch)
tree004adb7fc3a3223faaabbf0f7e217aa7fd53bf86 /Lib/asyncio/futures.py
parentbb37b4ca7341bc1f09996c4c7a1d59b32d80c5a6 (diff)
downloadcpython-fe22e0985adae5ccfe230c815267fd410de59148.tar.gz
cpython-fe22e0985adae5ccfe230c815267fd410de59148.zip
asyncio: Initialize more Future and Task attributes in the class definition to
avoid attribute errors in destructors.
Diffstat (limited to 'Lib/asyncio/futures.py')
-rw-r--r--Lib/asyncio/futures.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
index 19e79189dc2..f46d008f08a 100644
--- a/Lib/asyncio/futures.py
+++ b/Lib/asyncio/futures.py
@@ -135,6 +135,7 @@ class Future:
_result = None
_exception = None
_loop = None
+ _source_traceback = None
_blocking = False # proper use of future (yield vs yield from)
@@ -155,8 +156,6 @@ class Future:
self._callbacks = []
if self._loop.get_debug():
self._source_traceback = traceback.extract_stack(sys._getframe(1))
- else:
- self._source_traceback = None
def _format_callbacks(self):
cb = self._callbacks