[3.13] GH-135171: Roll back all fixes for GH-127682 as they are not suitable for 3.13 (#135390)

This commit is contained in:
T. Wouters 2025-06-11 16:57:35 +02:00 committed by GitHub
parent 5f5b173cc7
commit 6ae51582a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 30 additions and 72 deletions

View file

@ -2252,31 +2252,6 @@ def c():
# before fixing, visible stack from throw would be shorter than from send.
self.assertEqual(len_send, len_throw)
def test_call_aiter_once_in_comprehension(self):
class Iterator:
def __init__(self):
self.val = 0
async def __anext__(self):
if self.val == 2:
raise StopAsyncIteration
self.val += 1
return self.val
# No __aiter__ method
class C:
def __aiter__(self):
return Iterator()
async def run():
return [i async for i in C()]
self.assertEqual(run_async(run()), ([], [1,2]))
@unittest.skipIf(
support.is_emscripten or support.is_wasi,