From 1efbe4123609a5eb7da3600ee059bf43481ff08e Mon Sep 17 00:00:00 2001 From: Yash Date: Tue, 6 Jan 2026 23:41:28 +0530 Subject: [PATCH 1/6] first unstable py --- Doc/c-api/frame.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst index fb17cf7f1da6b2..0a8e18ed50fec7 100644 --- a/Doc/c-api/frame.rst +++ b/Doc/c-api/frame.rst @@ -250,3 +250,39 @@ Unless using :pep:`523`, you will not need this. .. versionadded:: 3.12 +.. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP + + Index for the "skip" kind in :c:var:`PyUnstable_ExecutableKinds`. + Indicates that the frame's code object should be skipped. + + .. versionadded:: 3.12 + + +.. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION + + Index for the "Python function" kind in :c:var:`PyUnstable_ExecutableKinds`. + + .. versionadded:: 3.12 + + +.. c:macro:: PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION + + Index for the "built-in function" kind in :c:var:`PyUnstable_ExecutableKinds`. + + .. versionadded:: 3.12 + + +.. c:macro:: PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR + + Index for the "method descriptor" kind in :c:var:`PyUnstable_ExecutableKinds`. + + .. versionadded:: 3.12 + + +.. c:macro:: PyUnstable_EXECUTABLE_KINDS + + The number of entries in :c:var:`PyUnstable_ExecutableKinds`. + + .. versionadded:: 3.12 + + From 45720082e947813a74d2b6c209b895738e3b98a8 Mon Sep 17 00:00:00 2001 From: Yash Date: Tue, 6 Jan 2026 23:55:06 +0530 Subject: [PATCH 2/6] fix 1 --- Doc/c-api/frame.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst index 0a8e18ed50fec7..d27a2661fed789 100644 --- a/Doc/c-api/frame.rst +++ b/Doc/c-api/frame.rst @@ -252,7 +252,7 @@ Unless using :pep:`523`, you will not need this. .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP - Index for the "skip" kind in :c:var:`PyUnstable_ExecutableKinds`. + Index for the "skip" kind in ``PyUnstable_ExecutableKinds``. Indicates that the frame's code object should be skipped. .. versionadded:: 3.12 @@ -260,29 +260,30 @@ Unless using :pep:`523`, you will not need this. .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION - Index for the "Python function" kind in :c:var:`PyUnstable_ExecutableKinds`. + Index for the "Python function" kind in ``PyUnstable_ExecutableKinds``. .. versionadded:: 3.12 .. c:macro:: PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION - Index for the "built-in function" kind in :c:var:`PyUnstable_ExecutableKinds`. + Index for the "built-in function" kind in ``PyUnstable_ExecutableKinds``. .. versionadded:: 3.12 .. c:macro:: PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR - Index for the "method descriptor" kind in :c:var:`PyUnstable_ExecutableKinds`. + Index for the "method descriptor" kind in ``PyUnstable_ExecutableKinds``. .. versionadded:: 3.12 .. c:macro:: PyUnstable_EXECUTABLE_KINDS - The number of entries in :c:var:`PyUnstable_ExecutableKinds`. + The number of entries in ``PyUnstable_ExecutableKinds``. .. versionadded:: 3.12 + From 54495a21df6b8e82caa9e3f77e468fc665177825 Mon Sep 17 00:00:00 2001 From: Yash Date: Wed, 7 Jan 2026 00:32:53 +0530 Subject: [PATCH 3/6] fix 2(version) --- Doc/c-api/frame.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst index d27a2661fed789..6334b39f96f066 100644 --- a/Doc/c-api/frame.rst +++ b/Doc/c-api/frame.rst @@ -255,35 +255,35 @@ Unless using :pep:`523`, you will not need this. Index for the "skip" kind in ``PyUnstable_ExecutableKinds``. Indicates that the frame's code object should be skipped. - .. versionadded:: 3.12 + .. versionadded:: 3.13 .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION Index for the "Python function" kind in ``PyUnstable_ExecutableKinds``. - .. versionadded:: 3.12 + .. versionadded:: 3.13 .. c:macro:: PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION Index for the "built-in function" kind in ``PyUnstable_ExecutableKinds``. - .. versionadded:: 3.12 + .. versionadded:: 3.13 .. c:macro:: PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR Index for the "method descriptor" kind in ``PyUnstable_ExecutableKinds``. - .. versionadded:: 3.12 + .. versionadded:: 3.13 .. c:macro:: PyUnstable_EXECUTABLE_KINDS The number of entries in ``PyUnstable_ExecutableKinds``. - .. versionadded:: 3.12 + .. versionadded:: 3.13 From e8097b1483ff84a20a3f87634ce0e73ba722e909 Mon Sep 17 00:00:00 2001 From: Yash Date: Wed, 7 Jan 2026 15:53:54 +0530 Subject: [PATCH 4/6] fix 2 pyframe --- Doc/c-api/frame.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst index 6334b39f96f066..2ba472ff3935e2 100644 --- a/Doc/c-api/frame.rst +++ b/Doc/c-api/frame.rst @@ -250,6 +250,15 @@ Unless using :pep:`523`, you will not need this. .. versionadded:: 3.12 +.. c:enum:: PyUnstable_ExecutableKinds + + An enumeration of the different kinds of executables (code objects) in a frame. + This can be one of the constants :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP` + or :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`. + + .. versionadded:: 3.13 + + .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP Index for the "skip" kind in ``PyUnstable_ExecutableKinds``. From 9c1492fdf5b4f6897fd0b22e1a1f6ce026193000 Mon Sep 17 00:00:00 2001 From: Yash Date: Thu, 8 Jan 2026 22:04:25 +0530 Subject: [PATCH 5/6] fix 3 pyframe --- Doc/c-api/frame.rst | 27 +++++++++++++++++------- Tools/check-c-api-docs/ignored_c_api.txt | 6 ------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst index 2ba472ff3935e2..05d1a3bad64baa 100644 --- a/Doc/c-api/frame.rst +++ b/Doc/c-api/frame.rst @@ -250,18 +250,32 @@ Unless using :pep:`523`, you will not need this. .. versionadded:: 3.12 -.. c:enum:: PyUnstable_ExecutableKinds +.. c:var:: PyUnstable_ExecutableKinds - An enumeration of the different kinds of executables (code objects) in a frame. - This can be one of the constants :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP` - or :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`. + An array of executable kinds (executor types) for frames, used for internal + debugging and tracing. + + Tools like debuggers and profilers can use this to identify the type of execution + context associated with a frame (e.g. to filter out internal frames). + The entries are indexed by the following constants: + + .. list-table:: + :header-rows: 1 + :widths: auto + + * - Constant + - Description + * - :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP` + - The frame is internal (e.g. inlined) and should be skipped by tools. + * - :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION` + - The frame corresponds to a standard Python function. .. versionadded:: 3.13 .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP - Index for the "skip" kind in ``PyUnstable_ExecutableKinds``. + Index for the "skip" kind in :c:data:`PyUnstable_ExecutableKinds`. Indicates that the frame's code object should be skipped. .. versionadded:: 3.13 @@ -293,6 +307,3 @@ Unless using :pep:`523`, you will not need this. The number of entries in ``PyUnstable_ExecutableKinds``. .. versionadded:: 3.13 - - - diff --git a/Tools/check-c-api-docs/ignored_c_api.txt b/Tools/check-c-api-docs/ignored_c_api.txt index e81ffd51e193b2..88551e09418a9e 100644 --- a/Tools/check-c-api-docs/ignored_c_api.txt +++ b/Tools/check-c-api-docs/ignored_c_api.txt @@ -80,12 +80,6 @@ PyLong_MASK PyLong_SHIFT # cpython/pyerrors.h PyException_HEAD -# cpython/pyframe.h -PyUnstable_EXECUTABLE_KINDS -PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION -PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR -PyUnstable_EXECUTABLE_KIND_PY_FUNCTION -PyUnstable_EXECUTABLE_KIND_SKIP # cpython/pylifecycle.h Py_FrozenMain # cpython/unicodeobject.h From a0b1951886fb4b3583431b70960a0603dd0f381b Mon Sep 17 00:00:00 2001 From: Yash Date: Thu, 8 Jan 2026 23:53:35 +0530 Subject: [PATCH 6/6] fix 4 pyframe --- Doc/c-api/frame.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/frame.rst b/Doc/c-api/frame.rst index 05d1a3bad64baa..6f8b8ada1b168d 100644 --- a/Doc/c-api/frame.rst +++ b/Doc/c-api/frame.rst @@ -250,7 +250,7 @@ Unless using :pep:`523`, you will not need this. .. versionadded:: 3.12 -.. c:var:: PyUnstable_ExecutableKinds +.. c:type:: PyUnstable_ExecutableKinds An array of executable kinds (executor types) for frames, used for internal debugging and tracing.