cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Clean-up use of `@suppress_immortalization`

Open colesbury opened this issue 1 year ago • 0 comments

As a temporary measure, we immortalized a number of objects in the 3.13 free threading build. To work around refleak test failures, we added a @test.support.suppress_immortalization() decorator that suppressed the behavior.

  • https://github.com/python/cpython/issues/117783

Now that we have deferred reference counting, that behavior is mostly gone and we can get rid of the decorator. We still want to suppress immortalization of code constants in a few places (like compile()), but that logic can be simpler and doesn't have to be exposed to Python.

Linked PRs

  • gh-125901

colesbury avatar Oct 23 '24 21:10 colesbury