mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-74929: PEP 667 C API documentation (gh-119379)
* Add docs for new APIs * Add soft-deprecation notices * Add What's New porting entries * Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead * Other related cleanups found when looking for refs to the deprecated APIs
This commit is contained in:
parent
cc5cd4d93e
commit
3859e09e3d
9 changed files with 104 additions and 11 deletions
|
@ -7,18 +7,30 @@ Reflection
|
|||
|
||||
.. c:function:: PyObject* PyEval_GetBuiltins(void)
|
||||
|
||||
.. deprecated:: 3.13
|
||||
|
||||
Use :c:func:`PyEval_GetFrameBuiltins` instead.
|
||||
|
||||
Return a dictionary of the builtins in the current execution frame,
|
||||
or the interpreter of the thread state if no frame is currently executing.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyEval_GetLocals(void)
|
||||
|
||||
.. deprecated:: 3.13
|
||||
|
||||
Use :c:func:`PyEval_GetFrameLocals` instead.
|
||||
|
||||
Return a dictionary of the local variables in the current execution frame,
|
||||
or ``NULL`` if no frame is currently executing.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyEval_GetGlobals(void)
|
||||
|
||||
.. deprecated:: 3.13
|
||||
|
||||
Use :c:func:`PyEval_GetFrameGlobals` instead.
|
||||
|
||||
Return a dictionary of the global variables in the current execution frame,
|
||||
or ``NULL`` if no frame is currently executing.
|
||||
|
||||
|
@ -31,6 +43,32 @@ Reflection
|
|||
See also :c:func:`PyThreadState_GetFrame`.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyEval_GetFrameBuiltins(void)
|
||||
|
||||
Return a dictionary of the builtins in the current execution frame,
|
||||
or the interpreter of the thread state if no frame is currently executing.
|
||||
|
||||
.. versionadded:: 3.13
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyEval_GetFrameLocals(void)
|
||||
|
||||
Return a dictionary of the local variables in the current execution frame,
|
||||
or ``NULL`` if no frame is currently executing. Equivalent to calling
|
||||
:func:`locals` in Python code.
|
||||
|
||||
.. versionadded:: 3.13
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyEval_GetFrameGlobals(void)
|
||||
|
||||
Return a dictionary of the global variables in the current execution frame,
|
||||
or ``NULL`` if no frame is currently executing. Equivalent to calling
|
||||
:func:`globals` in Python code.
|
||||
|
||||
.. versionadded:: 3.13
|
||||
|
||||
|
||||
.. c:function:: const char* PyEval_GetFuncName(PyObject *func)
|
||||
|
||||
Return the name of *func* if it is a function, class or instance object, else the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue