summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-102304: Add links to the Stable ABI and Limited C API docs ↵Adam Turner2023-09-296-25/+38
| | | | | | (#105345) (#105371) (#109901) * Add "limited-c-api" and "stable-api" targets * Rename the "stable-abi-list" target to "limited-api-list"
* [3.11] gh-107298: Document PyMODINIT_FUNC macro (#109236) (#109948)Victor Stinner2023-09-271-0/+24
| | | | | | | | | | | gh-107298: Document PyMODINIT_FUNC macro (#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)
* [3.11] Improve some C API documentation (GH-108768) (GH-108786)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.11] [3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448) ↵Miss Islington (bot)2023-08-251-3/+5
| | | | | | | | | | | | | (#108489) [3.12] gh-108314: PyDict_GetItemString() mentions UTF-8 (GH-108448) gh-108314: PyDict_GetItemString() mentions UTF-8 PyDict_GetItemString(), PyDict_SetItemString() and PyDict_DelItemString() expects a UTF-8 encoding string for the key. (cherry picked from commit 9a225d7d5b0530ee73fa00d4816897997a9eb733) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-107298: Fix numerous ref errors and typos in the C API docs ↵Serhiy Storchaka2023-08-224-6/+16
| | | | | (GH-108258) (#108290) (cherry picked from commit d7202e4879bf4e7e00a69500ddcb3143864139b4)
* [3.11] gh-107298: Fix C API datetime documentation (GH-108034) (#108233)Miss Islington (bot)2023-08-221-14/+57
| | | | | (cherry picked from commit d63972e289e05b0d82e59f32f107312a8b3de7b5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-107298: Fix some references in the C API documentation (GH-108072) ↵Serhiy Storchaka2023-08-171-1/+1
| | | | | (GH-108076) (cherry picked from commit f51f0466c07eabc6177c2f64f70c952dada050e8)
* [3.11] gh-107298: Fix C API Buffer documentation (GH-108011) (#108041)Miss Islington (bot)2023-08-162-10/+14
| | | | | | gh-107298: Fix C API Buffer documentation (GH-108011) (cherry picked from commit c2941cba7a986e6158eebb2a0bf33906dcd78616) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] Docs: Document PyBUF_MAX_NDIM (GH-107865) (#107872)Miss Islington (bot)2023-08-111-3/+7
| | | | | (cherry picked from commit 637f7ff2c60f262659da0334f1cb672bd361f398) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.11] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107753)Eric Snow2023-08-0712-79/+113
| | | | | 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.
* [3.11] Fix the documentation for PyCode_New add qualname parameter ↵da-woods2023-07-301-4/+4
| | | | | | (GH-107186) (#107454) [3.11] Fix the documentation for PyCode_New add `qualname` parameter (GH-107186). (cherry picked from commit f2abeb590dae5918388f91b60b31f040d44218f0)
* [3.11] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) ↵Miss Islington (bot)2023-07-291-0/+6
| | | | | | | (GH-107418) (cherry picked from commit f2d07d3289947d10b065b2bb7670c8fb6b6582f2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) ↵Serhiy Storchaka2023-07-289-26/+39
| | | | | (GH-107381) (cherry picked from commit 983305268e2291b0a7835621b81bf40cba7c27f3)
* [3.11] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) ↵Serhiy Storchaka2023-07-2816-67/+70
| | | | | | | | | | | | | | | | | | | (GH-107377) 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() (cherry picked from commit 8d61a71f9c81619e34d4a30b625922ebc83c561b) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107373)Serhiy Storchaka2023-07-2810-26/+26
| | | | | | (cherry picked from commit 391e03fa05b80d17a14ac88d30c974fa2fa00adb) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-107298: Fix doc references to undocumented modules (GH-107300) ↵Serhiy Storchaka2023-07-284-4/+4
| | | | | | | (GH-107371) (cherry picked from commit 87b39028e5f453a949a1675526c439f6479a04a8) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-107298: Docs: add targets for some :c:member: and :c:macro: ↵Serhiy Storchaka2023-07-272-39/+40
| | | | | | | | references (GH-107316) (GH-107333) 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)
* [3.11] gh-107091: Fix some uses of :attr: role (GH-107318) (GH-107331)Serhiy Storchaka2023-07-276-54/+60
| | | | Fix also formatting of PyMethodDef members. (cherry picked from commit d363eb5b0255c055e7b43f5e2c0847f555e1982e)
* [3.11] gh-107091: Fix some uses of :c:type: role (GH-107138) (GH-107313)Miss Islington (bot)2023-07-262-10/+12
| | | | | (cherry picked from commit 6d5b6e71c87fca7c5c26f5dd8f325087962215cc) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-107091: Fix some uses of :c:member: role (GH-107129) (GH-107311)Serhiy Storchaka2023-07-264-8/+10
| | | (cherry picked from commit af61cb9c7837ff3c11da79e3ee1cab3fdd0ba4da)
* [3.11] Fix PyVectorcall_Function doc versionadded (GH-107140) (#107174)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.11] gh-106948: Docs: Disable links for C standard library functions, OS ↵Erlend E. Aasland2023-07-232-3/+3
| | | | | | | utility functions and system calls (#107062) (#107157) (cherry picked from commit b447e19e720e6781025432a40eb72b1cc93ac944) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-107091: Fix the use of some C domain roles (GH-107092) (GH-107121)Serhiy Storchaka2023-07-235-8/+8
| | | (cherry picked from commit 08a228da05a7aec937b65eea21f4091fa3c6b5cf)
* [3.11] gh-101100: Fix some broken sphinx references (GH-107095). (#107120)wulmer2023-07-234-6/+6
|
* [3.11] gh-106948: Add standard external names to nitpick_ignore (GH-106949) ↵Serhiy Storchaka2023-07-234-10/+10
| | | | | | | (#107061) It includes standard C types, macros and variables like "size_t", "LONG_MAX" and "errno", and standard environment variables like "PATH".. (cherry picked from commit f8b7fe2f2647813ae8249675a80e59c117d30fe1)
* [3.11] gh-106909: Use role :const: for referencing module constants ↵Serhiy Storchaka2023-07-211-1/+1
| | | | | (GH-106910) (GH-106957) (cherry picked from commit 4b9948617f91175783609769aa6160e5b49b9ccc)
* [3.11] gh-106892: Use roles :data: and :const: for referencing module ↵Serhiy Storchaka2023-07-211-3/+3
| | | | | variables (GH-106894) (GH-106955) (cherry picked from commit d036db728ea3d54509cbad06df74e2d9a31fbec8)
* [3.11] gh-106919: Use role :c:macro: for referencing the C "constants" ↵Serhiy Storchaka2023-07-2120-183/+201
| | | | | (GH-106920) (GH-106952) (cherry picked from commit fcc816dbff7ca66c26f57a506e4d2330fe41d0ff)
* [3.11] gh-101100: Docs: Fix references to several numeric dunders ↵Miss Islington (bot)2023-06-303-26/+26
| | | | | | | | | (GH-106278) (#106282) gh-101100: Docs: Fix references to several numeric dunders (GH-106278) (cherry picked from commit a8ae73965b02302b7661ea07a6e4f955a961aca9) Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) ↵Miss Islington (bot)2023-06-242-14/+23
| | | | | | | | | | | | (#106071) gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) Use a note:: tag so that these dict and object API deficiencies show up clearly. A caution:: tag was considered, but our current python docs rendering doesn't do much with that (no box or color change). warning:: seemed too extreme. note looks good. (cherry picked from commit 19d6511b0b8f3f74e668ae32ccef89bcbf1a8a62) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.11] gh-105196: Fix indentations of section headings in C API docs ↵Irit Katriel2023-06-152-5/+5
| | | | | | | (#105672) (#105786) gh-105196: Fix indentations of section headings in C API docs (#105672) Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
* [3.11] gh-105184: document that marshal functions can fail and need to be ↵Miss Islington (bot)2023-06-021-0/+4
| | | | | | | | checked with PyErr_Occurred (GH-105185) (#105219) gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.11] GH-97950: Use new-style index directive ('builtin') (GH-104164) (#104221)Miss Islington (bot)2023-05-0610-25/+25
| | | | | | | | | | | | | | | | | | GH-97950: Use new-style index directive ('builtin') (GH-104164) * Uncomment builtin removal in pairindextypes * Use new-style index directive ('builtin') - C API * Use new-style index directive ('builtin') - Extending * Use new-style index directive ('builtin') - Library * Use new-style index directive ('builtin') - Reference * Use new-style index directive ('builtin') - Tutorial (cherry picked from commit f5088006ca8e9654fbc3de119462f0ab764e408b) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] GH-97950: Use new-style index directive ('object') (GH-104158) (#104159)Miss Islington (bot)2023-05-0419-24/+24
| | | | | | | | | | | | | | | | GH-97950: Use new-style index directive ('object') (GH-104158) * Uncomment object removal in pairindextypes * Use new-style index directive ('object') - C API * Use new-style index directive ('object') - Library * Use new-style index directive ('object') - Reference * Use new-style index directive ('object') - Tutorial (cherry picked from commit 6ab463684b9d79880d98cd1f1406aa86af65985e) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] GH-97950: Use new-style index directive ('module') (GH-103996) (#104154)Adam Turner2023-05-043-13/+13
|
* gh-103883: Doc: Move PyUnicode_FromObject doc (GH-103913)Inada Naoki2023-04-271-9/+9
| | | | | | | | This API is one of Unicode creator APIs. This APIs should not be placed in PEP 393 deprecated APIs. Fixes: gh-103883 (cherry picked from commit ce2383ec6665850a1bdffad388876481b6f3205f)
* [3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and ↵Hugo van Kemenade2023-03-251-0/+10
| | | | asyncio.iscoroutine (#103001)
* [3.11] gh-102595: Document `PyObject_Format` c-api function (GH-102596) ↵Miss Islington (bot)2023-03-221-0/+9
| | | | | | | | | | (GH-102879) (cherry picked from commit 910a64e3013bce821bfac75377cbe88bedf265de) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.hGH-L389 Automerge-Triggered-By: GH:encukou
* gh-101100: Documenting --prefix and --exec-prefix. (GH-102695)Miss Islington (bot)2023-03-152-6/+6
| | | | | | (cherry picked from commit 61b9ff35cbda0cc59816951a17de073968fc25c6) Co-authored-by: Julien Palard <julien@palard.fr> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject *` (GH-102390)Miss Islington (bot)2023-03-031-1/+1
| | | | | (cherry picked from commit 7b9132057d8f176cb9c40e8324f5122a3132ee58) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Fix typo in `Py_GetPythonHome` signature (GH-102168)Miss Islington (bot)2023-02-231-1/+1
| | | | | (cherry picked from commit 9bba8035bd99813203cb3b0de218f9cc3bcdaf2f) Co-authored-by: Tanner Firl <105078804+TannerFirl@users.noreply.github.com>
* gh-101973: Fix parameter reference for PyModule_FromDefAndSpec (GH-101976)Miss Islington (bot)2023-02-171-2/+2
| | | | | (cherry picked from commit a3bb7fbe7eecfae6bf7b2f0912f9b2b12fac8db1) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* GH-101898: Fix missing term references for hashable definition (GH-101899)Miss Islington (bot)2023-02-142-2/+2
| | | | | | Fix missing term references for hashable definition (cherry picked from commit 3690688149dca11589af59b7704541336613199a) Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
* Add missing `versionadded` directive for `PyCode_Addr2Location` (GH-101347)Miss Islington (bot)2023-02-041-0/+2
| | | | | (cherry picked from commit f11a3d1ebe0c78f8c159c63a37022b9b96f720dd) Co-authored-by: Max Bachmann <oss@maxbachmann.de>
* [docs] Mention how to get/set a bigint PyLong via the C API (GH-101270)Miss Islington (bot)2023-01-241-0/+4
| | | | | | | | | We don't need direct C APIs to get at a bigint representation of PyLong but we do want the few people who need to understand how. Additional Author: CAM-Gerlach (cherry picked from commit e244401ce508ad391295beb636e499fcc6797a2a) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* docs: fix `ssizeobjargproc` parameters (GH-100736)Miss Islington (bot)2023-01-041-1/+2
| | | | | (cherry picked from commit 5fb1c08e15b864d8ea9353a0e013166e2e0e2160) Co-authored-by: David Lechner <david@lechnology.com>
* Fix deprecation doc for `PyEval_InitThreads` (GH-100667)Miss Islington (bot)2023-01-021-2/+2
| | | | | (cherry picked from commit 254ab42240e0b18caedd4d5c3f45440bdaebf157) Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
* gh-98712: Clarify "readonly bytes-like object" semantics in C arg-parsing ↵Miss Islington (bot)2022-12-231-19/+35
| | | | | | | docs (GH-98710) (cherry picked from commit 49f6ff719c4e0beeafd6c42edd696601acf72764) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Docs: Use `PY_VERSION_HEX` for version comparison (GH-100179)Miss Islington (bot)2022-12-171-0/+2
| | | | | (cherry picked from commit 0264f634f720fbf12afaf1715a53cd1495fbd85b) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-97909: Fix markup for `PyMethodDef` members (GH-100089)Miss Islington (bot)2022-12-171-16/+17
| | | | | (cherry picked from commit 8edcb30c3f8bdd8099a093146fedbd9b63a3f667) Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>