Commit graph

1817 commits

Author SHA1 Message Date
Miss Islington (bot)
088d79e3ee
[3.14] gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664) (#136666)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
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:36:47 +00:00
Miss Islington (bot)
a1ed132a19
[3.14] Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation (GH-135323) (GH-136610)
Docs: Fix and improve the `PyUnstable_Object_EnableDeferredRefcount` documentation (GH-135323)
(cherry picked from commit 0d4fd10fba)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-13 06:52:58 +00:00
Miss Islington (bot)
1346049782
[3.14] gh-136209: Add .. c:var:: declarations for C exception types (GH-136210) (GH-136504)
(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:43 +02:00
Miss Islington (bot)
78e5d109f5
[3.14] gh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914) (GH-136377)
gh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914)

* gh-135913: Document ob_refcnt, ob_type, ob_size

In `typeobj.rst`, instead of `:c:member:` it would be better to
use `.. c:member::` with a `:no-index:` option, see:

See ref. https://www.sphinx-doc.org/en/master/usage/domains/index.html#basic-markup

However, `c:member` currently does not support `:no-index:`.
(cherry picked from commit 73e1207a4e)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-08 08:03:03 +02:00
Miss Islington (bot)
5df4f353ad
[3.14] gh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980) (GH-136370)
* 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-07-07 12:55:20 +02:00
Miss Islington (bot)
42e13b8f8a
[3.14] gh-76595: Add note on PyCapsule_Import behavior (GH-134022) (GH-136074)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
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:08:15 +00:00
Miss Islington (bot)
b99a417a6a
[3.14] Docs: Fix duplicate word typos (GH-135958) (GH-136007)
(cherry picked from commit 34ce1920ca)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-06-27 00:05:53 +00:00
Miss Islington (bot)
349f4c24f9
[3.14] gh-135755: Docs: C API: Document missing PyFunction_GET* macros (GH-135762) (GH-135916)
gh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH-135762)

