-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refcycles in exceptions raised from asyncio.TaskGroup #124958
Labels
Comments
graingert
added a commit
to graingert/cpython
that referenced
this issue
Oct 4, 2024
1st1
pushed a commit
that referenced
this issue
Oct 14, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 14, 2024
…nGH-124959) (cherry picked from commit d5dbbf4) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This was referenced Oct 14, 2024
1st1
pushed a commit
that referenced
this issue
Oct 14, 2024
Eclips4
added a commit
to Eclips4/cpython
that referenced
this issue
Oct 14, 2024
python#124959)" This reverts commit d5dbbf4.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 14, 2024
…PyFuture refcycles (pythonGH-12… (pythonGH-125476) Revert "pythongh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (pythonGH-124959)" This reverts commit d5dbbf4. (cherry picked from commit e99650b) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
graingert
added a commit
to graingert/cpython
that referenced
this issue
Oct 14, 2024
…up and _PyFuture refcycles (#12… (python#125476)" This reverts commit e99650b.
1st1
pushed a commit
that referenced
this issue
Oct 17, 2024
This is merged and backported now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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: