| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -243,41 +243,3 @@ Unless using :pep:`523`, you will not need this. | |||
| 243 | 243 | Return the currently executing line number, or -1 if there is no line number. | |
| 244 | 244 | ||
| 245 | 245 | .. 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 number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,13 @@ using/configure.html: cmdoption-with-system-libmpdec | |||
| 23 | 23 | library/symtable.html: symtable.Class.get_methods | |
| 24 | 24 | library/sys.html: sys._enablelegacywindowsfsencoding | |
| 25 | 25 | c-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 | + | ||
| 26 | 33 | ||
| 27 | 34 | ## Old names for grammar tokens | |
| 28 | 35 | reference/expressions.html: grammar-token-python-grammar-comp_for | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -872,3 +872,12 @@ Deprecated C APIs | |||
| 872 | 872 | ||
| 873 | 873 | Removed C APIs | |
| 874 | 874 | -------------- | |
| 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 number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,11 +35,3 @@ PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame | |||
| 35 | 35 | /* Returns the currently executing line number, or -1 if there is no line number. | |
| 36 | 36 | * Does not raise an exception. */ | |
| 37 | 37 | PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame); | |
| 38 | - | ||
| 39 | - #define PyUnstable_EXECUTABLE_KIND_SKIP 0 | ||
| 40 | - #define PyUnstable_EXECUTABLE_KIND_PY_FUNCTION 1 | ||
| 41 | - #define PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION 3 | ||
| 42 | - #define PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR 4 | ||
| 43 | - #define PyUnstable_EXECUTABLE_KINDS 5 | ||
| 44 | - | ||
| 45 | - PyAPI_DATA(const PyTypeObject *) const PyUnstable_ExecutableKinds[PyUnstable_EXECUTABLE_KINDS+1]; | ||
| Original file line number | Diff line number | Diff 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 number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -149,11 +149,3 @@ PyUnstable_InterpreterFrame_GetLine(_PyInterpreterFrame *frame) | |||
| 149 | 149 | int addr = _PyInterpreterFrame_LASTI(frame) * sizeof(_Py_CODEUNIT); | |
| 150 | 150 | return PyCode_Addr2Line(_PyFrame_GetCode(frame), addr); | |
| 151 | 151 | } | |
| 152 | - | ||
| 153 | - const PyTypeObject *const PyUnstable_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 | - }; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments