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
asyncio.TaskGroup attempts to avoid refcycles in raised exceptions by deleting self._errors but when I reviewed the code it doesn't actually achieve this:
Bug report
Bug description:
asyncio.TaskGroup attempts to avoid refcycles in raised exceptions by deleting
self._errors
but when I reviewed the code it doesn't actually achieve this:see
cpython/Lib/asyncio/taskgroups.py
Lines 152 to 156 in 5e9e506
There's a refcycle in
me is me.__traceback__.tb_next.tb_frame.f_locals["me"]
I wrote a few tests to route out all the refcycles in tracebacks
in writing all these tests I noticed refcycles in PyFuture:
cpython/Lib/asyncio/futures.py
Lines 197 to 198 in 58f7763
cpython/Lib/asyncio/futures.py
Lines 215 to 216 in 58f7763
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: