bpo-31709: Drop support for asynchronous __aiter__. (#3903)

This commit is contained in:
Yury Selivanov 2017-10-06 02:08:57 -04:00 committed by GitHub
parent 86566702f3
commit faa135acbf
9 changed files with 47 additions and 300 deletions

View file

@ -660,7 +660,7 @@ class TestOneTrickPonyABCs(ABCTestCase):
def test_AsyncIterable(self):
class AI:
async def __aiter__(self):
def __aiter__(self):
return self
self.assertTrue(isinstance(AI(), AsyncIterable))
self.assertTrue(issubclass(AI, AsyncIterable))
@ -674,7 +674,7 @@ class TestOneTrickPonyABCs(ABCTestCase):
def test_AsyncIterator(self):
class AI:
async def __aiter__(self):
def __aiter__(self):
return self
async def __anext__(self):
raise StopAsyncIteration