cpython/Include
Sam Gross 289af86122
gh-111569: Fix critical sections test on WebAssembly (GH-111897)
This adds a macro `Py_CAN_START_THREADS` that corresponds to the Python
function `test.support.threading_helper.can_start_thread()`. WASI and
some Emscripten builds do not have a working pthread implementation.

This macro is used to guard the critical sections C API tests that
require a working threads implementation.
2023-11-09 15:37:11 -08:00
..
cpython GH-111843: Tier 2 exponential backoff (GH-111850) 2023-11-09 13:49:51 +00:00
internal GH-109369: Exit tier 2 if executor is invalid (GH-111657) 2023-11-09 11:19:51 +00:00
abstract.h gh-108511: Add C API functions which do not silently ignore errors (GH-109025) 2023-09-17 14:23:31 +03:00
bltinmodule.h
boolobject.h gh-84436: Implement Immortal Objects (gh-19474) 2023-04-22 13:39:37 -06:00
bytearrayobject.h
bytesobject.h gh-108765: Move standard includes to Python.h (#108769) 2023-09-01 21:03:20 +02:00
ceval.h gh-105182: Remove PyEval_AcquireLock() and PyEval_InitThreads() (#105183) 2023-06-01 13:41:56 +02:00
codecs.h Remove private _PyCodec_Lookup() function (#106269) 2023-06-30 09:34:01 +00:00
compile.h gh-109596: Ensure repeated rules in the grammar are not allowed and fix incorrect soft keywords (#109606) 2023-09-22 19:03:23 +01:00
complexobject.h
datetime.h
descrobject.h gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511) 2023-05-04 09:56:53 +02:00
dictobject.h gh-106004: PyDict_GetItemRef() should only be in the limited API 3.13 (GH-107229) 2023-07-25 21:48:07 +03:00
dynamic_annotations.h
enumobject.h
errcode.h gh-107450: Check for overflow in the tokenizer and fix overflow test (#110832) 2023-10-16 16:42:49 +02:00
exports.h gh-108765: Move export code from pyport.h to exports.h (#108855) 2023-09-04 01:04:05 +02:00
fileobject.h gh-106320: Remove _PyIsSelectable_fd() C API (#107142) 2023-07-23 19:07:12 +00:00
fileutils.h gh-108765: Move stat() fiddling from pyport.h to fileutils.h (#108854) 2023-09-03 21:32:13 +00:00
floatobject.h
frameobject.h
genericaliasobject.h
import.h gh-105922: Add PyImport_AddModuleRef() function (#105923) 2023-06-20 08:48:14 +02:00
interpreteridobject.h gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-107359) 2023-07-27 15:30:16 -06:00
intrcheck.h gh-106320: Remove private _PyOS_IsMainThread() function (#108605) 2023-08-29 03:20:31 +00:00
iterobject.h gh-106320: Remove _PyAnextAwaitable_Type from the public C API (#108597) 2023-08-29 02:05:11 +00:00
listobject.h
longobject.h gh-108444: Add PyLong_AsInt() public function (#108445) 2023-08-24 23:55:30 +02:00
marshal.h
memoryobject.h gh-79315: Add Include/cpython/memoryobject.h header (#99723) 2022-11-23 15:44:42 +01:00
methodobject.h gh-105107: Remove PyCFunction_Call() function (#105181) 2023-06-01 11:25:55 +02:00
modsupport.h gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
moduleobject.h gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh-111707) 2023-11-06 09:34:57 -07:00
object.h gh-111569: Implement Python critical section API (gh-111571) 2023-11-08 15:39:29 -07:00
objimpl.h gh-108765: Move standard includes to Python.h (#108769) 2023-09-01 21:03:20 +02:00
opcode.h gh-105481: opcode.h is no longer generated during the build (#108080) 2023-08-17 17:07:58 +01:00
opcode_ids.h gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and frame state (#111648) 2023-11-03 10:01:36 +00:00
osdefs.h gh-108765: Reformat Include/osdefs.h (#108766) 2023-09-01 14:35:39 +00:00
osmodule.h
patchlevel.h Post 3.13.0a1 2023-10-13 13:39:00 +02:00
py_curses.h
pyatomic.h gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344) 2023-09-19 09:54:29 -06:00
pybuffer.h gh-102500: Implement PEP 688 (#102521) 2023-05-04 07:59:46 -07:00
pycapsule.h gh-108240: Add pycore_capsule.h internal header file (#108596) 2023-08-29 01:20:02 +00:00
pydtrace.d
pydtrace.h Fix pydtrace.d path comment in Include/pydtrace.h (#28539) 2022-12-31 22:40:25 +05:30
pyerrors.h gh-108765: Move standard includes to Python.h (#108769) 2023-09-01 21:03:20 +02:00
pyexpat.h
pyframe.h
pyhash.h gh-106320: Move private _PyHash API to the internal C API (#107026) 2023-07-22 13:49:37 +00:00
pylifecycle.h gh-110397: Add Py_IsFinalizing() to the stable ABI (#110441) 2023-10-07 17:59:16 +02:00
pymacconfig.h gh-108765: Reformat Include/pymacconfig.h (#108764) 2023-09-01 14:57:28 +00:00
pymacro.h gh-107249: Implement Py_UNUSED() for MSVC (#107250) 2023-07-25 19:28:16 +02:00
pymath.h gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202) 2023-05-10 17:44:52 +01:00
pymem.h gh-85283: Add PyMem_RawMalloc() to the limited C API (#108570) 2023-10-17 02:41:51 +02:00
pyport.h gh-111569: Fix critical sections test on WebAssembly (GH-111897) 2023-11-09 15:37:11 -08:00
pystate.h gh-108867: Add PyThreadState_GetUnchecked() function (#108870) 2023-10-03 16:53:51 +00:00
pystats.h gh-108753: Enhance pystats (#108754) 2023-09-06 15:54:59 +00:00
pystrcmp.h
pystrtod.h gh-106320: Remove private float C API functions (#108430) 2023-08-24 19:09:49 +02:00
Python.h gh-108765: Python.h no longer includes <stddef.h> on Windows (#111563) 2023-10-31 21:53:57 +01:00
pythonrun.h gh-102755: PyErr_DisplayException only in ABI >= 3.12. Tests cover PyErr_Display as well (GH-102849) 2023-03-21 10:36:18 +01:00
pythread.h gh-81925: Implement native thread ids for kFreeBSD (#111761) 2023-11-09 21:02:30 +01:00
pytypedefs.h
rangeobject.h
README.rst gh-101101: Unstable C API tier (PEP 689) (GH-101102) 2023-02-28 09:31:01 +01:00
setobject.h
sliceobject.h
structmember.h gh-47146: Soft-deprecate structmember.h, expose its contents via Python.h (GH-99014) 2022-11-22 08:25:43 +01:00
structseq.h gh-106168: PyTuple_SET_ITEM() now checks the index (#106164) 2023-06-28 03:45:57 +02:00
sysmodule.h gh-109587: Allow "precompiled" perf-trampolines to largely mitigate the cost of enabling perf-trampolines (#109666) 2023-10-27 03:57:29 +00:00
traceback.h
tupleobject.h
typeslots.h
unicodeobject.h gh-111089: Revert PyUnicode_AsUTF8() changes (#111833) 2023-11-07 22:36:13 +00:00
warnings.h
weakrefobject.h gh-105927: Deprecate PyWeakref_GetObject() function (#106006) 2023-06-26 12:10:53 +02:00

The Python C API
================

The C API is divided into these sections:

1. ``Include/``: Limited API
2. ``Include/cpython/``: CPython implementation details
3. ``Include/cpython/``, names with the ``PyUnstable_`` prefix: API that can
   change between minor releases
4. ``Include/internal/``, and any name with ``_`` prefix: The internal API

Information on changing the C API is available `in the developer guide`_

.. _in the developer guide: https://devguide.python.org/c-api/