Commit graph

1726 commits

Author SHA1 Message Date
Miss Islington (bot)
b8910fc444
[3.13] Docs: avoid informal formulation in Doc/c-api/conversion.rst (GH-140898) (#140913)
Docs: avoid informal formulation in `Doc/c-api/conversion.rst` (GH-140898)
(cherry picked from commit 173cc53d9f)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-11-02 13:57:03 +00:00
Miss Islington (bot)
6ba31ca5d5
[3.13] Docs: fix some grammatical errors in Doc/c-api/dict.rst (GH-140899) (#140902)
Docs: fix some grammatical errors in `Doc/c-api/dict.rst` (GH-140899)
(cherry picked from commit d12cbf2865)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-11-02 08:39:12 +00:00
Miss Islington (bot)
134e2f8d7f
[3.13] Docs: Replace "encoder" with "decoder" in Doc/c-api/codec.rst (GH-140613) (#140662)
Docs: Replace "encoder" with "decoder" in `Doc/c-api/codec.rst` (GH-140613)
(cherry picked from commit d12086e822)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-10-27 09:51:34 +00:00
Miss Islington (bot)
d64b05b284
[3.13] Docs: Fix a grammatical error in Doc/c-api/codec.rst (GH-140612) (#140617)
Docs: Fix a grammatical error in `Doc/c-api/codec.rst` (GH-140612)
(cherry picked from commit 33b2ca80bb)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-10-26 09:45:42 +00:00
Miss Islington (bot)
df86b18f7f
[3.13] Fix typo in Doc/c-api/code.rst (GH-140586) (#140592)
Fix typo in `Doc/c-api/code.rst` (GH-140586)
(cherry picked from commit d74a96366d)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-10-25 15:43:00 +00:00
Miss Islington (bot)
01cab860c0
[3.13] Docs: Fix a grammatical error in Doc/c-api/capsule.rst (GH-140577) (GH-140581)
Docs: Fix a grammatical error in `Doc/c-api/capsule.rst` (GH-140577)

"who" -> "which"
(cherry picked from commit 4ad599501f)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-10-25 14:03:25 +00:00
Miss Islington (bot)
5c99b6c576
[3.13] Document that PyModule_GetDef can return NULL with or without setting an exception (GH-140529) (GH-140546)
(cherry picked from commit 289360ae63)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-24 13:37:09 +00:00
Miss Islington (bot)
7564125ed1
[3.13] Docs: Fix a grammatical error in Doc/c-api/arg.rst (GH-140525) (GH-140539)
Docs: Fix a grammatical error in `Doc/c-api/arg.rst` (GH-140525)

"have" -> "has"
(cherry picked from commit fc2e23c2ed)

Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
2025-10-24 12:24:41 +00:00
Miss Islington (bot)
278384150a
[3.13] gh-107073: fix relevant typo in PyObject_ClearManagedDict (GH-140032) (#140034)
gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (GH-140032)
(cherry picked from commit 52996aaa78)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-10-13 11:29:41 +00:00
Stan Ulbrych
d12bd1ba1a
[3.13] gh-101100: Fix reference warnings in c-api/init.rst document… (#139833)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-09 18:20:34 +03:00
Thomas Wouters
a15ae614de Python 3.13.8 2025-10-07 14:01:51 +02:00
Miss Islington (bot)
0114bbe43a
[3.13] Document that PyInterpreterState_GetDict returns a borrowed reference (GH-139451) (#139464)
Document that `PyInterpreterState_GetDict` returns a borrowed reference (GH-139451)
(cherry picked from commit 80cdf3ef74)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-01 11:26:39 +05:30
Miss Islington (bot)
24b699231b
[3.13] Document Py_AddPendingCall() change with subinterpreters in 3.12 (GH-139117) (GH-139119)
Document `Py_AddPendingCall()` change with subinterpreters in 3.12 (GH-139117)

Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state, and they were scheduled for any interpreter. In GH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter.
(cherry picked from commit 89ff88be89)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-09-18 12:17:06 +00:00
Miss Islington (bot)
8ef549069c
[3.13] gh-129368: In PyRun C API docs, clarify what a "start token" is (GH-129935) (#139043)
(cherry picked from commit e1eca8b308)

Co-authored-by: Rajhans Jadhao <rajhans.jadhao@gmail.com>
2025-09-17 17:05:29 +01:00
Miss Islington (bot)
282bd0fe98
[3.13] Add impl-detail block for PyLong_FromLong docs (GH-126422) (#138695)
Add impl-detail block for PyLong_FromLong docs (GH-126422)
(cherry picked from commit fd2e3d1633)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-09-09 09:30:44 +00:00
Miss Islington (bot)
7e0dfe5ba6
[3.13] gh-138644: Update c-api docs of PyInterpreterState about PEP-684 (GH-138651) (#138658)
gh-138644: Update c-api docs of `PyInterpreterState` about PEP-684 (GH-138651)
(cherry picked from commit 4f0c267b40)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-09-08 13:52:45 +00:00
Miss Islington (bot)
0a72696f45
[3.13] enhance docs for critical sections (GH-137334) (#138168)
enhance docs for critical sections (GH-137334)
(cherry picked from commit 5ae8b97f6b)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-26 17:26:09 +00:00
Gregory P. Smith
9face218e7
[3.13] gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805) (GH-137827)
* [3.13] gh-87135: Hang non-main threads that attempt to acquire the GIL during finalization (GH-105805)

Instead of surprise crashes and memory corruption, we now hang threads that attempt to re-enter the Python interpreter after Python runtime finalization has started. These are typically daemon threads (our long standing mis-feature) but could also be threads spawned by extension modules that then try to call into Python. This marks the `PyThread_exit_thread` public C API as deprecated as there is no plausible safe way to accomplish that on any supported platform in the face of things like C++ code with finalizers anywhere on a thread's stack. Doing this was the least bad option.

(cherry picked from commit 8cc5aa47ee)

Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>

* state "3.13.7 and earlier"
* backport: do not add the deprecated marker
* fix Py_IsFinalizing doc ref

---------

Co-authored-by: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
2025-08-17 09:08:14 -07:00
Miss Islington (bot)
0c8c7fb2dc
[3.13] Fix documentation of hash in PyHash_FuncDef (GH-137595) (#137643)
Fix documentation of hash in PyHash_FuncDef (GH-137595)

Because of a small typo, it wasn't showing up in the generated docs.
(cherry picked from commit 70218b4008)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-08-11 11:25:13 +00:00
Petr Viktorin
3b28cb0f3f
[3.13] gh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980) (GH-136371)
* Turn the __future__ table to list-table.
  This'll make it easier to add entries that need longer markup
* Semantic markup for __future__ feature descriptions.
* Document CO_* C macros.
(cherry picked from commit 2468aafe98)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-08-02 16:19:20 +02:00
Miss Islington (bot)
c99fad72a1
[3.13] Doc/c-api/memory.rst: extend --without-pymalloc doc with ASan information (GH-136790) (#136799)
Extends the documentation for disabling pymalloc with the `--without-pymalloc` flag regarding why it is worth to use it when enabling AddressSanitizer for Python build (which is done, e.g., in CPython's CI builds).


(cherry picked from commit d19bb44713)

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-20 10:55:40 +02:00
Miss Islington (bot)
592a31369e
[3.13] gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664) (#136667)
gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664)
(cherry picked from commit e4654e0b3e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-07-15 05:37:55 +00:00
Miss Islington (bot)
15e9c3bc51
[3.13] gh-136209: Add .. c:var:: declarations for C exception types (GH-136210) (GH-136503)
(cherry picked from commit 85bc89f35f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-07-10 15:10:51 +02:00
Miss Islington (bot)
a2f1d22a36
[3.13] gh-76595: Add note on PyCapsule_Import behavior (GH-134022) (GH-136075)
gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)
(cherry picked from commit 579acf4562)

Co-authored-by: Nicolas Trangez <ikke@nicolast.be>
2025-06-28 13:07:42 +00:00
Brian Schubert
cee66dd2a0
[3.13] Docs: Fix duplicate word typos (GH-135958) (GH-136008)
(cherry picked from commit 34ce1920ca)
2025-06-26 20:13:46 -04:00
Miss Islington (bot)
c344aad655
[3.13] gh-135755: Docs: C API: Document missing PyFunction_GET* macros (GH-135762) (GH-135917)
(cherry picked from commit ca87a47b3d)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-06-25 08:51:58 +00:00
Miss Islington (bot)
c6e26ef881
[3.13] Docs: Document PyExceptionClass functions in the C API (GH-135697) (GH-135758)
Docs: Document `PyExceptionClass` functions in the C API (GH-135697)

* Docs: Document `PyExceptionClass_Name`

`PyExceptionClass_Name` is an undocumented function in the limited API.

* Document `PyExceptionClass_Check`
(cherry picked from commit 59963e866a)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-06-20 14:03:10 +00:00
Miss Islington (bot)
773ca09caa
[3.13] Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666) (GH-135702)
(cherry picked from commit 140731ff67)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-06-19 09:18:00 +02:00
Miss Islington (bot)
dfe0e30c80
[3.13] Docs: Fix markups for emphasis (GH-135598) (GH-135686)
Docs: Fix markups for emphasis (GH-135598)

The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
(cherry picked from commit 46c60e0d0b)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-06-18 17:44:43 +00:00
Miss Islington (bot)
d24d925ab7
[3.13] gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337) (#135395)
gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337)
(cherry picked from commit b706ff003c)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-06-11 17:32:42 +02:00
Miss Islington (bot)
b250035384
[3.13] Docs: Update PyExc_* tables in the c-api documentation (GH-131640) (GH-135221)
Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640)

Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
(cherry picked from commit f00512db20)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-06-06 15:57:52 +00:00
Miss Islington (bot)
d446dbc68b
[3.13] gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775) (GH-134983)
(cherry picked from commit eb145fabbd)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-06-04 14:50:54 +02:00
Miss Islington (bot)
7fdc829bc2
Doc: remove unnecessary section header (GH-134917)
(cherry picked from commit b367e27af9)
2025-05-30 18:14:00 +09:00
Miss Islington (bot)
a9ba2ecae5
[3.13] gh-133260: Remove claim that PyUnicode_InternFromString immortalizes (GH-134213) (GH-134884)
(cherry picked from commit 4109a9c6b3)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-29 13:44:00 +00:00
Miss Islington (bot)
d6e4786937
[3.13] gh-133678: Document C API third party tools (GH-134526) (#134792)
gh-133678: Document C API third party tools (GH-134526)
(cherry picked from commit c3c88064f5)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Steve Dower <steve.dower@python.org>
2025-05-27 15:44:44 +00:00
Miss Islington (bot)
480f02dafa
[3.13] gh-134160: Use multi-phase init in documentation examples (GH-134296) (#134754)
gh-134160: Use multi-phase init in documentation examples (GH-134296)
(cherry picked from commit 96905bdd27)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-26 21:50:19 +00:00
Miss Islington (bot)
f331d03e88
[3.13] Fix sphinx-lint warnings (default-role used). (GH-134647) (#134669)
Fix sphinx-lint warnings (default-role used). (GH-134647)
(cherry picked from commit 24a47155d2)

Co-authored-by: Julien Palard <julien@palard.fr>
2025-05-25 19:29:38 +00:00
Miss Islington (bot)
bc60b33745
[3.13] gh-132246: Add special buffer methods to C API Type Object docs (gh-132247) (gh-134427)
Two special methods, __buffer__ and __release_buffer__ were added to
Python 3.12 by PEP 688. The C API Type Object documentation for slots
includes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`
but does not refer to the Python Data Model version of those. Add the
missing references.
(cherry picked from commit b529b60fc2)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 16:34:13 +02:00
Peter Bierma
8d92823eca
[3.13] Docs: C API: Fix the incorrect PyThreadState_Swap documentation (#133900) 2025-05-19 18:24:00 +05:30
Miss Islington (bot)
018ec634f6
[3.13] document Py_VISIT as a macro in the docs (GH-133688) (#134187)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-05-18 16:36:04 +00:00
Stan Ulbrych
78a04b3300
[3.13] gh-46236: Document PyUnicode_BuildEncodingMap (#133770) 2025-05-13 19:23:43 -04:00
Miss Islington (bot)
a98d46a9aa
[3.13] gh-133644: update Py_InteractiveFlag deprecation notice (GH-133749) (#133752)
gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749)
(cherry picked from commit 3ed8d6fdd1)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-09 13:48:58 +00:00
Miss Islington (bot)
679e632c5e
[3.13] gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249) (#132282)
gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249)
(cherry picked from commit 8421b648e9)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-01 12:09:33 +01:00
Stan Ulbrych
ff4134603a
[3.13] gh-46236: Document PyUnicodeIter_Type (GH-132925) (GH-133149)
gh-46236: Document `PyUnicodeIter_Type` (GH-132925)

(cherry picked from commit bba14c3e01)

# Conflicts:
#	Doc/c-api/unicode.rst
2025-04-29 18:11:31 +02:00
Bénédikt Tran
7ebfc6ec5e
[3.13] gh-132909: handle overflow for 'K' format in do_mkvalue (GH-132911) (#132932)
(cherry picked from commit 3fa024dec3)
2025-04-25 12:44:53 +00:00
Miss Islington (bot)
52e0f564d0
[3.13] Fix a grammar error in the Py_ALWAYS_INLINE doc (GH-129304) (#132877)
Co-authored-by: Kuba_Z2 <77853483+KubaZ2@users.noreply.github.com>
2025-04-24 14:27:41 +00:00
Victor Stinner
866b6359e5
[3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#132521)
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)

(cherry picked from commit 8768df2fe9)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-04-14 16:48:40 +00:00
Miss Islington (bot)
244a642443
[3.13] Fix a typo in c-api/typeobj.rst (GH-132317) (#132464)
Fix a typo in c-api/typeobj.rst (GH-132317)
(cherry picked from commit f69b344e09)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-04-13 07:24:46 +00:00
Miss Islington (bot)
1884a3bbd1
[3.13] Docs: Fix specifications of gcvisitobjects_t (GH-132433) (#132441)
Docs: Fix specifications of `gcvisitobjects_t` (GH-132433)

`gcvisitobjects_t` callbacks should return 1 for the iteration to continue instead of 0.
(cherry picked from commit 1e5798e372)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-04-12 15:42:26 +00:00
Thomas Wouters
6280bb5478 Python 3.13.3 2025-04-08 15:54:08 +02:00