Original file line numberDiff line numberDiff line change@@ -243,41 +243,3 @@ Unless using :pep:`523`, you will not need this.
243243 Return the currently executing line number, or -1 if there is no line number.
244244245245 .. versionadded:: 3.12
246-247-248-.. c:var::const PyTypeObject *PyUnstable_ExecutableKinds
249-250- An array of executable kinds (executor types) for frames, used for internal
251- debugging and tracing.
252-253- Tools like debuggers and profilers can use this to identify the type of execution
254- context associated with a frame (such as to filter out internal frames).
255- The entries are indexed by the following constants:
256-257- .. list-table::
258- :header-rows: 1
259- :widths: auto
260-261- * - Constant
262- - Description
263- * - .. c:macro:: PyUnstable_EXECUTABLE_KIND_SKIP
264- - The frame is internal (For example: inlined) and should be skipped by tools.
265- * - .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION
266- - The frame corresponds to a standard Python function.
267- * - .. c:macro:: PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION
268- - The frame corresponds to a function defined in native code.
269- * - .. c:macro:: PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR
270- - The frame corresponds to a method on a class instance.
271-272- Note that reading the executable kind from a frame is currently only
273- possible with undocumented internal APIs.
274-275- .. versionadded:: 3.13
276-277-278-.. c:macro:: PyUnstable_EXECUTABLE_KINDS
279-280- The number of entries in :c:data:`PyUnstable_ExecutableKinds`.
281-282- .. versionadded:: 3.13
283-Original file line numberDiff line numberDiff line change@@ -23,6 +23,13 @@ using/configure.html: cmdoption-with-system-libmpdec
2323library/symtable.html: symtable.Class.get_methods
2424library/sys.html: sys._enablelegacywindowsfsencoding
2525c-api/import.html: c.PyImport_LazyImportsMode.PyImport_LAZY_NONE
26+c-api/frame.html: c.PyUnstable_EXECUTABLE_KINDS
27+c-api/frame.html: c.PyUnstable_ExecutableKinds
28+c-api/frame.html: c.PyUnstable_ExecutableKinds.PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION
29+c-api/frame.html: c.PyUnstable_ExecutableKinds.PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR
30+c-api/frame.html: c.PyUnstable_ExecutableKinds.PyUnstable_EXECUTABLE_KIND_PY_FUNCTION
31+c-api/frame.html: c.PyUnstable_ExecutableKinds.PyUnstable_EXECUTABLE_KIND_SKIP
32+26332734## Old names for grammar tokens
2835reference/expressions.html: grammar-token-python-grammar-comp_for
Original file line numberDiff line numberDiff line change@@ -872,3 +872,12 @@ Deprecated C APIs
872872873873Removed C APIs
874874--------------
875+876+* The :c:var:`!PyUnstable_ExecutableKinds` array, as well as the macros
877+:c:macro:`!PyUnstable_EXECUTABLE_KIND_SKIP`,
878+:c:macro:`!PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`,
879+:c:macro:`!PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION`,
880+:c:macro:`!PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR` and
881+:c:macro:`!PyUnstable_EXECUTABLE_KINDS`, were removed.
882+883+ (Contributed by Peters Bierma and Viktorin in :gh:`152105`.)
Original file line numberDiff line numberDiff line change@@ -35,11 +35,3 @@ PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame
3535/* Returns the currently executing line number, or -1 if there is no line number.
3636 * Does not raise an exception. */
3737PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(struct_PyInterpreterFrame*frame);
38-39-#definePyUnstable_EXECUTABLE_KIND_SKIP 0
40-#definePyUnstable_EXECUTABLE_KIND_PY_FUNCTION 1
41-#definePyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION 3
42-#definePyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR 4
43-#definePyUnstable_EXECUTABLE_KINDS 5
44-45-PyAPI_DATA(constPyTypeObject*) constPyUnstable_ExecutableKinds[PyUnstable_EXECUTABLE_KINDS+1];
Original file line numberDiff line numberDiff line change@@ -0,0 +1,6 @@
1+Remove the :c:var:`!PyUnstable_ExecutableKinds` array, as well as the macros
2+:c:macro:`!PyUnstable_EXECUTABLE_KIND_SKIP`,
3+:c:macro:`!PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`,
4+:c:macro:`!PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION`,
5+:c:macro:`!PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR` and
6+:c:macro:`!PyUnstable_EXECUTABLE_KINDS`, from the C API.
Original file line numberDiff line numberDiff line change@@ -149,11 +149,3 @@ PyUnstable_InterpreterFrame_GetLine(_PyInterpreterFrame *frame)
149149intaddr=_PyInterpreterFrame_LASTI(frame) *sizeof(_Py_CODEUNIT);
150150returnPyCode_Addr2Line(_PyFrame_GetCode(frame), addr);
151151}
152-153-constPyTypeObject*constPyUnstable_ExecutableKinds[PyUnstable_EXECUTABLE_KINDS+1] = {
154- [PyUnstable_EXECUTABLE_KIND_SKIP] =&_PyNone_Type,
155- [PyUnstable_EXECUTABLE_KIND_PY_FUNCTION] =&PyCode_Type,
156- [PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION] =&PyMethod_Type,
157- [PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR] =&PyMethodDescr_Type,
158- [PyUnstable_EXECUTABLE_KINDS] =NULL,
159-};