Skip to content

Commit f54e405

Browse files
miss-islingtonvstinner
authored andcommitted
asyncio: Remove unused Future._tb_logger attribute (GH-4596) (#4598)
It was only used on Python 3.3, now only Future._log_traceback is used. (cherry picked from commit c16bace)
1 parent d5c71b0 commit f54e405

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Lib/asyncio/futures.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ class Future:
143143
# `yield Future()` (incorrect).
144144
_asyncio_future_blocking = False
145145

146-
_log_traceback = False # Used for Python 3.4 and later
147-
_tb_logger = None # Used for Python 3.3 only
146+
_log_traceback = False
148147

149148
def __init__(self, *, loop=None):
150149
"""Initialize the future.
@@ -240,9 +239,6 @@ def result(self):
240239
if self._state != _FINISHED:
241240
raise InvalidStateError('Result is not ready.')
242241
self._log_traceback = False
243-
if self._tb_logger is not None:
244-
self._tb_logger.clear()
245-
self._tb_logger = None
246242
if self._exception is not None:
247243
raise self._exception
248244
return self._result
@@ -260,9 +256,6 @@ def exception(self):
260256
if self._state != _FINISHED:
261257
raise InvalidStateError('Exception is not set.')
262258
self._log_traceback = False
263-
if self._tb_logger is not None:
264-
self._tb_logger.clear()
265-
self._tb_logger = None
266259
return self._exception
267260

268261
def add_done_callback(self, fn):

0 commit comments

Comments
 (0)