[issue43416] Add README files in Include/cpython and Include/internal
New submission from Serhiy Storchaka <storchaka+cpython@gmail.com>: I always hesitate in what subdirectory of Include/ to add a declaration of new private API. What is more "private"? It would be nice to add README files in these directories which describe what API should be declared here and what is the difference between Include/cpython and Include/internal. ---------- assignee: docs@python components: Documentation, Interpreter Core messages: 388196 nosy: docs@python, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Add README files in Include/cpython and Include/internal type: enhancement versions: Python 3.10 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43416> _______________________________________
STINNER Victor <vstinner@python.org> added the comment: * Include/internal/ with extern: C API which must not and can not be used outside CPython code base, only stdlib extensions built as built-in extensions can use it. * Include/internal/ with PyAPI_FUNC/PyAPI_DATA: API which should be be used outside CPython, but exposed for specific use cases like debuggers and profilers. Structures are exposed for debuggers and profilers which don't want to execute code to avoid the risk of any unwanted side effect. * Include/cpython/: Public C API excluded from the limited C API (Py_LIMITED_API macro) and the stable ABI (PEP 384). * Include/: Public limited C API and the stable ABI (PEP 384). In case of doubt, new C API must be added to the internal C API using extern. I would suggest a public discussion before adding any new C API to Include/cpython/ or Include/ No new functions stealing references or returning borrowed references must be added to public C API (limited or not). A strong reference must be returned. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43416> _______________________________________
Change by Erlend Egeberg Aasland <erlend.aasland@innova.no>: ---------- keywords: +patch nosy: +erlendaasland nosy_count: 3.0 -> 4.0 pull_requests: +23643 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24884 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43416> _______________________________________
STINNER Victor <vstinner@python.org> added the comment: New changeset 929c9039fe0468cb37e0811ddfb7b67c98353ea8 by Erlend Egeberg Aasland in branch 'master': bpo-43416: Add Include/README.rst (GH-24884) https://github.com/python/cpython/commit/929c9039fe0468cb37e0811ddfb7b67c983... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43416> _______________________________________
Change by STINNER Victor <vstinner@python.org>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43416> _______________________________________
participants (3)
-
Erlend Egeberg Aasland
-
Serhiy Storchaka
-
STINNER Victor