summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-127253: Note that Stable ABI is about ABI stability (GH-127254) ↵Miss Islington (bot)2024-12-031-3/+11
| | | | | | | (GH-127557) (cherry picked from commit 35d37d6592d1be71ea76042165f6cbfa6c4c3a17) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] Docs: Fix incorrect indents in `c-api/type.rst` (GH-127449) (#127460)Yuki Kobayashi2024-12-011-20/+19
| | | (cherry picked from commit 33ce8dcf791721fea563715f681dc1593a35b83b)
* [3.13] fix param type in PyObject_HasAttrWithError (docs) (GH-127403) (#127404)Miss Islington (bot)2024-11-291-1/+1
| | | | | | fix param type in PyObject_HasAttrWithError (docs) (GH-127403) (cherry picked from commit 3afb639f39e89888194d8e74cc498c8da3a58d8e) Co-authored-by: biggus-developerus <74741815+biggus-developerus@users.noreply.github.com>
* [3.13] Fix macro expansions in critical section docs (GH-127226) (#127229)Miss Islington (bot)2024-11-241-2/+2
| | | | | (cherry picked from commit 2bb7846cacb342246aada5ed92d323e54c946063) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* [3.13] Doc: C API: Fix `Py_NewInterpreterFromConfig` example code ↵Miss Islington (bot)2024-11-231-1/+5
| | | | | | | | (GH-126667) (#127201) Doc: C API: Fix `Py_NewInterpreterFromConfig` example code (GH-126667) (cherry picked from commit e3038e976b25a58f512d8c7083a752c89436eb0d) Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* [3.13] Doc: C API: `PyThreadState::on_delete` was removed in v3.13 ↵Miss Islington (bot)2024-11-201-0/+3
| | | | | | | | (GH-126536) (#127053) Doc: C API: `PyThreadState::on_delete` was removed in v3.13 (GH-126536) (cherry picked from commit 9bca3ef575a088d3330a2743e36423aa5f7bdad8) Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* [3.13] Doc: C API: Demote sections to subsections for consistency ↵Miss Islington (bot)2024-11-071-7/+7
| | | | | | | | | | | (GH-126535) (#126546) Doc: C API: Demote sections to subsections for consistency (GH-126535) The entire file should be a single section; the headings below the first heading should be subsections. (cherry picked from commit e3510bd3dd9ea8f2a30cb1128470aee3a48d8880) Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* [3.13] Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418) ↵Miss Islington (bot)2024-11-051-4/+2
| | | | | | | | (#126431) Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418) (cherry picked from commit 407c0366d9ccd2a36c6cc8bf92324856b16fd604) Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* [3.13] Doc: C API: Move `tp_dealloc` paragraph to `tp_dealloc` section ↵Miss Islington (bot)2024-10-211-11/+13
| | | | | | | | | | | | | | (GH-125737) (#125798) It looks like commit 43cf44ddcce6b225f959ea2a53e4817244ca6054 (gh-31501) accidentally moved the paragraph to the `tp_finalize` section when the intent was to move it to the `tp_dealloc` section (according to the commit message). (cherry picked from commit d880c83ff7fb2e464bc4f469d74cc3fc3eca082c) Co-authored-by: Richard Hansen <rhansen@rhansen.org>
* [3.13] gh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` ↵Miss Islington (bot)2024-10-211-4/+7
| | | | | | | | | | | | deprecation notes (GH-125317) (#125776) gh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes (GH-125317) Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes. (cherry picked from commit 7d88140d5299bd086434840db66ede8ccd01a688) Signed-off-by: y5c4l3 <y5c4l3@proton.me> Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
* [3.13] Doc: Fix typos (GH-125728) (#125773)Miss Islington (bot)2024-10-213-3/+3
| | | | | (cherry picked from commit ded105a62b9d78717f8dc64652e3903190b585dd) Co-authored-by: ember91 <31469580+ember91@users.noreply.github.com>
* [3.13] gh-101291: Add versionadded directives for PyUnstable_Long_* ↵Miss Islington (bot)2024-10-131-0/+5
| | | | | | | | (GH-125384) (#125407) gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384) (cherry picked from commit c6d7b644c2425b397cfb641f336bea70eb8a329a) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.13] gh-101100: Consolidate documentation on `ModuleType` attributes ↵Alex Waygood2024-10-092-23/+25
| | | | | | | | (#124709) (#125208) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Barry Warsaw <barry@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.13] bpo-34206: Improve docs and test coverage for pre-init functions ↵Alyssa Coghlan2024-10-083-69/+146
| | | | | | | | | | | | | | | | | | | | | | | | (GH-8023) (#125092) - move the Py_Main documentation from the very high level API section to the initialization and finalization section - make it clear that it encapsulates a full Py_Initialize/Finalize cycle of its own - point out that exactly which settings will be read and applied correctly when Py_Main is called after a separate runtime initialization call is version dependent - be explicit that Py_IsInitialized can be called prior to initialization - actually test that Py_IsInitialized can be called prior to initialization - flush stdout in the embedding tests that run code so it appears in the expected order when running with "-vv" - make "-vv" on the subinterpreter embedding tests less spammy --------- (cherry picked from commit 7c4b6a68f263320a2dd19cd5ff63b35c964b1fa8) Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.13] gh-70870: Clarify dual usage of 'free variable' (GH-122545) (#125088)Miss Islington (bot)2024-10-081-3/+6
| | | | | | | | | | | | | | | | | The term "free variable" has unfortunately become genuinely ambiguous over the years (presumably due to the names of some relevant code object instance attributes). While we can't eliminate that ambiguity at this late date, we can at least alert people to the potential ambiguity by describing both the formal meaning of the term and the common alternative use as a direct synonym for "closure variable". --------- (cherry picked from commit 27390990fa9306e2a797a4eb2bd83c5bfc7cb186) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.13] gh-124182: Explain naming rules for struct sequence types (GH-124335) ↵Miss Islington (bot)2024-10-071-1/+2
| | | | | | | | (#125057) gh-124182: Explain naming rules for struct sequence types (GH-124335) (cherry picked from commit 3287c834e5370294e310450115290979aac06efa) Co-authored-by: ffelixg <142172984+ffelixg@users.noreply.github.com>
* [3.13] gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` ↵Miss Islington (bot)2024-10-031-1/+1
| | | | | | | | (gh-124920) (#124930) gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920) (cherry picked from commit 9eeb21bf761070649bf8d78976a62dabb6d67a99) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.13] gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386) ↵Miss Islington (bot)2024-09-301-1/+10
| | | | | | | | (#124719) gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386) (cherry picked from commit 425587a110eb214a097c634d4b6d944ac478923e) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] doc: PyUnicode_AsUTF8String() fails if string contains surrogates ↵Miss Islington (bot)2024-09-271-3/+10
| | | | | | | | (GH-124605) (#124707) doc: PyUnicode_AsUTF8String() fails if string contains surrogates (GH-124605) (cherry picked from commit d8cf587dc749cf21eafc1064237970ee7460634f) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] GH-95079: document error behaviour for some unicode C APIs (GH-95080) ↵Miss Islington (bot)2024-09-271-0/+9
| | | | | | | | (#124661) GH-95079: document error behaviour for some unicode C APIs (GH-95080) (cherry picked from commit b79a21ea429844e84509430e636d808ea9cff244) Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
* [3.13] gh-101100: Add a table of class attributes to the "Custom classes" ↵Alex Waygood2024-09-264-22/+24
| | | | section of the data model docs (#124480) (#124556)
* [3.13] gh-123609: Clarify usage of standalone `PyBUF_FORMAT` (GH-123778) ↵Miss Islington (bot)2024-09-241-4/+5
| | | | | | | | (#123903) gh-123609: Clarify usage of standalone `PyBUF_FORMAT` (GH-123778) (cherry picked from commit 962304a54ca79da0838cf46dd4fb744045167cdd) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.13] gh-119802: Update memory management docs for free-threaded build ↵Miss Islington (bot)2024-09-241-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | (gh-124006) (#124054) gh-119802: Update memory management docs for free-threaded build (gh-124006) * gh-119802: Update memory management docs for free-threaded build * nit * nit * Address code review * nit * Update Doc/c-api/memory.rst --------- (cherry picked from commit e6bb1a2b28ac8aed1e1b7f1c74221ca1d02a7235) Co-authored-by: Donghee Na <donghee.na@python.org> Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134) ↵Petr Viktorin2024-09-233-0/+7
| | | | | | | (#124244) gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134) (cherry picked from commit 32119fc377a4d9df524a7bac02b6922a990361dd)
* [3.13] Use pep role instead of url (GH-121611) (#124172)Miss Islington (bot)2024-09-232-4/+4
| | | | | | Use pep role instead of url (GH-121611) (cherry picked from commit 33eeccf6d4f16e483b4c8a180bad718545aeaeaf) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313) (#124334)Adam Turner2024-09-232-9/+39
| | | | | | | | | * [3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313) (cherry picked from commit 9d0a75269c6ae361b1ed5910c3b3424ed93b6f6d) * gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] Swap the and from in sentence in init_config.rst (GH-120086) (#123744)Miss Islington (bot)2024-09-051-1/+1
| | | | Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.13] gh-123517: Remove unnecessary `:meth:` parentheses (gh-123518) ↵Wei-Hsiang (Matt) Wang2024-09-021-2/+2
| | | | (GH-123577)
* [3.13] gh-123492: Remove unnecessary `:func:` parentheses (gh-123493) (#123513)Wei-Hsiang (Matt) Wang2024-08-302-2/+2
|
* [3.13] gh-123254: Improve `tuple` C API docs with more info about errors ↵Miss Islington (bot)2024-08-281-8/+16
| | | | | | | | | (GH-123255) (#123416) gh-123254: Improve `tuple` C API docs with more info about errors (GH-123255) (cherry picked from commit 6f563e364d1a7902417573f842019746a79cdc1b) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.13] GH-109975: Copyedit 3.13 What's New: Release Highlights (GH-122958) ↵Miss Islington (bot)2024-08-131-1/+1
| | | | | | | | | (#122971) GH-109975: Copyedit 3.13 What's New: Release Highlights (GH-122958) (cherry picked from commit db6f5e193315a3bbfa7b0b6644203bae3f76b638) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-122613: Document PyLong_GetInfo() (part of Limited API) ↵Sergey B Kirpichev2024-08-051-0/+11
| | | | | | (GH-122280) (#122645) [3.13] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-GH-122280) (cherry picked from commit d91ac525ef166edc0083acf5a96f81b87324fe7f)
* [3.13] gh-122623: Improve `c-api/bytearray.rst` with error handling info ↵Miss Islington (bot)2024-08-041-2/+7
| | | | | | | | (GH-122624) (#122658) gh-122623: Improve `c-api/bytearray.rst` with error handling info (GH-122624) (cherry picked from commit 151934a324789c58cca9c7bbd6753d735454df5a) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] Docs: spelling and grammar fixes (GH-122084) (#122106)Miss Islington (bot)2024-07-221-2/+2
| | | | | | | | | | | Docs: spelling and grammar fixes (GH-122084) Corrected some grammar and spelling issues in documentation. (cherry picked from commit bc264eac3ad14dab748e33b3d714c2674872791f) Co-authored-by: Ville Skyttä <ville.skytta@iki.fi> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] GH-121970: Rewrite the C-API annotations extension (#121985) (#122027)Adam Turner2024-07-191-2/+4
| | | | | | GH-121970: Rewrite the C-API annotations extension (#121985) Co-authored-by: Petr Viktorin <encukou@gmail.com> (cherry picked from commit 22c9d9c1fcc3bb6186524330b169eda6df450f1b)
* [3.13] gh-121905: Consistently use "floating-point" instead of "floating ↵Serhiy Storchaka2024-07-194-14/+14
| | | | | point" (GH-121907) (GH-122012) (cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
* [3.13] gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep ↵Petr Viktorin2024-07-173-6/+62
| | | | | | | | | | | | | | | | | immortalizing in other API (GH-121364) (GH-121854) * Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs * Document immortality in some functions that take `const char *` This is PyUnicode_InternFromString; PyDict_SetItemString, PyObject_SetAttrString; PyObject_DelAttrString; PyUnicode_InternFromString; and the PyModule_Add convenience functions. Always point out a non-immortalizing alternative. * Don't immortalize user-provided attr names in _ctypes (cherry picked from commit b4aedb23ae7954fb58084dda16cd41786819a8cf)
* [3.13] gh-121834: Improve `complex` C-API docs (GH-121835) (#121895)Miss Islington (bot)2024-07-171-9/+22
| | | | | | | | gh-121834: Improve `complex` C-API docs (GH-121835) (cherry picked from commit 72dccd60735b597e99c007a7b69210763a746877) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-121403: Add notes for PyList_GetXXX APIs about the need for init ↵Miss Islington (bot)2024-07-161-3/+6
| | | | | | | | (gh-121626) (gh-121827) gh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626) (cherry picked from commit 2bac2b86b1486f15038fb246835e04bb1b213cd8) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.13] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` ↵Miss Islington (bot)2024-07-141-1/+1
| | | | | | | (GH-121750) (GH-121752) (cherry picked from commit 26dfb2771236bfd96cdaa1081103f75141ecff47) Co-authored-by: Dominic H <dom@dominic.sk>
* [3.13] gh-121615: Improve `module.rst` C-API docs with better error ↵Miss Islington (bot)2024-07-111-8/+15
| | | | | | | | descriptions (GH-121616) (#121618) gh-121615: Improve `module.rst` C-API docs with better error descriptions (GH-121616) (cherry picked from commit e6264b44dc7221c713b14dfa0f5929b33d362829) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] gh-121567: Improve `slice` C-API docs by mentioning exceptions ↵Miss Islington (bot)2024-07-101-3/+5
| | | | | | | | | (GH-121568) (#121578) gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568) (cherry picked from commit 84a5597b08b7d53aced2fbd0048271ce762807a8) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.13] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions ↵Miss Islington (bot)2024-07-091-3/+6
| | | | | | | | | (GH-121534) (#121539) gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534) (cherry picked from commit 649d5b6d7b04607dd17810ac73e8f16720c6dc78) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (#121440)Miss Islington (bot)2024-07-061-0/+1
| | | | | | [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (cherry picked from commit ada964fba06c0d142b8746d140817ea151314d33) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) ↵Miss Islington (bot)2024-07-031-2/+2
| | | | | | | | (#121309) docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (cherry picked from commit 4232976b02cb999335c6bfdec3315520b21954f2) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* gh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)Miss Islington (bot)2024-06-281-4/+11
| | | | | (cherry picked from commit 2894aa14f22430e9b6d4676afead6da7c79209ca) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.13] gh-120858: PyDict_Next should not lock the dict (GH-120859) (#120964)Miss Islington (bot)2024-06-241-0/+11
| | | | | | | | | | | | PyDict_Next no longer locks the dictionary in the free-threaded build. Locking around individual PyDict_Next calls is not sufficient because the function returns borrowed references and because it allows concurrent modifications during the iteraiton loop. The internal locking also interferes with correct external synchronization because it may suspend outer critical sections created by the caller. (cherry picked from commit 375b723d5873f948696c7e85a97f4778d9e00ff0) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-119344: Make critical section API public (GH-119353) (#120856)Sam Gross2024-06-211-0/+104
| | | | | | | | | | | This makes the following macros public as part of the non-limited C-API for locking a single object or two objects at once. * `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()` * `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()` The supporting functions and structs used by the macros are also exposed for cases where C macros are not available. (cherry picked from commit 8f17d69b7bc906e8407095317842cc0fd52cd84a)
* [3.13] gh-120838: Add a Note in the Docs About Expectations for ↵Miss Islington (bot)2024-06-211-3/+10
| | | | | | | Py_Finalize() (gh-120852) (cherry picked from commit 03fa2df92707b543c304a426732214002f81d671, AKA gh-120839) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-117511: Make PyMutex public in the non-limited API (GH-117731) ↵Sam Gross2024-06-201-0/+43
| | | | | (#120800) (cherry picked from commit 3af7263037de1d0ef63b070fc7bfc2cf042eaebe)