]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-125900: Clean-up logic around immortalization in free-threading (#125901)
authorSam Gross <colesbury@gmail.com>
Thu, 24 Oct 2024 22:09:59 +0000 (18:09 -0400)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2024 22:09:59 +0000 (18:09 -0400)
commit332356b880576a1a00b5dc34f03d7d3995dd4512
tree1f29a5ca46bb083c99e9d623f2da14a0f523014c
parent1306f33c84b2745aa8af5e3e8f680aa80b836c0e
gh-125900: Clean-up logic around immortalization in free-threading (#125901)

* Remove `@suppress_immortalization` decorator
* Make suppression flag per-thread instead of per-interpreter
* Suppress immortalization in `eval()` to avoid refleaks in three tests
  (test_datetime.test_roundtrip, test_logging.test_config8_ok, and
   test_random.test_after_fork).
* frozenset() is constant, but not a singleton. When run multiple times,
  the test could fail due to constant interning.
23 files changed:
Include/internal/pycore_gc.h
Include/internal/pycore_tstate.h
Lib/test/libregrtest/main.py
Lib/test/libregrtest/single.py
Lib/test/seq_tests.py
Lib/test/support/__init__.py
Lib/test/test_ast/test_ast.py
Lib/test/test_capi/test_misc.py
Lib/test/test_capi/test_watchers.py
Lib/test/test_code.py
Lib/test/test_descr.py
Lib/test/test_functools.py
Lib/test/test_gc.py
Lib/test/test_inspect/test_inspect.py
Lib/test/test_module/__init__.py
Lib/test/test_ordered_dict.py
Lib/test/test_struct.py
Lib/test/test_trace.py
Lib/test/test_weakref.py
Lib/test/test_zoneinfo/test_zoneinfo.py
Modules/_testinternalcapi.c
Objects/codeobject.c
Python/bltinmodule.c