summaryrefslogtreecommitdiff
path: root/Lib/_collections_abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r--Lib/_collections_abc.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index ba6a9b8e90..f89bb6f04b 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -81,22 +81,7 @@ class Hashable(metaclass=ABCMeta):
return NotImplemented
-class _AwaitableMeta(ABCMeta):
-
- def __instancecheck__(cls, instance):
- # This hook is needed because we can't add
- # '__await__' method to generator objects, and
- # we can't register GeneratorType on Awaitable.
- # NB: 0x100 = CO_ITERABLE_COROUTINE
- # (We don't want to import 'inspect' module, as
- # a dependency for 'collections.abc')
- if (instance.__class__ is generator and
- instance.gi_code.co_flags & 0x100):
- return True
- return super().__instancecheck__(instance)
-
-
-class Awaitable(metaclass=_AwaitableMeta):
+class Awaitable(metaclass=ABCMeta):
__slots__ = ()