summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> ↵Miss Islington (bot)2022-10-052-2/+2
| | | | | | | | :c:expr:`PyTypeObject*`) (GH-97778) (#97890) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit c70c8b69762f720377adaf22f2e5ec6496a7be53) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (Use `c:struct`) (GH-97772) (#97893)Łukasz Langa2022-10-052-5/+5
| | | | | | Use `c:struct` (cherry picked from commit a0f5599aac2037da715d09733e0a83a9cba7c37a) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type: to :c:expr:, misc. cases) ↵Łukasz Langa2022-10-052-3/+3
| | | | | | | (GH-97775) (#97891) (cherry picked from commit 6b3d4db02edc5883a7e7cbe088711edaef0d9853) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`PyObject` -> ↵Miss Islington (bot)2022-10-059-28/+28
| | | | | | | | :c:expr:`PyObject`) (GH-97776) (#97888) :c:type:`PyObject` -> :c:expr:`PyObject` (cherry picked from commit 0bf6a617ed1832bc4803e532c8d6b3427cf48b13) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`PyInterpreterState *` -> ↵Miss Islington (bot)2022-10-051-1/+1
| | | | | | | | :c:expr:`PyInterpreterState *`) (GH-97777) (#97877) :c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *` (cherry picked from commit 4ebb0250314b57637d213cd5bc5f5ce5dd911d94) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:data:`view->obj` -> ↵Miss Islington (bot)2022-10-051-5/+5
| | | | | | | | :c:expr:`view->obj`) (GH-97773) (#97868) :c:data:`view->obj` -> :c:expr:`view->obj` (cherry picked from commit fa59bda8d30ea0b6c19007205b57c800c944304c) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`TYPE` -> :c:expr:`TYPE`) ↵Miss Islington (bot)2022-10-051-2/+2
| | | | | | | | (GH-97770) (#97870) :c:type:`TYPE` -> :c:expr:`TYPE` (cherry picked from commit 8b211b4cdbcddecfcc4d1682864795b5f1438c59) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`FILE` -> :c:expr:`FILE`) ↵Miss Islington (bot)2022-10-053-8/+8
| | | | | | | | (GH-97769) (#97872) :c:type:`FILE` -> :c:expr:`FILE` (cherry picked from commit 192d401ba53224020f5f9ca6e1ff2c9f89511ac4) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`PyTupleObject*` -> ↵Miss Islington (bot)2022-10-041-1/+1
| | | | | | | | :c:expr:`PyTupleObject*`) (GH-97780) (#97864) :c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*` (cherry picked from commit 510baa429affb832d7b4ed68182e59daa2815d2e) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`PyBytesObject*` -> ↵Miss Islington (bot)2022-10-041-1/+1
| | | | | | | | :c:expr:`PyBytesObject*`) (GH-97782) (#97862) :c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*` (cherry picked from commit 9ebc50866b58a0ee2985c6540a67fee8a4a49e4d) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:`PyUnicodeObject*` -> ↵Miss Islington (bot)2022-10-041-1/+1
| | | | | | | | :c:expr:`PyUnicodeObject*`) (GH-97783) (#97860) :c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*` (cherry picked from commit 898834e27b82bd1f3532b6448a862a7a9cdeff66) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-93738: Documentation C syntax (:c:data:`0` -> ``0``) (GH-97771)Miss Islington (bot)2022-10-041-1/+1
| | | | | | :c:data:`0` -> ``0`` (cherry picked from commit 5e997cff3e1dea24241726338457611beb8882ec) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)Miss Islington (bot)2022-08-301-3/+6
| | | | | | It is now deprecated and the docs should reflect that. (cherry picked from commit 9625de6fab4597bcd04ec390b680b053b0533816) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* Clarify API stability of PyTypeObject in relation to static types. (GH-96217)Miss Islington (bot)2022-08-251-3/+3
| | | | | | | | | | Fixes: https://github.com/python/cpython/issues/95300 Related: https://github.com/python/cpython/issues/91271 (cherry picked from commit caa2a9799a47294441e4206037620322eea9ed06) Co-authored-by: ov2k <ov2k.github@gmail.com>
* gh-90359: Unify documentation style for datetime.rst (gh-94836)Miss Islington (bot)2022-07-141-0/+7
| | | | | (cherry picked from commit 967da5febbc77b36a5b14863e61db3a2d441a940) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* gh-90359: Update documentation to follow PEP 495. (gh-94800)Miss Islington (bot)2022-07-141-0/+12
| | | | | (cherry picked from commit 07374cce52abb7fd39729dc1b646ca3029b64c64) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [3.10] Docs: remove redundant "adverb-adjective" hyphens from compound ↵Łukasz Langa2022-07-055-6/+6
| | | | | | | | modifiers (GH-94551) (GH-94558) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021 (cherry picked from commit 3440d197a55800ecceea3e115e44b4262411359c) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [doc] fix typo in reference to tp_descr_get and tp_descr_set (GH-94140)Miss Islington (bot)2022-06-261-2/+2
| | | | | (cherry picked from commit 32d595fdcd4be8e1f41dcfe84ccf4de89fea3c3f) Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
* gh-87961: Remove outdated notes from functions that aren't in the Limited ↵Miss Islington (bot)2022-06-103-26/+0
| | | | | | | | | | | | API (GH-93581) (GH-93605) Nowadays everything that *is* in the Limited API has a note added automatically. These notes could mislead people to think that these functions could never be added to the limited API. Remove them. (cherry picked from commit 2c3fe5eeb2b64deb2132d9259e74b521c14fd92d) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Doc: Update references and examples of old, unsupported OSes and uarches ↵Miss Islington (bot)2022-06-091-3/+2
| | | | | | | (GH-92791) (GH-93639) (cherry picked from commit a5ba0f4ebca5020f6c77718a20663e0ac6e194ac) Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-91755: Document Py_IncRef and Py_DecRef as C functions (GH-91805)Miss Islington (bot)2022-05-181-4/+10
| | | | | | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 58a3d28039863b014f57a1ac93b51e20920ebe7b) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
* Document Py_ssize_t. (GH-92512)Miss Islington (bot)2022-05-138-22/+29
| | | | | | | | | It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But there's 8182 errors left. Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit 664aa94b570a4a8f3535efb2e3d638a4ab655943) Co-authored-by: Julien Palard <julien@palard.fr>
* [3.10] GH-92431: Fix footnotes in Doc/c-api/exceptions.rst (GH-92432) ↵Miss Islington (bot)2022-05-081-11/+11
| | | | | | | | | | | | | (GH-92470) * Remove redundant footnote ref: the footnote has been removed * Fix footnote ref to match footnote * Convert footnotes into reST footnotes: will error if missing (cherry picked from commit 788ef54bc94b0a7aa2a93f626e4067ab8561424c) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Automerge-Triggered-By: GH:serhiy-storchaka
* gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (GH-92048) (#92330)Miss Islington (bot)2022-05-061-1/+1
| | | | | | | (cherry picked from commit 43b135f94ebf3e6e84ddb0f75ed8510b96a610e4) Co-authored-by: Robert Howlett <robert@howletts.org.uk> Co-authored-by: Robert Howlett <robert@howletts.org.uk>
* Document the lifetime of `PyUnicode_AsUTF8String` (GH-92325)Miss Islington (bot)2022-05-061-1/+2
| | | | | | The current wording implied this, but didn't state it explicitly. (cherry picked from commit 740da8d37a84638f4a8893bee3648f36fc6beb0f) Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
* [3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings ↵Oleg Iarygin2022-04-191-4/+4
| | | | | | | | | (GH-31769) (#91662) Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit a573cb2fec664c645ab744658d7e941d72e1a398) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* c-api docs: There are five fields, not four (GH-32379)Miss Islington (bot)2022-04-071-1/+1
| | | | | (cherry picked from commit 4c92427fb85e420404a9bd26347e32acc1bbd3b7) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.10] More minor fixes to C API docs (GH-31525) (GH-32258)Jelle Zijlstra2022-04-0213-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wording fixes in type.rst * grammar and punctuation in sys.rst * set: grammar fixes * structures: capitalization fix * grammar fixes for sequence * objects: point to Py_TYPE instead of direct object access * numbers: add more explicit Python equivalences * method: add missing period * memory: grammar fix * mapping: grammar fixes * long: grammar fix * iter: fix grammar for PyAIter_Check * init: grammar fix. (cherry picked from commit 897bc6f9282238d5fb32d232ab62d30675244736) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* More minor fixes to C API docs (GH-31714)Miss Islington (bot)2022-04-025-11/+9
| | | | | | | | | | * init_config: wording fixes * bytearray: remove XXX, there is a good link to the buffer docs * bytes, call, exceptions: minor wording fixes (cherry picked from commit 677a87946630c5fbd9998969669b4dd4f4b32545) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Add missing "to" to two tp_flags notes (GH-31624)Miss Islington (bot)2022-03-011-2/+2
| | | | | (cherry picked from commit 422fdb37172c145043d4f1276adad43ff375f0d5) Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
* bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535)Miss Islington (bot)2022-02-231-2/+2
| | | | | | | Fix PyFrame_GetBack() and PyFrame_GetCode() return type in the documentation. (cherry picked from commit 78859e58e4e016286e648d1dc155e0f6cebfa6ff) Co-authored-by: Victor Stinner <vstinner@python.org>
* Minor fixes to C API docs (GH-31501)Miss Islington (bot)2022-02-234-24/+28
| | | | | | | | | | | | | | | | | | | * C API docs: move PyErr_SetImportErrorSubclass docs It was in the section about warnings, but it makes more sense to put it with PyErr_SetImportError. * C API docs: document closeit argument to PyRun_AnyFileExFlags It was already documented for PyRun_SimpleFileExFlags. * textual fixes to unicode docs * Move paragraph about tp_dealloc into tp_dealloc section * __aiter__ returns an async iterator, not an awaitable (cherry picked from commit 43cf44ddcce6b225f959ea2a53e4817244ca6054) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* no-issue: Fix documentation typos. (GH-30576)Miss Islington (bot)2022-01-211-1/+1
| | | | | (cherry picked from commit d05a66339b5e07d72d96e4c30a34cc3821bb61a2) Co-authored-by: Piotr Fusik <piotr@fusik.info>
* bpo-22039: [doc] clarify that there are no plans to disable deleting an ↵Miss Islington (bot)2022-01-191-2/+3
| | | | | | | | | attribute via PyObject_SetAttr (GH-30639) (GH-30684) (cherry picked from commit 3bf6315c4cabf72d64e65e6f85bf72c65137255a) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match ↵Miss Islington (bot)2022-01-111-17/+17
| | | | | | | the current source code (GH-30387) (cherry picked from commit 43c5c1369cb21f08a1dc1d63923c3586b883e3e8) Co-authored-by: Julian Gilbey <julian-git@d-and-j.net>
* [3.10] bpo-45250: fix docs regarding `__iter__` and iterators being ↵Brett Cannon2021-11-222-13/+14
| | | | | | | | inconsistently required by CPython (GH-29170) (GH-29650) It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`. (cherry picked from commit be36e0634060c7d5dee8e8876fb888bbb53d992a) Co-authored-by: Brett Cannon <brett@python.org>
* [3.10] bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() ↵Sam Gross2021-10-282-8/+20
| | | | | | | | | | (GH-29246) (GH-29249) Objects that support garbage collection ("container" objects) should call PyObject_GC_UnTrack() from their destructors before clearing any fields which may point to other "container" objects. (cherry picked from commit 35e1ff38ee67ee543d9fcb268c3552c5397f9b3f) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.10] [doc] Fix typos found using codespell (GH-28744) (GH-28758)Christian Clauss2021-10-062-3/+3
|
* bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523)Miss Islington (bot)2021-09-231-3/+3
| | | | | | | | | | Replace old names when they refer to actual versions of macOS. Keep historical names in references to older versions. Co-authored-by: Patrick Reader <_@pxeger.com> (cherry picked from commit 36122e18148c5b6c78ebce1d36d514fd7cf250f5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] Fix minor typo in Doc/c-api/type.rst (GH-28432) (GH-28440)Miss Islington (bot)2021-09-181-1/+1
| | | | | | | | | retreived-> retrieved (cherry picked from commit af08f1ba40505bf1380c08b57ba4e0b8969a8358) Co-authored-by: Konstantin Popov <konst.hardy@gmail.com> Automerge-Triggered-By: GH:Fidget-Spinner
* docs: correct references to __isub__ etc (GH-28297)Miss Islington (bot)2021-09-161-132/+132
| | | | | (cherry picked from commit 800bd01b6d365156403c3dde61765dc5fdbf64be) Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194) ↵Miss Islington (bot)2021-09-072-2/+2
| | | | | | | (GH-28199) Fix PyAiter_Check to only check for the `__anext__` presense (not for `__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`, `PyObject_GetAiter()` -> `PyObject_GetAIter()`.
* [doc] Fix typo c-api/exceptions.rst (GH-27847)Miss Islington (bot)2021-08-231-1/+1
| | | | | | Co-authored-by: Tianqing Peng <pengtianqing@yimian.com.cn> (cherry picked from commit dcbf7ff6a700b63e637a0445d68866670a398024) Co-authored-by: Sunny Bean <ptq008@gmail.com>
* Note that tp_clear and m_clear are not always called (GH-27581)Miss Islington (bot)2021-08-042-0/+12
| | | | | (cherry picked from commit 10faada709561663d6b1f623d308ff45e3808cca) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-41886: Fix documented type of PyType_Type (GH-22454)Miss Islington (bot)2021-08-031-1/+1
| | | | | (cherry picked from commit ac811f9b5a68ce8756911ef2c8be83b46696018f) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* Document PyMember_GetOne and PyMember_SetOne (GH-27555)Miss Islington (bot)2021-08-021-0/+15
| | | | | (cherry picked from commit d382bde220b4c07cce2b924ffeb7525ea1a969f4) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-41103: Resurrect the old buffer protocol. (GH-27437) (GH-27441)Miss Islington (bot)2021-07-292-0/+56
| | | | | | | | Revert "bpo-41103: Remove old buffer protocol support (GH-21117)" This reverts commit 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed. (cherry picked from commit ce5e1a6809b714eb0383219190a076d9f883e008) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-43565: Document PyUnicode_KIND's return type as an unsigned int ↵Miss Islington (bot)2021-07-291-1/+1
| | | | | | | (GH-25724) (GH-27439) (cherry picked from commit 47fd4726a2ce8599cc397ddeae40f70eb471e868) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make ↵Miss Islington (bot)2021-07-231-10/+1
| | | | | | | | | | | | | | | Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306) * Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG The field is always present in the type struct, as explained in the added comment. * Remove Py_TPFLAGS_HAVE_AM_SEND The flag is not needed, and since it was added in 3.10 it can be removed now. (cherry picked from commit a4760cc32d9e5dac7be262e9736eb30502cd7be3) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Fix a small typo in the docs (GH-26991) (GH-27003)Miss Islington (bot)2021-07-031-1/+1
| | | | | | | (cherry picked from commit a79e2b6497f7d31017c01a41a290a9b3349398fe) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com> Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>