cpython/Include/cpython
Petr Viktorin 8923ca418c
gh-145921: Add "_DuringGC" functions for tp_traverse (GH-145925)
There are newly documented restrictions on tp_traverse:

    The traversal function must not have any side effects.
    It must not modify the reference counts of any Python
    objects nor create or destroy any Python objects.

* Add several functions that are guaranteed side-effect-free,
  with a _DuringGC suffix.
* Use these in ctypes
* Consolidate tp_traverse docs in gcsupport.rst, moving unique
  content from typeobj.rst there

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-08 09:15:11 +02:00
..
abstract.h gh-142217: Deprecate the private _Py_Identifier C API (#142221) 2025-12-12 14:10:25 +01:00
audit.h gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921) 2025-06-26 13:05:01 +02:00
bytearrayobject.h gh-139871: Add bytearray.take_bytes([n]) to efficiently extract bytes (GH-140128) 2025-11-13 13:19:44 +00:00
bytesobject.h gh-129813, PEP 782: Add PyBytesWriter_Format() (#138824) 2025-09-12 14:21:57 +02:00
cellobject.h gh-127271: Replace use of PyCell_GET/SET (gh-127272) 2024-12-03 10:33:06 -08:00
ceval.h gh-144569: Avoid creating temporary objects in BINARY_SLICE for list, tuple, and unicode (GH-144590) 2026-03-02 17:02:38 +00:00
classobject.h
code.h gh-70030: Remove _PyCode_ConstantKey() function (#139735) 2025-10-08 22:33:45 +02:00
compile.h gh-117411: move PyFutureFeatures to pycore_symtable.h and make it private (#117412) 2024-04-02 10:34:49 +00:00
complexobject.h gh-128813: soft-deprecate _Py_c_*() functions (GH-137261) 2025-08-01 09:40:12 +02:00
context.h gh-124872: Replace enter/exit events with "switched" (#125532) 2024-10-16 13:53:21 +02:00
critical_section.h gh-133296: Publicly expose critical section API that accepts PyMutex (gh-135899) 2025-07-21 17:25:43 -04:00
descrobject.h
dictobject.h gh-141510, PEP 814: Add built-in frozendict type (#144757) 2026-02-17 10:54:41 +01:00
fileobject.h
fileutils.h gh-128863: Deprecate private C API functions (#128864) 2025-01-22 11:04:19 +00:00
floatobject.h
frameobject.h gh-74929: Implement PEP 667 (GH-115153) 2024-05-04 12:12:10 +01:00
funcobject.h gh-139924: Add PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event for function watchers (#139925) 2025-10-10 15:25:38 -07:00
genobject.h gh-120834: fix type of *_iframe field in _PyGenObject_HEAD declaration (#120835) 2024-06-24 10:23:38 +01:00
import.h gh-116146: Add C-API to create module from spec and initfunc (GH-139196) 2025-11-14 10:43:25 +01:00
initconfig.h gh-142349: Implement PEP 810 - Explicit lazy imports (#142351) 2026-02-12 00:15:33 +00:00
listobject.h
longintrepr.h gh-147988: Initialize digits in long_alloc() in debug mode (#147989) 2026-04-02 11:55:34 +00:00
longobject.h gh-132639: Adds PyLong_AsNativeBytes, PyLong_FromNativeBytes and PyLong_FromUnsignedNativeBytes to the limited API (GH-132640) 2025-04-21 15:59:03 +01:00
marshal.h gh-141510: Change marshal version to 6 (#145551) 2026-03-06 10:23:11 +01:00
memoryobject.h
methodobject.h
modsupport.h gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770) 2026-03-24 17:47:55 +00:00
monitoring.h gh-79315: Remove Include/pylock.h and Include/monitoring.h (#139731) 2025-10-08 00:49:24 +02:00
object.h gh-145921: Add "_DuringGC" functions for tp_traverse (GH-145925) 2026-04-08 09:15:11 +02:00
objimpl.h
odictobject.h
picklebufobject.h
pthread_stubs.h
pyatomic.h gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229) 2026-03-20 15:38:35 -04:00
pyatomic_gcc.h gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229) 2026-03-20 15:38:35 -04:00
pyatomic_msc.h gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229) 2026-03-20 15:38:35 -04:00
pyatomic_std.h gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229) 2026-03-20 15:38:35 -04:00
pyctype.h
pydebug.h
pyerrors.h gh-141732: Fix ExceptionGroup repr changing when original exception sequence is mutated (#141736) 2025-12-07 21:04:04 +00:00
pyfpe.h
pyframe.h Fix typos in comments (#120188) 2024-06-07 10:19:41 +02:00
pyhash.h gh-111389: replace deprecated occurrences of _PyHASH_* macros (#141236) 2025-11-09 15:14:08 +01:00
pylifecycle.h gh-142417: Restore private _Py_InitializeMain() function (#145472) 2026-03-04 11:00:08 +01:00
pylock.h gh-79315: Remove Include/pylock.h and Include/monitoring.h (#139731) 2025-10-08 00:49:24 +02:00
pymem.h
pystate.h gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (#145789) 2026-03-11 15:46:16 +01:00
pystats.h gh-146073: Revert "gh-146073: Add fitness/exit quality mechanism for JIT trace frontend (GH-147966)" (#148082) 2026-04-04 11:56:40 +00:00
pythonrun.h
pythread.h gh-129296: Fix pyatomic.h include paths (#129320) 2025-01-29 15:06:19 +00:00
pytime.h gh-110850: Add PyTime_TimeRaw() function (#118394) 2024-05-01 18:05:01 +00:00
setobject.h gh-112069: Make PySet_GET_SIZE to be atomic safe. (gh-118053) 2024-04-19 06:40:28 +09:00
sliceobject.h gh-79315: Add Include/cpython/sliceobject.h header (#139729) 2025-10-08 00:48:18 +02:00
structseq.h gh-79315: Add Include/cpython/structseq.h header (#139730) 2025-10-08 01:19:50 +02:00
traceback.h
tracemalloc.h Add extern "C" around PyTraceMalloc_ functions. (#127772) 2024-12-11 10:27:07 +01:00
tupleobject.h gh-111489: Add PyTuple_FromArray() function (#139691) 2025-10-10 08:54:12 +02:00
unicodeobject.h gh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144) 2026-03-19 08:23:01 +00:00
warnings.h gh-139640: Fix swallowing syntax warnings in different modules (GH-139755) 2025-10-14 17:48:09 +03:00
weakrefobject.h gh-133644: remove PyWeakref_GetObject and PyWeakref_GET_OBJECT (GH-133657) 2025-09-24 11:25:56 +02:00