bpo-47039: Normalize repr() of asyncio future and task objects (GH-31950)

This commit is contained in:
Andrew Svetlov 2022-03-17 03:03:09 +02:00 committed by GitHub
parent a7c5414832
commit 30b5d41fab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 118 deletions

View file

@ -85,11 +85,8 @@ class Future:
self._source_traceback = format_helpers.extract_stack(
sys._getframe(1))
_repr_info = base_futures._future_repr_info
def __repr__(self):
return '<{} {}>'.format(self.__class__.__name__,
' '.join(self._repr_info()))
return base_futures._future_repr(self)
def __del__(self):
if not self.__log_traceback: