cpython/Doc/c-api
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
..
abstract.rst
allocation.rst
apiabiversion.rst
arg.rst
bool.rst
buffer.rst gh-119467: Fix Py_buffer.format type and correct documentation typo (#119475) 2024-05-27 17:46:13 +05:30
bytearray.rst
bytes.rst gh-87193: Support bytes objects with refcount > 1 in _PyBytes_Resize() (GH-117160) 2024-03-25 16:32:11 +01:00
call.rst
capsule.rst
cell.rst
code.rst gh-115756: make PyCode_GetFirstFree an unstable API (GH-115781) 2024-03-19 09:20:38 +00:00
codec.rst
complex.rst
concrete.rst
contextvars.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
conversion.rst Document PyOS_strtoul and PyOS_strtol (GH-114048) 2024-01-26 19:44:45 +02:00
coro.rst
datetime.rst
descriptor.rst
dict.rst gh-112066: Fix versionadded in PyDict_SetDefaultRef docs (#118696) 2024-05-17 12:10:21 -04:00
exceptions.rst Fix typo in Doc/c-api/exceptions.rst (GH-118371) 2024-04-29 14:02:54 +03:00
file.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
float.rst
frame.rst gh-74929: PEP 667 general docs update (gh-119201) 2024-05-21 03:32:15 +00:00
function.rst
gcsupport.rst gh-101100: Fix sphinx warnings in c-api/gcsupport.rst (#114786) 2024-02-10 15:59:23 -07:00
gen.rst
hash.rst gh-111389: Add PyHASH_MULTIPLIER constant (#119214) 2024-05-21 19:51:51 +02:00
import.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
index.rst gh-111997: C-API for signalling monitoring events (#116413) 2024-05-04 08:23:50 +00:00
init.rst gh-93502: Add new C-API functions to trace object creation and destruction (#115945) 2024-05-02 19:30:00 +02:00
init_config.rst gh-118518: Rename PYTHONPERFJITSUPPORT and -X perfjit with underscores (#118693) 2024-05-07 11:47:21 +00:00
intro.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
iter.rst
iterator.rst
list.rst gh-114329: Add PyList_GetItemRef function (GH-114504) 2024-02-02 14:03:15 +01:00
long.rst gh-116560: Add PyLong_GetSign() public function (#116561) 2024-06-03 14:06:31 +02:00
mapping.rst
marshal.rst
memory.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
memoryview.rst gh-101100: Fix sphinx warnings in Doc/c-api/memoryview.rst (GH-114669) 2024-01-29 11:56:11 +02:00
method.rst
module.rst Docs: Add central references to free-threading-related options (#119017) 2024-05-21 17:49:23 -04:00
monitoring.rst gh-119968: Improved monitoring c-api docs (#119969) 2024-06-03 12:31:02 +03:00
none.rst
number.rst
object.rst Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
objimpl.rst
perfmaps.rst
refcounting.rst gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298) 2024-03-07 10:05:03 +02:00
reflection.rst gh-118934: Fix PyEval_GetLocals docs (PEP 667) (#119932) 2024-06-02 04:44:29 +00:00
sequence.rst
set.rst
slice.rst
stable.rst
structures.rst Fix the PyGetSetDef documentation (GH-116056) 2024-03-05 17:48:20 +02:00
sys.rst gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (GH-114825) 2024-02-11 18:51:07 +00:00
time.rst gh-110850: Add PyTime_TimeRaw() function (#118394) 2024-05-01 18:05:01 +00:00
tuple.rst GH-117283: Add doc warning for PyTuple_SetItem refcount > 1 (#117916) 2024-05-27 17:50:28 +05:30
type.rst gh-111696, PEP 737: Add PyType_GetModuleName() function (#116824) 2024-03-14 18:17:43 +00:00
typehints.rst
typeobj.rst Fix typo in Doc/c-api/typeobj.rst (GH-118377) 2024-04-29 10:59:38 +00:00
unicode.rst gh-119182: Add PyUnicodeWriter C API (#119184) 2024-06-17 17:10:52 +02:00
utilities.rst gh-110850: Add PyTime_t C API (GH-115215) 2024-02-12 18:13:10 +01:00
veryhigh.rst gh-115172: Fix explicit index extries for the C API (GH-115173) 2024-02-11 12:23:30 +02:00
weakref.rst gh-118789: Add PyUnstable_Object_ClearWeakRefsNoCallbacks (#118807) 2024-06-18 09:57:23 -04:00