Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Reported and commit identified by@alicederyn inpython/typeshed#9586
Regression caused by#31973. Doesn't contain a news entry, so probably not intentional.
λ cat xxx.pyimport asyncioasync def f(): await asyncio.sleep(0)async def g(): await asyncio.gather(f(), f())h = g()h.send(None)print(type(h))h.throw(ValueError("some error"), None, None)λ python3.10 xxx.py/Users/shantanu/dev/cpython/xxx.py:5: DeprecationWarning: There is no current event loop await asyncio.gather(f(), f())<class 'coroutine'>Traceback (most recent call last): File "/Users/shantanu/dev/cpython/xxx.py", line 10, in <module> h.throw(ValueError("some error"), None, None) File "/Users/shantanu/dev/cpython/xxx.py", line 5, in g await asyncio.gather(f(), f())ValueError: some errorλ python3.11 xxx.py/Users/shantanu/dev/cpython/xxx.py:5: DeprecationWarning: There is no current event loop await asyncio.gather(f(), f())<class 'coroutine'>Traceback (most recent call last): File "/Users/shantanu/dev/cpython/xxx.py", line 10, in <module> h.throw(ValueError("some error"), None, None) File "/Users/shantanu/dev/cpython/xxx.py", line 5, in g await asyncio.gather(f(), f())TypeError: throw() third argument must be a traceback