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
asyncio: initial exception traceback frames are lost for Future.result() #154791
Since gh-90082 (PR #30274), the C implementation of Future stores it's exception and traceback separately. However, Future.result() clears the traceback after first call, which means the initial traceback frames are lost on subsequent awaits or result() calls. Pure-python Future implementation is unaffected.
Traceback (most recent call last):
...
File "<python-input-0>", line 9, in main
await task
ZeroDivisionError
_PyFuture traceback (expected):
Traceback (most recent call last):
...
File "<python-input-7>", line 9, in main
await task
...
File "<python-input-7>", line 3, in fail
1 / 0
ZeroDivisionError
changed the title [-]asyncio: inital exception traceback frames are lost for Future.result()[/-][+]asyncio: initial exception traceback frames are lost for Future.result()[/+]on Jul 27, 2026
Activity
[-]asyncio: inital exception traceback frames are lost for Future.result()[/-][+]asyncio: initial exception traceback frames are lost for Future.result()[/+]pythongh-154791: Fix asyncio Future losing traceback on repeated resu…
gh-154791: Fix asyncio.Future losing traceback on repeated result() c…
pythongh-154791: Fix asyncio.Future losing traceback on repeated resu…