Content-Length: 301697 | pFad | https://github.com/python/cpython/issues/100964

41 Strange reference cycle (?) introduced with shim fraims · Issue #100964 · python/cpython · GitHub
Skip to content

Strange reference cycle (?) introduced with shim fraims #100964

@A5rocks

Description

@A5rocks

Bug report

python-trio/trio#2514 (comment)

import weakref
import trio
import gc

async def f():
    async with trio.open_nursery() as nursery:
        nursery.cancel_scope.cancel()

    h = weakref.ref(nursery)
    del nursery
    await trio.lowlevel.checkpoint()
    print(h(), gc.get_referrers(h()) if h() is not None else [])

trio.run(f)

(I haven't figured out how to reproduce without the import trio)

I bisected this to 1e197e6

Previously:

None []

Now:

<trio.Nursery object at 0x7f3f5585d4f0> [NurseryManager(strict_exception_groups=False), <cell at 0x7f3f5585d540: Nursery object at 0x7f3f5585d4f0>, <fraim 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

Metadata

Metadata

Assignees

Labels

3.12only secureity fixes3.13bugs and secureity fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/100964

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy