summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-101100: Fix Sphinx warnings in `c-api/structures.rst` (GH-113564) ↵Miss Islington (bot)2024-01-241-9/+10
| | | | | | | | (#114527) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-101100: Fix sphinx warnings in `Doc/c-api/memory.rst` (GH-114373) ↵Miss Islington (bot)2024-01-211-2/+2
| | | | | | | | (#114377) gh-101100: Fix sphinx warnings in `Doc/c-api/memory.rst` (GH-114373) (cherry picked from commit 47133d8d869c94c4d1f340b5481cc3f2cdc7d68b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-112092: clarify unstable ABI recompilation requirements ↵Miss Islington (bot)2024-01-181-1/+1
| | | | | | | | | | (GH-112093) (#114260) gh-112092: clarify unstable ABI recompilation requirements (GH-112093) Use different versions in the examples for when extensions do and do not need to be recompiled to make the examples easier to understand. (cherry picked from commit 68a7b78cd5185cbd9456f42c15ecf872a7c16f44) Co-authored-by: DerSchinken <53398996+DerSchinken@users.noreply.github.com>
* [3.12] gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` ↵Miss Islington (bot)2024-01-171-0/+34
| | | | | | | | | (GH-112557) (GH-114119) gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557) (cherry picked from commit a482bc67ee786e60937a547776fcf9528810e1ce) Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL ↵Miss Islington (bot)2023-12-311-1/+1
| | | | | | | | when the error indicator is not set (GH-113369) (#113606) gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (GH-113369) (cherry picked from commit 2849cbb53afc8c6a4465f1b3490c67c2455caf6f) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] docs: specify that PyBytes_AsStringAndSize returns 0 on success ↵Miss Islington (bot)2023-12-251-0/+1
| | | | | | | (GH-110888) (GH-111690) (cherry picked from commit 9f33ede12710c454643c394421f52d209247272c) Co-authored-by: lefp <70862148+lefp@users.noreply.github.com>
* [3.12] gh-101100: Improve docs on exception attributes (GH-113057) (#113061)Miss Islington (bot)2023-12-131-6/+10
| | | | | | | gh-101100: Improve docs on exception attributes (GH-113057) (cherry picked from commit d05a180350fe20d5fde56c7e525e394a0b282703) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100: Further improve docs on function attributes (GH-113001) ↵Miss Islington (bot)2023-12-121-1/+1
| | | | | | | | (#113030) gh-101100: Further improve docs on function attributes (GH-113001) (cherry picked from commit 81a15ea74e2607728fceb822dfcc1aabff00478a) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100: Improve documentation on function attributes (GH-112933) ↵Hugo van Kemenade2023-12-121-10/+13
| | | | | | | (#112974) (cherry picked from commit 4c5b9c107a1d158b245f21a1839a2bec97d05383) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Doc: c-api: fix order of PyMemberDef fields (GH-112879)Miss Islington (bot)2023-12-101-4/+4
| | | | Doc: c-api: fix order of PyMemberDef fields (GH-112879) (cherry picked from commit 42a86df3a376a77a94ffe6b4011a82cf51dc336a)
* [3.12] gh-101100: Improve documentation of code object attributes (#112781) ↵Alex Waygood2023-12-062-3/+3
| | | | | (#112816) (cherry-picked from commit e9707d3c3d)
* [3.12] gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` ↵Miss Islington (bot)2023-12-061-3/+3
| | | | | | | | | | | | | parameters in slot typedefs table (GH-112742) (GH-112792) gh-111178: Docs: fix `traverseproc`, `inquiry`, and `destructor` parameters in slot typedefs table (GH-112742) In the slot typedefs table, the parameter of `destructor` and the first parameter of `traverseproc` should both be `PyObject *` rather than `void *`. Same for `inquiry`. (cherry picked from commit 00cce0fe495ee820cd3ca5878bdbe3dd65b1be7b) Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* [3.12] gh-101100: Properly document frame object attributes (GH-112735) ↵Miss Islington (bot)2023-12-052-6/+7
| | | | | | | | (#112772) gh-101100: Properly document frame object attributes (GH-112735) (cherry picked from commit d109f637c048c2b5fc95dc7fdfd50f8ac41a7747) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-62897: Update PyUnicode C API parameter names (GH-12680) (GH-112744)Serhiy Storchaka2023-12-051-91/+91
| | | | | | | Standardize PyUnicode C API parameter names across the documentation. (cherry picked from commit b31232ddf7f219ca8ff9e8d0401c02eb0b6ffec3) Co-authored-by: Rune Tynan <runetynan@gmail.com>
* [3.12] gh-112671: Fixing typo in the Macro Docs (GH-112715) (GH-112726)Miss Islington (bot)2023-12-041-1/+1
| | | | | | Replace Py_T_STRING_INLINE with Py_T_STRING_INPLACE (cherry picked from commit a8ce149628c9eaafb8c38fbf25fbd1ed483d2902) Co-authored-by: Amioplk <amir.worms@dauphine.eu>
* [3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)Hugo van Kemenade2023-11-261-1/+1
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455) ↵Miss Islington (bot)2023-10-301-0/+8
| | | | | | | | (GH-111507) Also document the behavior when called with NULL. (cherry picked from commit bca330542912532baa33af20a107fcf956cf007a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET ↵Miss Islington (bot)2023-10-231-0/+2
| | | | | | (GH-110963) (#111219) Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
* [3.12] C-API docs: Clarify the size of arenas (GH-110895) (#110946)Miss Islington (bot)2023-10-161-1/+2
| | | | | | | | | | | C-API docs: Clarify the size of arenas (GH-110895) Clarify the size of arenas From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1 MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms. (cherry picked from commit f07ca27709855d4637b43bba23384cc795143ee3) Co-authored-by: Mienxiu <82512658+mienxiu@users.noreply.github.com>
* [3.12] gh-110527: Improve `PySet_Clear` docs (GH-110528) (#110928)Miss Islington (bot)2023-10-161-1/+3
| | | | | | gh-110527: Improve `PySet_Clear` docs (GH-110528) (cherry picked from commit bfc1cd8145db00df23fbbd2ed95324bb96c0b25b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-110803: Reorganize docs for what PyType_Slot doesn't cover ↵Miss Islington (bot)2023-10-132-15/+32
| | | | | | | | | | | | | | | | | | (GH-110813) (#110823) gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813) * gh-110803: Reorganize docs for what PyType_Slot doesn't cover - Cover the offset fields first - Mention the old alternative for MANAGED flags, which is needed to support older Pythons - De-emphasize the internal flags: use an inline list. - Add a note to PyMemberDef saying what to do with it * Remove an older draft... (cherry picked from commit 2ab34f0e425d90d0a153104ef2f4343dce2a414d) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-110631: Fix reST indentation (GH-110724) (#110738)Ezio Melotti2023-10-111-12/+12
| | | | | | * Fix wrong indentation in the other dirs. * Fix more wrong indentation.. (cherry picked from commit 718391f475f2550d99dd794069ca76312f7f6aa6)
* [3.12] Fix typos in docs and comments (#109619) (#109621)Alex Waygood2023-10-021-1/+1
| | | | | | Fix typos in docs and comments (#109619) Co-authored-by: Heinz-Alexander Fuetterer <35225576+afuetterer@users.noreply.github.com>
* [3.12] gh-107298: Document PyMODINIT_FUNC macro (GH-109236) (#109947)Miss Islington (bot)2023-09-271-0/+24
| | | | | | | | | | | | gh-107298: Document PyMODINIT_FUNC macro (GH-109236) Document PyMODINIT_FUNC macro. Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base. (cherry picked from commit d7a27e527d7e669d2e45cff80ad725978226477c) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] Improve some C API documentation (GH-108768) (#108785)Serhiy Storchaka2023-09-023-44/+43
| | | | | | | * Express functions which take argument as a C string in terms of functions which take Python object. * Use "note" directive for PyMapping_HasKey() and PyMapping_HasKeyString() notes.. (cherry picked from commit 6f97eeec222f81bd7ae836c149872a40b079e2a6)
* [3.12] Fix misc doc typos (GH-108592) (#108594)Miss Islington (bot)2023-08-292-2/+2
| | | | | | Fix misc doc typos (GH-108592) (cherry picked from commit 88f1c5b454c34efc167a94b5e2d67ec042834e5b) Co-authored-by: xzmeng <aumo@foxmail.com>
* [3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (#108448)Victor Stinner2023-08-251-3/+5
| | | | | | gh-108314: PyDict_GetItemString() mentions UTF-8 PyDict_GetItemString(), PyDict_SetItemString() and PyDict_DelItemString() expects a UTF-8 encoding string for the key.
* [3.12] gh-107298: Fix numerous ref errors and typos in the C API docs ↵Miss Islington (bot)2023-08-224-6/+18
| | | | | | | | (GH-108258) (#108284) gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (cherry picked from commit d7202e4879bf4e7e00a69500ddcb3143864139b4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107298: Fix C API datetime documentation (GH-108034). (#108234)Serhiy Storchaka2023-08-211-14/+57
| | | (cherry picked from commit d63972e289e05b0d82e59f32f107312a8b3de7b5)
* [3.12] gh-107298: Fix some references in the C API documentation (GH-108072) ↵Miss Islington (bot)2023-08-171-1/+1
| | | | | | | | (#108074) gh-107298: Fix some references in the C API documentation (GH-108072) (cherry picked from commit f51f0466c07eabc6177c2f64f70c952dada050e8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107298: Fix C API Buffer documentation (GH-108011). (#108048)Serhiy Storchaka2023-08-162-10/+14
| | | | | (cherry picked from commit c2941cba7a986e6158eebb2a0bf33906dcd78616) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-91051: fix segfault when using all 8 type watchers (GH-107853) ↵Miss Islington (bot)2023-08-161-2/+2
| | | | | | | | (#107876) * gh-91051: fix segfault when using all 8 type watchers (GH-107853) (cherry picked from commit 66e4edd7346b1cd65ddff6da890a0d725e325116) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] Docs: Document PyBUF_MAX_NDIM (GH-107865) (#107871)Miss Islington (bot)2023-08-111-3/+7
| | | | | | Docs: Document PyBUF_MAX_NDIM (GH-107865) (cherry picked from commit 637f7ff2c60f262659da0334f1cb672bd361f398) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) ↵Miss Islington (bot)2023-08-0813-85/+143
| | | | | | | | | | | | | | | | | | (#107752) * gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts. In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has. This change updates the documentation to reflect that perspective. It also updates the docs relative to immortal objects in a handful of places. (cherry picked from commit 5dc825d504ad08d64c9d1ce578f9deebbe012604) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> * Fix a typo. --------- Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-105766: Document that Custom Allocators Must Be Thread-Safe ↵Miss Islington (bot)2023-07-311-0/+6
| | | | | | | | (gh-107519) (gh-107522) gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519) (cherry picked from commit db361a340af3970c279908c8746a6b9ed45f47b8) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters ↵Miss Islington (bot)2023-07-312-0/+32
| | | | | | | | | | (GH-107403) (gh-107521) gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403) It was added in 3.12 for PEP 684 (per-interpreter GIL). (cherry picked from commit fb344e99aa0da5bef9318684ade69978585fe060) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] Fix the documentation for PyCode_New add `qualname` parameter ↵Miss Islington (bot)2023-07-291-4/+4
| | | | | | | | (GH-107186) (#107440) Fix the documentation for PyCode_New add `qualname` parameter (GH-107186) (cherry picked from commit f2abeb590dae5918388f91b60b31f040d44218f0) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* [3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) ↵Serhiy Storchaka2023-07-291-0/+6
| | | | | (GH-107419) (cherry picked from commit f2d07d3289947d10b065b2bb7670c8fb6b6582f2)
* [3.12] gh-107305: Update the C-API Docs for PEP 684 (gh-107324) (gh-107402)Miss Islington (bot)2023-07-281-15/+194
| | | | | | gh-107305: Update the C-API Docs for PEP 684 (gh-107324) (cherry picked from commit c0b81c4b5438a3565fadd9d6f5bc69f989a3fdee) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) ↵Serhiy Storchaka2023-07-2811-30/+43
| | | | | (GH-107380) (cherry picked from commit 983305268e2291b0a7835621b81bf40cba7c27f3)
* [3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) ↵Serhiy Storchaka2023-07-2816-70/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-107376) Declare the following functions as macros, since they are actually macros. It avoids a warning on "TYPE" or "macro" argument. * PyMem_New() * PyMem_Resize() * PyModule_AddIntMacro() * PyModule_AddStringMacro() * PyObject_GC_New() * PyObject_GC_NewVar() * PyObject_New() * PyObject_NewVar() Add C standard C types to nitpick_ignore in Doc/conf.py: * int64_t * uint64_t * uintptr_t No longer ignore non existing "__int" type in nitpick_ignore. Update Doc/tools/.nitignore. (cherry picked from commit 8d61a71f9c81619e34d4a30b625922ebc83c561b) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375)Serhiy Storchaka2023-07-2811-29/+29
| | | | | (cherry picked from commit 391e03fa05b80d17a14ac88d30c974fa2fa00adb) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-107298: Fix doc references to undocumented modules (GH-107300) ↵Miss Islington (bot)2023-07-284-4/+4
| | | | | | | | (GH-107370) Update also Doc/tools/.nitignore. (cherry picked from commit 87b39028e5f453a949a1675526c439f6479a04a8) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-107298: Docs: add targets for some :c:member: and :c:macro: ↵Miss Islington (bot)2023-07-272-39/+40
| | | | | | | | | | references (GH-107316) (GH-107332) Add targets for PyStructSequence_Desc and PyStructSequence_Field members and macros like Py_EQ. Fix target for Py_RETURN_RICHCOMPARE. (cherry picked from commit abec9a1b20b70d8ced401d59fc4f02b331c6568b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107330)Serhiy Storchaka2023-07-276-54/+60
| | | | | Fix also formatting of PyMethodDef members. (cherry picked from commit d363eb5b0255c055e7b43f5e2c0847f555e1982e)
* [3.12] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107312)Miss Islington (bot)2023-07-262-10/+12
| | | | | (cherry picked from commit 6d5b6e71c87fca7c5c26f5dd8f325087962215cc) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107310)Miss Islington (bot)2023-07-265-11/+13
| | | | | (cherry picked from commit af61cb9c7837ff3c11da79e3ee1cab3fdd0ba4da) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Fix PyVectorcall_Function doc versionadded (GH-107140) (#107173)Miss Islington (bot)2023-07-241-1/+1
| | | | | | | | | | Fix PyVectorcall_Function doc versionadded (GH-107140) The documentation implies that PyVectorcall_Function() was available in Python 3.8. This is half-true - it was available under a different name. I think it's clearer to set the "version added" to 3.9. (cherry picked from commit 0a9b339363a59be1249189c767ed6f46fd71e1c7) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* [3.12] gh-106948: Docs: Disable links for C standard library functions, OS ↵Miss Islington (bot)2023-07-232-3/+3
| | | | | | | | utility functions and system calls (GH-107062) (#107154) (cherry picked from commit b447e19e720e6781025432a40eb72b1cc93ac944) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107113)Miss Islington (bot)2023-07-235-8/+8
| | | | | (cherry picked from commit 08a228da05a7aec937b65eea21f4091fa3c6b5cf) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>