gh-126699: allow AsyncIterator to be used as a base for Protocols (#126702)

This commit is contained in:
Stephen Morton 2024-11-12 01:17:07 -08:00 committed by GitHub
parent 0052a8c638
commit feb3e0b19c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View file

@ -1940,7 +1940,8 @@ def _allow_reckless_class_checks(depth=2):
_PROTO_ALLOWLIST = {
'collections.abc': [
'Callable', 'Awaitable', 'Iterable', 'Iterator', 'AsyncIterable',
'Hashable', 'Sized', 'Container', 'Collection', 'Reversible', 'Buffer',
'AsyncIterator', 'Hashable', 'Sized', 'Container', 'Collection',
'Reversible', 'Buffer',
],
'contextlib': ['AbstractContextManager', 'AbstractAsyncContextManager'],
}