(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 10:50:56 +02:00
Miss Islington (bot)
f0a330e5fb
[3.14] gh-89488: Add warning about Py_BuildValue("p") needing exact int (GH-135610) (GH-135843)
(cherry picked from commit 6aa0826ed7)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-06-23 10:41:39 +00:00
Miss Islington (bot)
73e2089ed1
[3.14] Docs: Remove unnecessary trailing backslashes (GH-135781) (GH-135791)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Docs: Remove unnecessary trailing backslashes (GH-135781)

This fixes Sphinx's gettext extraction for translations.
(cherry picked from commit 6a16b3c440)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-06-21 13:07:51 +00:00
Miss Islington (bot)
bd24261728
[3.14] Docs: Document PyExceptionClass functions in the C API (GH-135697) (GH-135757)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
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:46 +00:00
Miss Islington (bot)
aee789cf97
[3.14] Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666) (GH-135701)
(cherry picked from commit 140731ff67)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-06-19 09:17:53 +02:00
Miss Islington (bot)
1734b295b3
[3.14] Docs: Fix markups for emphasis (GH-135598) (GH-135685)
Some checks are pending
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
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:39:06 +00:00
Hugo van Kemenade
26d485d122 Python 3.14.0b3 2025-06-17 18:40:54 +03:00
Miss Islington (bot)
0e0ad7b8ff
[3.14] gh-134160: Split extension module init from PyModule docs; emphasize multi-phase init (GH-135126) (#135470)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-16 18:01:09 +03:00
Miss Islington (bot)
98136ddb0e
[3.14] gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337) (#135394)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
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 15:29:46 +00:00
Miss Islington (bot)
725ec53032
[3.14] bpo-45210: Document that error indicator may be set in tp_dealloc (GH-28358) (#135298)
Some checks failed
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
JIT / Interpreter (Debug) (push) Has been cancelled
Tail calling interpreter / aarch64-apple-darwin/clang (push) Has been cancelled
Tail calling interpreter / aarch64-unknown-linux-gnu/gcc (push) Has been cancelled
Tail calling interpreter / x86_64-pc-windows-msvc/msvc (push) Has been cancelled
Tail calling interpreter / x86_64-apple-darwin/clang (push) Has been cancelled
Tail calling interpreter / free-threading (push) Has been cancelled
Tail calling interpreter / x86_64-unknown-linux-gnu/gcc (push) Has been cancelled
JIT / aarch64-pc-windows-msvc/msvc (Debug) (push) Has been cancelled
JIT / i686-pc-windows-msvc/msvc (Release) (push) Has been cancelled
JIT / aarch64-pc-windows-msvc/msvc (Release) (push) Has been cancelled
JIT / i686-pc-windows-msvc/msvc (Debug) (push) Has been cancelled
JIT / aarch64-apple-darwin/clang (Release) (push) Has been cancelled
JIT / aarch64-unknown-linux-gnu/gcc (Release) (push) Has been cancelled
JIT / aarch64-apple-darwin/clang (Debug) (push) Has been cancelled
JIT / aarch64-unknown-linux-gnu/gcc (Debug) (push) Has been cancelled
JIT / x86_64-pc-windows-msvc/msvc (Release) (push) Has been cancelled
JIT / x86_64-pc-windows-msvc/msvc (Debug) (push) Has been cancelled
JIT / x86_64-apple-darwin/clang (Release) (push) Has been cancelled
JIT / x86_64-unknown-linux-gnu/gcc (Release) (push) Has been cancelled
JIT / x86_64-apple-darwin/clang (Debug) (push) Has been cancelled
JIT / x86_64-unknown-linux-gnu/gcc (Debug) (push) Has been cancelled
bpo-45210: Document that error indicator may be set in tp_dealloc (GH-28358)
(cherry picked from commit 8441b263af)

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Co-authored-by: Edward Z. Yang <ezyang@mit.edu>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-06-09 13:01:33 +00:00
Victor Stinner
3d69d18322
[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973) (#134974)
gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973)

Replace most PyUnicodeWriter_WriteUTF8() calls with
PyUnicodeWriter_WriteASCII().

(cherry picked from commit f49a07b531)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-09 14:37:26 +02:00
Miss Islington (bot)
88b5784fc0
[3.14] Docs: Update PyExc_* tables in the c-api documentation (GH-131640) (GH-135220)
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:37 +00:00
Miss Islington (bot)
daf11fca03
[3.14] Fix versionadded directive rendering in c-api/arg.rst (GH-135199) (#135207)
Fix versionadded directive rendering in c-api/arg.rst (GH-135199)
(cherry picked from commit 39859fcac5)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-06-06 12:30:33 +00:00
Miss Islington (bot)
d420d82c63
[3.14] gh-134830: Fix reference in Doc/extending/windows.rst (GH-134831) (GH-135058)
(cherry picked from commit 0ac9e17fb4)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2025-06-03 06:33:04 +00:00
Miss Islington (bot)
7ac461883d
[3.14] Remove newline in Doc/c-api/lifecycle.rst for gettext builder (GH-135013) (GH-135038)
(cherry picked from commit c7051a3669)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-06-02 18:19:54 +00:00
Miss Islington (bot)
f734531bbe
[3.14] gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775) (#134932)
gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775)

(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-05-31 18:41:07 +01:00
Miss Islington (bot)
02712fa848
Doc: remove unnecessary section header (GH-134917)
(cherry picked from commit b367e27af9)
2025-05-30 18:13:36 +09:00
Miss Islington (bot)
2d40dd01fa
[3.14] gh-133260: Remove claim that PyUnicode_InternFromString immortalizes (GH-134213) (GH-134883)
(cherry picked from commit 4109a9c6b3)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-29 13:43:27 +00:00
Miss Islington (bot)
a1b6252c88
[3.14] gh-133678: Document C API third party tools (GH-134526) (#134793)
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:45:08 +00:00
Miss Islington (bot)
b6e624a3fc
[3.14] gh-134160: Use multi-phase init in documentation examples (GH-134296) (#134753)
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:18 +00:00
Miss Islington (bot)
f5a8bfa335
[3.14] Fix sphinx-lint warnings (default-role used). (GH-134647) (#134670)
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:04 +00:00
Miss Islington (bot)
cd3395a8b1
[3.14] gh-132246: Add special buffer methods to C API Type Object docs (gh-132247) (gh-134426)
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:33:35 +02:00
Miss Islington (bot)
6074e1e6c4
[3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344)
gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962)

  * Add "cyclic isolate" to the glossary.
  * Add a new "Object Life Cycle" page.
  * Improve docs for related API, with special focus on cross-references and warnings
(cherry picked from commit 3246ea514d)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-20 19:11:01 +02:00
Miss Islington (bot)
76957eb8cc
[3.14] document Py_VISIT as a macro in the docs (GH-133688) (#134186)
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:34:19 +00:00
Miss Islington (bot)
9f1307afa0
[3.14] Docs: C API: Improve documentation around non-Python threads with subinterpreters (GH-131087) (GH-134130)
Docs: C API: Improve documentation around non-Python threads with subinterpreters (GH-131087)

(cherry picked from commit af6b3b825f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-17 09:04:42 +00:00
Miss Islington (bot)
9ad1516357
[3.14] gh-46236: Document PyUnicode_BuildEncodingMap (GH-133270) (#133769)
gh-46236: Document PyUnicode_BuildEncodingMap (GH-133270)
(cherry picked from commit f34ec09ba5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-09 15:24:59 +00:00
Miss Islington (bot)
9a77637067
[3.14] gh-133644: update Py_InteractiveFlag deprecation notice (GH-133749) (#133751)
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:35 +00:00
Hugo van Kemenade
b092705907 Python 3.14.0b1 2025-05-06 18:33:52 +03:00
Noah Kim
c4bcc6a778
gh-102567: Add -X importtime=2 for logging an importtime message for already-loaded modules (#118655)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-06 01:03:55 +01:00
Peter Bierma
b275b8f342
gh-133140: Add PyUnstable_Object_IsUniquelyReferenced for free-threading (#133144) 2025-05-05 21:01:20 +02:00
Sam Gross
f2379535fe
gh-133164: Add PyUnstable_Object_IsUniqueReferencedTemporary C API (gh-133170)
After gh-130704, the interpreter replaces some uses of `LOAD_FAST` with
`LOAD_FAST_BORROW` which avoid incref/decrefs by "borrowing" references
on the interpreter stack when the bytecode compiler can determine that
it's safe.

This change broke some checks in C API extensions that relied on
`Py_REFCNT()` of `1` to determine if it's safe to modify an object
in-place. Objects may have a reference count of one, but still be
referenced further up the interpreter stack due to borrowing of
references.

This provides a replacement function for those checks.
`PyUnstable_Object_IsUniqueReferencedTemporary` is more conservative:
it checks that the object has a reference count of one and that it exists as a
unique strong reference in the interpreter's stack of temporary
variables in the top most frame.

See also:

* https://github.com/numpy/numpy/issues/28681

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: mpage <mpage@cs.stanford.edu>
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-02 13:24:57 +00:00
Sergey B Kirpichev
ad2f0884b1
gh-130317: Fix test_pack_unpack_roundtrip() and add docs (#133204)
* Skip sNaN's testing in 32-bit mode.
* Drop float_set_snan() helper.
* Use memcpy() workaround for sNaN's in PyFloat_Unpack4().
* Document, that sNaN's may not be preserved by PyFloat_Pack/Unpack API.
2025-05-01 16:20:36 +02:00
Stan Ulbrych
bba14c3e01
gh-46236: Document PyUnicodeIter_Type (GH-132925) 2025-04-29 14:23:06 +02:00
Eric Snow
fe462f5a91
gh-132775: Drop PyUnstable_InterpreterState_GetMainModule() (gh-132978)
We replace it with _Py_GetMainModule(), and add _Py_CheckMainModule(), but both in the internal-only C-API.  We also add _PyImport_GetModulesRef(), which is the equivalent of _PyImport_GetModules(), but which increfs before the lock is released.

This is used by a later change related to pickle and handling __main__.
2025-04-28 12:46:22 -06:00
Petr Viktorin
4ebbfcf30e
gh-87135: Raise PythonFinalizationError when joining a blocked daemon thread (gh-130402)
If `Py_IsFinalizing()` is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them (without timeout)
would block forever.

Raise PythonFinalizationError instead of hanging.

Raise even when a timeout is given, for consistency with trying to join your own thread.

See gh-123940 for a use case: calling `join()` from `__del__`. This is
ill-advised, but an exception should at least make it easier to diagnose.
2025-04-28 15:48:48 +02:00
Serhiy Storchaka
632524a5cb
gh-132987: Support __index__() for "k" and "K" formats in PyArg_Parse (GH-132988) 2025-04-26 17:14:18 +03:00
Victor Stinner
ac5424d6a9
gh-107954: Add audit event to PyConfig_Set() (#132958) 2025-04-25 18:30:39 +02:00
Victor Stinner
070d866567
gh-107954: Allow setting cpu_count in PyConfig_Set() (#132954)
* gh-107954: Allow setting cpu_count in PyConfig_Set()

* Update the doc
2025-04-25 18:29:55 +02:00
Bénédikt Tran
3fa024dec3
gh-132909: handle overflow for 'K' format in do_mkvalue (#132911) 2025-04-25 11:02:57 +00:00
Kuba_Z2
984a314b9f
Fix a grammar error in the Py_ALWAYS_INLINE doc (#129304) 2025-04-24 17:20:48 +03:00
Sergey B Kirpichev
79f7c67bf6
gh-128813: hide mixed-mode functions for complex arithmetic from C-API (#131703) 2025-04-22 14:18:18 +02:00
Stan Ulbrych
5ffb89420c
gh-46236: Add Py_UNICODE_REPLACEMENT_CHARACTER doc (#132706)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-22 14:16:51 +02:00
RUANG (James Roy)
05d0559db0
gh-46236: Add PyUnicode_Resize() doc (#132628)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-22 11:39:04 +02:00