Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
python-trio/trio#2514 (comment)
importweakrefimporttrioimportgcasyncdeff():asyncwithtrio.open_nursery()asnursery:nursery.cancel_scope.cancel()h=weakref.ref(nursery)delnurseryawaittrio.lowlevel.checkpoint()print(h(),gc.get_referrers(h())ifh()isnotNoneelse [])trio.run(f)
(I haven't figured out how to reproduce without theimport trio)
I bisected this to1e197e6
Previously:
None []Now:
<trio.Nursery object at 0x7f3f5585d4f0> [NurseryManager(strict_exception_groups=False), <cell at 0x7f3f5585d540: Nursery object at 0x7f3f5585d4f0>, <frame at 0x7f3f55e220c0, file '/workspaces/trio/trio/_core/_run.py', line 1005, code _nested_child_finished>]I'm not certain this should be a bug, but raising because I'm confused as to the cause.
Linked PRs
- GH-100964: Break cycles involving exception state when returning from generator #107563
- GH-100964: Fix reference cycle in exhausted generator frames #141112
- [3.14] GH-100964: Fix reference cycle in exhausted generator frames (GH-141112) #142902
- [3.13] GH-100964: Fix reference cycle in exhausted generator frames (G… #142904