You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression in Python 3.11 when explicitly passing None to FutureIter.throw #101326
Regression caused by #31973. Doesn't contain a news entry, so probably not intentional.
λ cat xxx.py
import asyncio
async 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
Activity
hauntsaninja commentedon Jan 25, 2023
cc @asvetlov @kumaraditya303
pythongh-101326: Fix regression when passing None to FutureIter.throw
gh-101326: Fix regression when passing None to FutureIter.throw (#101327
[3.11] pythongh-101326: Fix regression when passing None to FutureIte…
[3.11] gh-101326: Fix regression when passing None to FutureIter.throw (
hauntsaninja commentedon Jan 25, 2023
Thanks @alicederyn!
pythongh-101326: Fix regression when passing None to FutureIter.throw (…
alicederyn commentedon Jan 26, 2023
Thanks @hauntsaninja! Amazing turnaround!
pythongh-101326: Fix regression when passing None to FutureIter.throw (…
[CI] Use Python 3.11.11 in 32-bit test job (#22301)