summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] gh-98154: Clarify Usage of "Reference Count" In the Docs (#107754)Eric Snow2023-08-1112-75/+110
|
* [3.10] gh-105184: document that marshal functions can fail and need to be ↵Miss Islington (bot)2023-06-051-0/+4
| | | | | | | checked with PyErr_Occurred (GH-105185) (#105220) (cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.10] gh-101100: Document PyObject_ClearWeakRefs and gzip's name (#103002)Hugo van Kemenade2023-03-251-0/+10
|
* gh-102595: Document `PyObject_Format` c-api function (GH-102596)Miss Islington (bot)2023-03-221-0/+9
| | | | | | (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
* 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>
* 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>
* [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>
* 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>
* 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>
* gh-99249: Clarify "read-only" slots tp_bases & tp_mro (GH-99342)Miss Islington (bot)2022-11-281-6/+25
| | | | | | | | | | | | | | | | | | | | These slots are marked "should be treated as read-only" in the table at the start of the document. That doesn't say anything about setting them in the static struct. `tp_bases` docs did say that it should be ``NULL`` (TIL!). If you ignore that, seemingly nothing bad happens. However, some slots may not be inherited, depending on which sub-slot structs are present. (FWIW, NumPy sets tp_bases and is affected by the quirk -- though to be fair, its DUAL_INHERIT code probably predates tp_bases docs, and also the result happens to be benign.) This patch makes things explicit. It also makes the summary table legend easier to scan. (cherry picked from commit 219696abb240607d3f807853c4c180825e60716e) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* Doc: Replace question mark with fullstop (GH-99558)Miss Islington (bot)2022-11-181-1/+1
| | | | | | | The sentence "Set the LC_CTYPE locale to the user preferred locale." should end with a period instead of a question mark. (cherry picked from commit 0e09d2cc59cad61ad6a7a79aade52e9a2cfa7b34) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.10] gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION ↵Miss Islington (bot)2022-11-071-0/+11
| | | | | | | | | | | | inheritance (GH-99002) (GH-99213) gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002) The flag is not inherited, but its effect -- a NULL tp_new -- is. Drop hints for people who come here wanting to “disallow instantiation”. (cherry picked from commit 1438b779971605e516bd0a4051a704d6ffbbd58d) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-96997: Clarify the contract of PyMem_SetAllocator() (GH-98977)Miss Islington (bot)2022-11-021-0/+21
| | | | | (cherry picked from commit c053284e3930027847d5adf99efcb1aa5ccbacd1) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.10] Docs: Fix backtick errors found by sphinx-lint (GH-97998) (#98373)C.A.M. Gerlach2022-10-172-2/+2
| | | | | | | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>. (cherry picked from commit fa2d43e5184f5eaf3391844ec2400342a1b2ead4) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Fix types in buffer/memoryview docs (GH-98118)Miss Islington (bot)2022-10-102-2/+2
| | | | | | | | | | | The definition of obj in the `Py_buffer` struct is as a PyObject* https://github.com/python/cpython/blob/ec091bd47e2f968b0d1631b9a8104283a7beeb1b/Include/pybuffer.hGH-L22 PyMemoryView_GET_BASE returns `.obj` - thus its return type should be a PyObject* (or at least a void*). It definitely doesn't return `Py_buffer` (cherry picked from commit c459fedf7cfd5dadf72e088d789c7375b3a6e093) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* Add a warning message about PyOS_snprintf (GH-95993)Miss Islington (bot)2022-10-071-1/+2
| | | | | (cherry picked from commit c7b220499662f0c7a4cae51e33372f92ca7b1ee9) Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* [3.10] gh-93738: Disallow pre-v3 syntax in the C domain (GH-97962) (#97977)Łukasz Langa2022-10-061-6/+6
| | | | | | | Also, disable using invalid sphinx-lint 0.6.2. (cherry picked from commit f612565bd32d4ab0945798da775eea070f08b6fe) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C ↵Łukasz Langa2022-10-0514-112/+112
| | | | | | | | | | | type>) (GH-97768) (#97925) :c:type:`<C type>` -> :c:expr:`<C type>` Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 0031e62973801d34a9e19ab7bb199e9668e32d7b) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.10] gh-93738: Documentation C syntax (Function glob patterns -> literal ↵Miss Islington (bot)2022-10-055-14/+14
| | | | | | | | markup) (GH-97774) (#97911) (cherry picked from commit 0e72606dd4cf3023a4f8c2fe3c58082592b253f7) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [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>