summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi/object.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` ↵Miss Islington (bot)2024-06-181-0/+8
| | | | | | | | | | | | | | | | | (GH-118807) (#120695) 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. (cherry picked from commit e8752d7b80775ec2a348cd4bf38cbe26a4a07615) Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-94808: Fix refcounting in PyObject_Print tests (GH-117421)Petr Viktorin2024-04-011-0/+4
|
* gh-94808:Improve coverage of PyObject_Print (GH-98749)MonadChains2024-04-011-0/+133