diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-01-22 12:52:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 12:52:24 (GMT) |
commit | 6ed874f8c59cc6c01d9663bad2f4bed8dc1c6109 (patch) | |
tree | f54b8e3eb6d733f4d8d6d956e8b5a98c796e8620 /Lib/asyncio/futures.py | |
parent | 3c4a3745b900e748f99e80fc3728b534e857d1ff (diff) | |
download | cpython-6ed874f8c59cc6c01d9663bad2f4bed8dc1c6109.zip cpython-6ed874f8c59cc6c01d9663bad2f4bed8dc1c6109.tar.gz cpython-6ed874f8c59cc6c01d9663bad2f4bed8dc1c6109.tar.bz2 |
[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (GH-30785)
Automerge-Triggered-By: GH:asvetlov
Diffstat (limited to 'Lib/asyncio/futures.py')
-rw-r--r-- | Lib/asyncio/futures.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index bed4da5..aaab09c 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -8,6 +8,7 @@ import concurrent.futures import contextvars import logging import sys +from types import GenericAlias from . import base_futures from . import events @@ -106,8 +107,7 @@ class Future: context['source_traceback'] = self._source_traceback self._loop.call_exception_handler(context) - def __class_getitem__(cls, type): - return cls + __class_getitem__ = classmethod(GenericAlias) @property def _log_traceback(self): |