cpython/Lib/test/test_capi
Sam Gross e8752d7b80
gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (#118807)
This exposes `PyUnstable_Object_ClearWeakRefsNoCallbacks` as an unstable
C-API function to provide a thread-safe mechanism for clearing weakrefs
without executing callbacks.

Some C-API extensions need to clear weakrefs without calling callbacks,
such as after running finalizers like we do in subtype_dealloc.
Previously they could use `_PyWeakref_ClearRef` on each weakref, but
that's not thread-safe in the free-threaded build.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-06-18 09:57:23 -04:00
..
__init__.py
__main__.py
check_config.py
test_abstract.py
test_bytearray.py
test_bytes.py
test_codecs.py
test_complex.py
test_dict.py
test_eval_code_ex.py
test_exceptions.py
test_float.py
test_getargs.py
test_hash.py
test_immortal.py
test_list.py gh-120417: Remove unused imports in tests (part 1) (#120629) 2024-06-17 21:05:56 +02:00
test_long.py gh-116560: Add PyLong_GetSign() public function (#116561) 2024-06-03 14:06:31 +02:00
test_mem.py
test_misc.py gh-120417: Remove unused imports in tests (part 1) (#120629) 2024-06-17 21:05:56 +02:00
test_object.py gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` (#118807) 2024-06-18 09:57:23 -04:00
test_opt.py GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624) 2024-06-17 14:40:11 +01:00
test_pyatomic.py
test_run.py
test_set.py
test_structmembers.py gh-120417: Remove unused imports in tests (part 1) (#120629) 2024-06-17 21:05:56 +02:00
test_sys.py
test_time.py
test_unicode.py
test_watchers.py gh-119258: Eliminate Type Guards in Tier 2 Optimizer with Watcher (GH-119365) 2024-06-08 17:41:45 +08:00