Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented 3.13 C API #118915

Open
47 of 78 tasks
encukou opened this issue May 10, 2024 · 1 comment
Open
47 of 78 tasks

Undocumented 3.13 C API #118915

encukou opened this issue May 10, 2024 · 1 comment
Labels
docs Documentation in the Doc dir topic-C-API

Comments

@encukou
Copy link
Member

encukou commented May 10, 2024

The following public C API is new in 3.13 (beta 1, relative to 3.12), and as of this writing it looks either

  • undocumented, or
  • documented incorrectly. See the docs search page for what Sphinx thinks the type and fully-quilfied name of the symbol are; it should be a C entry without extraneous namespaces. (The details tend to matter for search, URLs, and Intersphinx links.)

\

  • PY_MACCONFIG_H in Include/pymacconfig.h (header guards don't need docs)
  • PY_MONITORING_EVENT_BRANCH in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_CALL in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_C_RAISE in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_C_RETURN in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_EXCEPTION_HANDLED in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_INSTRUCTION in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_JUMP in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_LINE in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_PY_RESUME in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_PY_RETURN in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_PY_START in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_PY_THROW in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_PY_UNWIND in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_PY_YIELD in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_RAISE in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_RERAISE in Include/cpython/monitoring.h
  • PY_MONITORING_EVENT_STOP_ITERATION in Include/cpython/monitoring.h
  • PY_MONITORING_IS_INSTRUMENTED_EVENT in Include/cpython/monitoring.h
  • PyCF_OPTIMIZED_AST in Include/cpython/compile.h
  • PyEval_GetFrameBuiltins in Include/ceval.h:25
  • PyEval_GetFrameGlobals in Include/ceval.h:26
  • PyEval_GetFrameLocals in Include/ceval.h:27
  • PyExc_IncompleteInputError in Include/pyerrors.h:111
  • PyExc_PythonFinalizationError in Include/cpython/pyerrors.h:129
  • PyFrameLocalsProxy_Check in Include/cpython/pyframe.h
  • PyFrameLocalsProxy_Type in Include/cpython/pyframe.h:6
  • PyMonitoring_EnterScope in Include/cpython/monitoring.h:44
  • PyMonitoring_ExitScope in Include/cpython/monitoring.h:48
  • PyRefTracerEvent in Include/cpython/object.h:516, Include/cpython/object.h:519
  • PyUnstable_AtExit in Include/cpython/pylifecycle.h:91
  • PyUnstable_CopyPerfMapFile in Include/cpython/sysmodule.h:20
  • PyUnstable_EXECUTABLE_KINDS in Include/cpython/pyframe.h
  • PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION in Include/cpython/pyframe.h
  • PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR in Include/cpython/pyframe.h
  • PyUnstable_EXECUTABLE_KIND_PY_FUNCTION in Include/cpython/pyframe.h
  • PyUnstable_EXECUTABLE_KIND_SKIP in Include/cpython/pyframe.h
  • PyUnstable_ExecutableKinds in Include/cpython/pyframe.h:45
  • PyUnstable_GetExecutor in Include/cpython/optimizer.h:137 (now removed)
  • PyUnstable_GetOptimizer in Include/cpython/optimizer.h:135 (now removed)
  • PyUnstable_InterpreterState_GetMainModule in Include/cpython/pystate.h:11
  • PyUnstable_Optimizer_NewCounter in Include/cpython/optimizer.h:145 (now removed)
  • PyUnstable_Optimizer_NewUOpOptimizer in Include/cpython/optimizer.h:146 (now removed)
  • PyUnstable_PerfTrampoline_CompileCode in Include/cpython/sysmodule.h:21
  • PyUnstable_PerfTrampoline_SetPersistAfterFork in Include/cpython/sysmodule.h:22
  • PyUnstable_Replace_Executor in Include/cpython/optimizer.h:129 (now removed)
  • PyUnstable_SetOptimizer in Include/cpython/optimizer.h:133 (now removed)
  • Py_ASNATIVEBYTES_BIG_ENDIAN in Include/cpython/longobject.h
  • Py_ASNATIVEBYTES_DEFAULTS in Include/cpython/longobject.h
  • Py_ASNATIVEBYTES_LITTLE_ENDIAN in Include/cpython/longobject.h
  • Py_ASNATIVEBYTES_NATIVE_ENDIAN in Include/cpython/longobject.h
  • Py_ASNATIVEBYTES_REJECT_NEGATIVE in Include/cpython/longobject.h
  • Py_ASNATIVEBYTES_UNSIGNED_BUFFER in Include/cpython/longobject.h
  • Py_ATOMIC_H in Include/pyatomic.h (header guards don't need docs)
  • Py_CAN_START_THREADS in Include/pyport.h:463
  • Py_C_RECURSION_LIMIT in Include/cpython/pystate.h:215
  • Py_MOD_GIL_NOT_USED in Include/moduleobject.h:69
  • Py_MOD_GIL_USED in Include/moduleobject.h:69
  • Py_MONITORING_H in Include/monitoring.h (header guards don't need docs)
  • Py_OPTIMIZER_H in Include/cpython/optimizer.h (header guards don't need docs)
  • Py_TPFLAGS_INLINE_VALUES in Include/object.h:632
  • Py_TRASHCAN_HEADROOM in Include/cpython/object.h:463
  • CO_NO_MONITORING_EVENTS in Include/cpython/code.h:192

Some more are generated by configure, I guess that's low priority:

  • HAVE_CLOCK_T in ./pyconfig.h:138
  • HAVE_CLOSEFROM in ./pyconfig.h:138
  • HAVE_GETGRENT in ./pyconfig.h:138
  • HAVE_GRANTPT in ./pyconfig.h:515
  • HAVE_POSIX_OPENPT in ./pyconfig.h:849
  • HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP in ./pyconfig.h:849
  • HAVE_PROCESS_VM_READV in ./pyconfig.h:849
  • HAVE_PTSNAME in ./pyconfig.h:957
  • HAVE_PTSNAME_R in ./pyconfig.h:957
  • HAVE_SOCKLEN_T in ./pyconfig.h:957
  • HAVE_SYS_TIMERFD_H in ./pyconfig.h:1406
  • HAVE_TIMERFD_CREATE in ./pyconfig.h:1406
  • HAVE_UNLOCKPT in ./pyconfig.h:1406
  • HAVE___UINT128_T in ./pyconfig.h:1582
  • WITH_MIMALLOC in ./pyconfig.h:1867

Linked PRs

@encukou encukou added docs Documentation in the Doc dir topic-C-API labels May 10, 2024
@ronaldoussoren
Copy link
Contributor

PY_MACCONFIG_H was almost certainly introduced by me, and almost matches the pattern used in other headers (other headers use Py_ as the prefix and not PY_. Its just there to make it safe to include the header more than once and does not have to be documented.

encukou added a commit to encukou/cpython that referenced this issue Sep 16, 2024
- Add an entry for PyExc_PythonFinalizationError
- Add formal entries for `PY_MONITORING_EVENT_*`, making them searchable
  and linkable with Intersphinx.
- Use the "NULL namespace" for several macros that are documented
  below the functions that use them. This fixes their names
  in search results, and fixes linking using Intersphinx inventories.
encukou added a commit to encukou/cpython that referenced this issue Sep 19, 2024
Yhg1s pushed a commit that referenced this issue Sep 23, 2024
* [3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313)
(cherry picked from commit 9d0a752)

* gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)

Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
Yhg1s pushed a commit that referenced this issue Sep 23, 2024
…4134) (#124244)

gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)

(cherry picked from commit 32119fc)
vstinner pushed a commit that referenced this issue Dec 11, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 11, 2024
(cherry picked from commit dd9da73)

Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
vstinner pushed a commit that referenced this issue Dec 11, 2024
…127831)

gh-118915: C API: Document frame locals proxies. (GH-127720)
(cherry picked from commit dd9da73)

Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
koyuki7w added a commit to koyuki7w/cpython that referenced this issue Dec 17, 2024
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 9, 2025
encukou pushed a commit that referenced this issue Jan 10, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 20, 2025
encukou pushed a commit that referenced this issue Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-C-API
Projects
None yet
Development

No branches or pull requests

2 participants