mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-126699: allow AsyncIterator to be used as a base for Protocols (#126702)
This commit is contained in:
parent
0052a8c638
commit
feb3e0b19c
3 changed files with 6 additions and 1 deletions
|
@ -4255,6 +4255,9 @@ class ProtocolTests(BaseTestCase):
|
|||
class CustomContextManager(typing.ContextManager, Protocol):
|
||||
pass
|
||||
|
||||
class CustomAsyncIterator(typing.AsyncIterator, Protocol):
|
||||
pass
|
||||
|
||||
def test_non_runtime_protocol_isinstance_check(self):
|
||||
class P(Protocol):
|
||||
x: int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue