]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Thu, 6 Nov 2025 16:45:31 +0000 (17:45 +0100)]
[3.14] gh-141004: Document `Py_GetRecursionLimit` and `Py_SetRecursionLimit` (GH-141151) (GH-141156)
gh-141004: Document `Py_GetRecursionLimit` and `Py_SetRecursionLimit` (GH-141151)
(cherry picked from commit
0b260305d302eace7d59931ca582a1953d894018 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Stan Ulbrych [Thu, 6 Nov 2025 16:20:03 +0000 (16:20 +0000)]
[3.14] gh-140939: Fix memory leak in `_PyBytes_FormatEx` error path (GH-140957) (#141154)
(cherry picked from commit
d6c89a2df2c8b7603125883494e9058a88348f66 )
Miss Islington (bot) [Thu, 6 Nov 2025 14:07:56 +0000 (06:07 -0800)]
[3.14] gh-141004: Document `PyLong_FromPid` and `PyLong_AsPid` (GH-141028) (GH-141142)
gh-141004: Document `PyLong_FromPid` and `PyLong_AsPid` (GH-141028)
(cherry picked from commit
bcc524f82d8548707046ce90f5bc56f60018767a )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 6 Nov 2025 13:56:41 +0000 (05:56 -0800)]
[3.14] gh-141004: Document `Py_hexdigits` (GH-141059) (GH-141138)
gh-141004: Document `Py_hexdigits` (GH-141059)
(cherry picked from commit
54110e20e0ed0584e159c42d9f57516c1a3b997a )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 6 Nov 2025 12:35:02 +0000 (04:35 -0800)]
[3.14] gh-141004: Document built-in iterator types in the C API (GH-141006) (GH-141134)
gh-141004: Document built-in iterator types in the C API (GH-141006)
Adds documentation for each of the following:
- PyEnum_Type
- PyFilter_Type
- PyMap_Type
- PyReversed_Type
- PyZip_Type
In addition, PyRange_Type and PyRange_Check are also documented.
(cherry picked from commit
1697cb5710f526d38816bb00ca3dcd4434e5e773 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Hugo van Kemenade [Thu, 6 Nov 2025 11:39:19 +0000 (13:39 +0200)]
[3.14] gh-138189: Document type slots, and other constants, as part of Limited API (GH-138190) (GH-141131)
(cherry picked from commit
d81e1ef0f3a7c63f5d246e4cf918700016b72489 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Serhiy Storchaka [Thu, 6 Nov 2025 11:03:59 +0000 (13:03 +0200)]
[3.14] gh-125346: Add more base64 tests (GH-141061) (GH-141130)
Add more tests for the altchars argument of b64decode() and for the map01
argument of b32decode().
(cherry picked from commit
13360efd385d1a7d0659beba03787ea3d063ef9b )
Miss Islington (bot) [Thu, 6 Nov 2025 10:25:50 +0000 (02:25 -0800)]
[3.14] gh-137232: Update free-threading HOWTOs with up-to-date info for 3.14 (GH-140817) (#141129)
(cherry picked from commit
86ab7bb87a3b8c7d617763bffc1992791c0e9bde )
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Hugo van Kemenade [Thu, 6 Nov 2025 09:18:46 +0000 (11:18 +0200)]
[3.14] Add FFY00 to CODEOWNERS for generate-build-details (GH-139561) (#141080)
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
Miss Islington (bot) [Thu, 6 Nov 2025 08:51:28 +0000 (00:51 -0800)]
[3.14] Minor fixes to `idle.rst` and regenerate `help.html` (GH-140037) (#141121)
Minor fixes to `idle.rst` and regenerate `help.html` (GH-140037)
(cherry picked from commit
4e6e208be9d1c52d1b55a8bb3a83682cb078e55e )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Thu, 6 Nov 2025 08:34:06 +0000 (00:34 -0800)]
[3.14] gh-129876: Move misplaced IDLE news item (GH-141118) (#141119)
gh-129876: Move misplaced IDLE news item (GH-141118)
(cherry picked from commit
6a7c969d003d3ba932d5c7f14a58e2a6408f4a3d )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 6 Nov 2025 05:46:15 +0000 (21:46 -0800)]
[3.14] gh-140569: recommend the new REPL in the asyncio REPL docs (GH-140570) (#141115)
gh-140569: recommend the new REPL in the asyncio REPL docs (GH-140570)
(cherry picked from commit
8822166200ddb4a7635337b97b626e658a443cef )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Stan Ulbrych [Thu, 6 Nov 2025 05:41:31 +0000 (05:41 +0000)]
[3.14] Fix Queue.shutdown docs for condition to unblock a join (gh-137088) (#141073)
(cherry picked from commit
ea06ae5b5e7b335efbdff03c087fad9980a53f69 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Miss Islington (bot) [Thu, 6 Nov 2025 05:04:27 +0000 (21:04 -0800)]
[3.14] gh-118516: clarify that subprocess are automatically killed if transport gets garbage collected (GH-140997) (#141110)
gh-118516: clarify that subprocess are automatically killed if transport gets garbage collected (GH-140997)
(cherry picked from commit
101c9c0a2187940900f684086cb9ba0d456fda49 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Wed, 5 Nov 2025 22:52:22 +0000 (23:52 +0100)]
[3.14] GH-108009: Add clarification of parser and argument defaults in argparse docs (GH-124154) (#141084)
GH-108009: Add clarification of parser and argument defaults in argparse docs (GH-124154)
(cherry picked from commit
95f6e1275b1c9de550d978cb2b4351cc4ed24fe4 )
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Wed, 5 Nov 2025 22:38:20 +0000 (23:38 +0100)]
[3.14] gh-141004: Document `PyDict_GET_SIZE` (GH-141078) (GH-141082)
gh-141004: Document `PyDict_GET_SIZE` (GH-141078)
(cherry picked from commit
f0ab07f22c5fd18058a3ece7a1e745b3922af908 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Wed, 5 Nov 2025 22:06:27 +0000 (23:06 +0100)]
[3.14] gh-76007: remove curses.__version__ doc (GH-141052) (#141076)
Co-authored-by: Zenith <me@arielle.codes>
Miss Islington (bot) [Wed, 5 Nov 2025 22:05:47 +0000 (23:05 +0100)]
[3.14] gh-141004: Document `Py_RETURN_NAN` and `Py_RETURN_INF` (GH-141029) (GH-141074)
gh-141004: Document `Py_RETURN_NAN` and `Py_RETURN_INF` (GH-141029)
(cherry picked from commit
5b02c6e920aaef4b202fc19186f742d008460fd3 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Wed, 5 Nov 2025 21:53:11 +0000 (22:53 +0100)]
[3.14] Fix typo in Apple/__main__.py (GH-141038) (#141039)
Corrected a typo in a return value docstring.
(cherry picked from commit
335d83ec0492779b7fbf2293690f06971cc9d04a )
Co-authored-by: Lê Nam Khánh <55955273+khanhkhanhlele@users.noreply.github.com>
Stan Ulbrych [Wed, 5 Nov 2025 21:20:17 +0000 (21:20 +0000)]
[3.14] Docs: replace an esoteric Von Neumann mention (GH-137598) (#141071)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Victor Stinner [Wed, 5 Nov 2025 19:49:39 +0000 (20:49 +0100)]
[3.14] Fix compiler warnings in remote debugging (#141060) (#141067)
Fix compiler warnings in remote debugging (#141060)
Example of fixed warnings on 32-bit Windows:
Python\remote_debugging.c(24,53): warning C4244: 'function':
conversion from 'uint64_t' to 'uintptr_t', possible loss of data
Modules\_remote_debugging_module.c(789,44): warning C4244:
'function': conversion from 'uint64_t' to 'size_t', possible loss
of data
(cherry picked from commit
f458ac01ba522cc7f94c0c0ee9a00c82f1be6d69 )
Miss Islington (bot) [Wed, 5 Nov 2025 19:10:32 +0000 (20:10 +0100)]
[3.14] Fix a compiler warning in _randommodule.c (GH-141058) (#141063)
Fix a compiler warning in _randommodule.c (GH-141058)
The test just before the cast ensures that the cast cannot overflow.
Fix the warning on 32-bit Windows:
Modules\_randommodule.c(525,28): warning C4244: '=': conversion
from 'uint64_t' to 'Py_ssize_t', possible loss of data
(cherry picked from commit
4ac16dd10950fad2d3e58e8b0ba5f2e621af3cc1 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 5 Nov 2025 19:07:03 +0000 (20:07 +0100)]
[3.14] gh-139313: Improve docs on XML security (GH-139460) (GH-141065)
Clarify that:
- it takes parsing for an attack
- that some doors are closed by default
- only Expat version 2.7.2 has all the fixes
- use of the bundle depends on configuration
(cherry picked from commit
baa9f338971c6a13433a8232db77cd45e6b87b77 )
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
Miss Islington (bot) [Wed, 5 Nov 2025 18:14:12 +0000 (19:14 +0100)]
[3.14] Docs: Fix cached calls count in factorial example (gh-140882) (gh-141031)
Co-authored-by: Clifford Gama <cliffygamy@gmail.com>
Miss Islington (bot) [Wed, 5 Nov 2025 16:51:34 +0000 (17:51 +0100)]
[3.14] gh-141004: Document `PyMemoryView_Type` (GH-141034) (GH-141054)
gh-141004: Document `PyMemoryView_Type` (GH-141034)
(cherry picked from commit
3f6aca1be49f96c5c5f52040b8e78c73c79c0a86 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Wed, 5 Nov 2025 14:20:04 +0000 (15:20 +0100)]
[3.14] gh-141004: Document missing iterator types in the C API (GH-141010) (GH-141046)
gh-141004: Document missing iterator types in the C API (GH-141010)
Add documentation for each of the following:
- PyByteArrayIter_Type
- PyBytesIter_Type
- PyListIter_Type
- PyListRevIter_Type
- PySetIter_Type
- PyTupleIter_Type
- PyRangeIter_Type
- PyLongRangeIter_Type
- PyDictIterKey_Type
- PyDictRevIterKey_Type
- PyDictIterValue_Type
- PyDictRevIterValue_Type
- PyDictIterItem_Type
- PyDictRevIterItem_Type
---------
(cherry picked from commit
35528fccdcaa0890e959eb7884332d1a426819ac )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Hugo van Kemenade [Wed, 5 Nov 2025 12:24:10 +0000 (14:24 +0200)]
[3.14] Omit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS rule (GH-136519) (#140987)
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Miss Islington (bot) [Wed, 5 Nov 2025 00:11:42 +0000 (01:11 +0100)]
[3.14] gh-141007: update string module source code link (GH-141008) (#141030)
gh-141007: update string module source code link (GH-141008)
In 3.14, the former string.py became `__init__.py` within a new `string` directory that also contains a new submodule file, `templatelib.py`.
(cherry picked from commit
fa02422918ac3251cdf88a626f90af260bf5224a )
Co-authored-by: alex <30386655+alexomics@users.noreply.github.com>
Miss Islington (bot) [Tue, 4 Nov 2025 21:33:52 +0000 (22:33 +0100)]
[3.14] gh-141004: Document `Py_UNICODE_{HIGH, LOW}_SURROGATE` functions (GH-141019) (GH-141027)
gh-141004: Document `Py_UNICODE_{HIGH, LOW}_SURROGATE` functions (GH-141019)
(cherry picked from commit
bfe54810c408ff066591d1af0411b1d9c10084b1 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Filip Łajszczak [Tue, 4 Nov 2025 21:23:16 +0000 (22:23 +0100)]
[3.14] gh-139434: Update selected RFC 2822 references to RFC 5322 (GH-139435) (#141025)
Update selected RFC 2822 references to RFC 5322
RFC 2822 was obsoleted by RFC 5322 in 2008. This updates references
to use the current standard in documentation, docstrings, and comments.
It preserves RFC 2822 references in legacy API components to maintain their
historical context.
RFC 822 → RFC 2822 → RFC 5322 progression is explained where relevant.
In some places specific sections of RFC are referenced where it seems helpful.
Scout rule was applied in some places and RFC mentions format was
normalized in doc strings and comments.
(cherry picked from commit
ce1bb85d286130f44b7e874430b0b12990d61dc1 )
Chris Eibl [Tue, 4 Nov 2025 20:43:18 +0000 (21:43 +0100)]
[3.14] gh-140513: Fail to compile if _Py_TAIL_CALL_INTERP is set but preserve_none and musttail do not exist (GH-140548) (#140923)
gh-140513: Fail to compile if `_Py_TAIL_CALL_INTERP` is set but `preserve_none` and `musttail` do not exist. (GH-140548)
(cherry picked from commit
2f60b8f02fe7cb83dd589d9664460082c13e85ef )
Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
Miss Islington (bot) [Tue, 4 Nov 2025 19:35:20 +0000 (20:35 +0100)]
[3.14] Docs: Fix typo in `email.headerregistry.rst` (GH-140965) (#141020)
Docs: Fix typo in `email.headerregistry.rst` (GH-140965)
Fix missing 'Header' suffix on header class name in `email.headerregistry.rst`
(cherry picked from commit
97d8dda980fcddf88b782be343118257f483a864 )
Co-authored-by: Guo Ci <zguoci@gmail.com>
Miss Islington (bot) [Tue, 4 Nov 2025 18:40:12 +0000 (19:40 +0100)]
[3.14] gh-134817: Restore accidentally deleted line in documentation. (GH-141013) (GH-141016)
(cherry picked from commit
66c86c65633047c0faffba85ce6b0b3a82373657 )
Miss Islington (bot) [Tue, 4 Nov 2025 18:34:04 +0000 (19:34 +0100)]
[3.14] Document that returning `sys.monitoring.DISABLE` in response to a global event raises `ValueError` (GH-140726) (GH-141014)
Document that returning `sys.monitoring.DISABLE` in response to a global event raises `ValueError` (GH-140726)
(cherry picked from commit
8a7dbb7a68b5da1f3f1805f564c028f1eea4ebc3 )
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Tue, 4 Nov 2025 16:16:51 +0000 (17:16 +0100)]
[3.14] gh-140979: Fix off-by-one error in the RE code validator (GH-140984) (GH-141001)
It was too lenient and allowed MARK opcodes with too large value.
(cherry picked from commit
1326d2a808245e5f2de9e515460bab30556e8f05 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
AN Long [Tue, 4 Nov 2025 16:14:44 +0000 (01:14 +0900)]
[3.14] gh-140826 Remove the wrong documents about comparison behavior on winreg.HKEYType (GH-140999)
Miss Islington (bot) [Tue, 4 Nov 2025 13:11:08 +0000 (14:11 +0100)]
[3.14] Fix minor typo: 'web site' -> 'website' (GH-140561) (GH-140976)
(cherry picked from commit
08115d241a724a4769599993f654f77abcdebf5a )
Co-authored-by: commitWithTisha <tishaa1010@gmail.com>
Miss Islington (bot) [Tue, 4 Nov 2025 11:21:33 +0000 (12:21 +0100)]
[3.14] gh-140797: Forbid capturing groups in re.Scanner lexicon patterns (GH-140944) (GH-140982)
(cherry picked from commit
fa9c3eefd475f0647a69bf3f49db8100848fb6a9 )
Co-authored-by: Abhishek Tiwari <Abhi210@users.noreply.github.com>
Miss Islington (bot) [Tue, 4 Nov 2025 11:18:23 +0000 (12:18 +0100)]
[3.14] gh-140815: Fix faulthandler for invalid/freed frame (GH-140921) (#140981)
gh-140815: Fix faulthandler for invalid/freed frame (GH-140921)
faulthandler now detects if a frame or a code object is invalid or
freed.
Add helper functions:
* _PyCode_SafeAddr2Line()
* _PyFrame_SafeGetCode()
* _PyFrame_SafeGetLasti()
_PyMem_IsPtrFreed() now detects pointers in [-0xff, 0xff] range
as freed.
(cherry picked from commit
a84181c31bfc45a1d6bcb1296bd298ad612c54d0 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 4 Nov 2025 08:02:10 +0000 (09:02 +0100)]
[3.14] Docs: Fix a typo in `idle.rst` (Chitespace -> Whitespace) (GH-140946) (#140953)
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Hugo van Kemenade [Tue, 4 Nov 2025 07:46:08 +0000 (09:46 +0200)]
[3.14] Fix minor typos and wording in C API docs (GH-140955) (#140966)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Ken Jin [Mon, 3 Nov 2025 19:53:10 +0000 (03:53 +0800)]
[3.14] gh-140889: Test tailcall and JIT in CI (GH-140891) (GH-140962)
Miss Islington (bot) [Mon, 3 Nov 2025 19:51:32 +0000 (20:51 +0100)]
[3.14] gh-133600: Run `Tools/wasm/wasi` on CI instead of deprecated `Tools/wasm/wasi.py` (GH-140907) (#140964)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 3 Nov 2025 15:52:01 +0000 (16:52 +0100)]
[3.14] gh-138151: Fix annotationlib handling of multiple nonlocals (GH-138164) (#140949)
gh-138151: Fix annotationlib handling of multiple nonlocals (GH-138164)
(cherry picked from commit
b1027d4762435b97546c122dd94290d707b3ff39 )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Mon, 3 Nov 2025 15:16:03 +0000 (16:16 +0100)]
[3.14] gh-140348: Fix using | on unusual objects plus Unions (GH-140383) (#140948)
gh-140348: Fix using | on unusual objects plus Unions (GH-140383)
(cherry picked from commit
7a9437d98641e3c3749ab2fd9fb54eac7614f9af )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Jelle Zijlstra [Mon, 3 Nov 2025 14:07:22 +0000 (06:07 -0800)]
[3.14] Revert "gh-137969: Fix evaluation of `ref.evaluate(format=Format.FORWARDREF)` objects (GH-138075) (#140929)" (GH-140931)
Revert "[3.14] gh-137969: Fix evaluation of `ref.evaluate(format=Format.FORWARDREF)` objects (GH-138075) (#140929)"
This reverts commit
cdb6fe89ae3a4bfbffb91290dbf9db0c4af85cd5 .
Miss Islington (bot) [Mon, 3 Nov 2025 05:08:47 +0000 (06:08 +0100)]
[3.14] gh-140693: Improve `argparse` documentation about controlling color (GH-140737) (#140932)
gh-140693: Improve `argparse` documentation about controlling color (GH-140737)
(cherry picked from commit
31de83d5e2e17f4e9a37e08b384bab916e1da7c1 )
Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
Miss Islington (bot) [Mon, 3 Nov 2025 01:45:44 +0000 (02:45 +0100)]
[3.14] gh-137969: Fix evaluation of `ref.evaluate(format=Format.FORWARDREF)` objects (GH-138075) (#140929)
gh-137969: Fix evaluation of `ref.evaluate(format=Format.FORWARDREF)` objects (GH-138075)
(cherry picked from commit
63e01d6bae9ddc9ff35aca2134945670eacef163 )
Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Sun, 2 Nov 2025 23:41:49 +0000 (00:41 +0100)]
[3.14] gh-138425: Correctly partially evaluate global generics with undefined params in `ref.evaluate(format=Format.FORWARDREF)` (GH-138430) (#140927)
gh-138425: Correctly partially evaluate global generics with undefined params in `ref.evaluate(format=Format.FORWARDREF)` (GH-138430)
(cherry picked from commit
e66f87ca73516efb4aec1f2f056d2a4efd73248a )
Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Sun, 2 Nov 2025 15:03:12 +0000 (16:03 +0100)]
[3.14] gh-135307: Fix email error when policy max_line_length is set to 0 or None (GH-135367) (#140915)
gh-135307: Fix email error when policy max_line_length is set to 0 or None (GH-135367)
(cherry picked from commit
6d45cd8dbb07ae020ec07f2c3375dd06e52377f6 )
RDM: Like the change made in a earlier PR to the folder, we can/must use 'maxlen' as a stand in for 'unlimited' when computing line lengths when max_line_length is 0 or None; otherwise the computation results in a traceback.
Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
Miss Islington (bot) [Sun, 2 Nov 2025 13:57:26 +0000 (14:57 +0100)]
[3.14] Docs: avoid informal formulation in `Doc/c-api/conversion.rst` (GH-140898) (#140912)
Docs: avoid informal formulation in `Doc/c-api/conversion.rst` (GH-140898)
(cherry picked from commit
173cc53d9fdc596d7a19102fa407c829f9c71516 )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
Bénédikt Tran [Sun, 2 Nov 2025 09:33:36 +0000 (10:33 +0100)]
[3.14] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234) (#139359)
* [3.14] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234)
Expose the XML Expat 2.7.2 mitigation APIs to disallow use of
disproportional amounts of dynamic memory from within an Expat
parser (see CVE-2025-59375 for instance).
The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:
- `parser.SetAllocTrackerActivationThreshold(threshold)`, and
- `parser.SetAllocTrackerMaximumAmplification(max_factor)`.
(cherry picked from commit
f04bea44c37793561d753dd4ca6e7cd658137553 )
(cherry picked from commit
68a1778b7721f3fb853cd3aa674f7039c2a4df36 )
Miss Islington (bot) [Sun, 2 Nov 2025 08:38:56 +0000 (09:38 +0100)]
[3.14] Docs: fix some grammatical errors in `Doc/c-api/dict.rst` (GH-140899) (#140901)
Docs: fix some grammatical errors in `Doc/c-api/dict.rst` (GH-140899)
(cherry picked from commit
d12cbf2865d2845d238f697ddace83face814972 )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
Ken Jin [Sat, 1 Nov 2025 18:41:01 +0000 (02:41 +0800)]
[3.14] gh-140104: Revert "Set next_instr properly in the JIT during exceptions (GH-140233) (GH-140687)" (#140890)
Revert "[3.14] gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233) (GH-140687)"
This reverts commit
2e216728038a03d387231f39ded091ec318ba61b .
Miss Islington (bot) [Sat, 1 Nov 2025 16:49:35 +0000 (17:49 +0100)]
[3.14] gh-140312: Set lltrace on JIT debug builds (GH-140313) (#140887)
gh-140312: Set lltrace on JIT debug builds (GH-140313)
(cherry picked from commit
f701f98052e906af9a065d68bdf2398ef3b476d9 )
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
Miss Islington (bot) [Sat, 1 Nov 2025 11:21:51 +0000 (12:21 +0100)]
[3.14] gh-140874: Upgrade bundled pip to 25.3 (GH-140876) (gh-140881)
gh-140874: Upgrade bundled pip to 25.3 (GH-140876)
Upgrade bundled pip to 25.3
(cherry picked from commit
d440a0f96c6e87ee93810e0184068e90087af466 )
Co-authored-by: Damian Shaw <damian.peter.shaw@gmail.com>
Łukasz Langa [Fri, 31 Oct 2025 16:43:23 +0000 (17:43 +0100)]
[3.14] gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952) (GH-140844)
(cherry picked from commit
f029e8db626ddc6e3a3beea4eff511a71aaceb5c )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 31 Oct 2025 16:13:13 +0000 (17:13 +0100)]
[3.14] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140841)
* the "plaintext" element
* the RAWTEXT elements "xmp", "iframe", "noembed" and "noframes"
* optionally RAWTEXT (if scripting=True) element "noscript"
(cherry picked from commit
a17c57eee5b5cc81390750d07e4800b19c0c3084 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Brian Schubert [Fri, 31 Oct 2025 10:26:40 +0000 (06:26 -0400)]
[3.14] gh-138944: Fix `SyntaxError` message for invalid syntax following valid import-as statement (GH-138945) (#140646)
(cherry picked from commit
3dab11f888fda34c02734e4468d1acd4c36927fe )
Miss Islington (bot) [Thu, 30 Oct 2025 18:02:10 +0000 (19:02 +0100)]
[3.14] Make printing log lines to the terminal a little cleaner when building WASI (GH-140772) (GH-140804)
Make printing log lines to the terminal a little cleaner when building WASI (GH-140772)
(cherry picked from commit
abd19eddee20a7d05266f11f6042a84b04d29664 )
Co-authored-by: Brett Cannon <brett@python.org>
Mikhail Efimov [Thu, 30 Oct 2025 17:03:35 +0000 (20:03 +0300)]
[3.14] gh-140551: Fix dict crash if clear is called at lookup stage (GH-140558) (#140743)
gh-140551: Fix `dict` crash if `clear` is called at `lookup` stage (#140558)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Miss Islington (bot) [Thu, 30 Oct 2025 17:01:22 +0000 (18:01 +0100)]
[3.14] GH-140768: Warn when the WASI SDK version doesn't match the supported version (GH-140769) (GH-140801)
GH-140768: Warn when the WASI SDK version doesn't match the supported version (GH-140769)
(cherry picked from commit
95a3564869daa3cc083e4d4603f5f03ee5f53e31 )
Co-authored-by: Brett Cannon <brett@python.org>
Donghee Na [Thu, 30 Oct 2025 13:51:25 +0000 (22:51 +0900)]
[3.14] gh-137821: Fix wrongly tested json.decoder.scanstring (gh-140782)
Miss Islington (bot) [Thu, 30 Oct 2025 11:25:34 +0000 (12:25 +0100)]
[3.14] gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642) (GH-140786)
ast.parse() no longer emits syntax warnings for
return/break/continue in finally (see PEP-765) -- they are only
emitted during compilation.
(cherry picked from commit
ad0a3f733b23e7fc69aff13055c7fac8ab9dcd66 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 30 Oct 2025 11:19:27 +0000 (12:19 +0100)]
[3.14] gh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra argument (GH-140511) (GH-140784)
(cherry picked from commit
327dbbedffa3f2c95e70129a11974b83e27864f9 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 29 Oct 2025 22:22:20 +0000 (23:22 +0100)]
[3.14] gh-120057: add `os.reload_environ` to `__all__` (GH-140763) (#140773)
Co-authored-by: Guo Ci <zguoci@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Wed, 29 Oct 2025 18:11:24 +0000 (19:11 +0100)]
[3.14] gh-140082: Forward colorizing from libregrtest to unittest (GH-140083) (#140756)
gh-140082: Forward colorizing from libregrtest to unittest (GH-140083)
libregrtest redirects test output to a file as part of its operation.
When `unittest` checks to see if it should colorize with
`isatty(sys.stdout)` that fails resulting in no colorizing of the
unittest output.
Update `libregrtest` to set `FORCE_COLOR=1` when redirecting test output
so that unittest will do color printing.
(cherry picked from commit
6ff62ac4fbc3f17529823c146cc3a3f8c21eed42 )
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 29 Oct 2025 16:26:38 +0000 (17:26 +0100)]
[3.14] gh-140228: Avoid making unnecessary syscalls in linecache for frozen modules (GH-140377) (#140738)
gh-140228: Avoid making unnecessary syscalls in linecache for frozen modules (GH-140377)
(cherry picked from commit
c41f84ff61c52e3ff7ef86b0c66208b29613d23d )
Co-authored-by: tconley1428 <tconley1428@gmail.com>
Miss Islington (bot) [Wed, 29 Oct 2025 13:54:37 +0000 (14:54 +0100)]
[3.14] gh-140576: Fixed crash produced by lexer in case of dedented zero byte (GH-140583) (#140757)
gh-140576: Fixed crash produced by lexer in case of dedented zero byte (GH-140583)
(cherry picked from commit
8706167474e9a625e5f6613d3c7ac77a62faff58 )
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Miss Islington (bot) [Wed, 29 Oct 2025 12:54:04 +0000 (13:54 +0100)]
[3.14] gh-140702: Log color and GHA env vars in test.pythoninfo (GH-140747) (#140753)
gh-140702: Log color and GHA env vars in test.pythoninfo (GH-140747)
(cherry picked from commit
376559bf54762d7b6e0a14591a1f284c8f09a855 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Cody Maloney [Wed, 29 Oct 2025 12:31:48 +0000 (05:31 -0700)]
[3.14] gh-140607: Validate returned byte count in RawIOBase.read (GH-140611) (#140728)
* [3.14] gh-140607: Validate returned byte count in RawIOBase.read (GH-140611)
While `RawIOBase.readinto` should return a count of bytes between 0 and
the length of the given buffer, it is not required to. Add validation
inside RawIOBase.read() that the returned byte count is valid.
(cherry picked from commit
0f0a362768aecb4c791724cce486d8317533a94d )
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
* fixup: Use older attribute name
---------
Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 29 Oct 2025 09:01:39 +0000 (10:01 +0100)]
[3.14] gh-140702: Add test skip for Unix Datagram tests on iOS when on Github Actions (GH-140740) (#140742)
Exposes the GITHUB_ACTIONS environment variable to iOS simulator test runs, and
uses this variable to skip a Unix Datagram socketserver test that is unreliable
in the iOS GitHub Actions environment.
(cherry picked from commit
9f8d005d2961777aa533ec330f96b50324a3446f )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Mikhail Efimov [Wed, 29 Oct 2025 07:17:49 +0000 (10:17 +0300)]
[3.14] gh-139951: Tests on tuple GC tracking (GH-140575) (#140701)
Miss Islington (bot) [Tue, 28 Oct 2025 20:05:28 +0000 (21:05 +0100)]
[3.14] gh-139588: Increase maximum LaTeX list depth (GH-140709) (#140724)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Tue, 28 Oct 2025 17:33:34 +0000 (18:33 +0100)]
[3.14] gh-140657: Don't rerun test_import single phase init test (GH-140712) (#140713)
gh-140657: Don't rerun test_import single phase init test (GH-140712)
test_basic_multiple_interpreters_main_no_reset() leaks memory:
import_in_subinterp() is called with postcleanup=False.
(cherry picked from commit
c6d4c79c9abac5c5cc2e7b429d72946d15c5e132 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 28 Oct 2025 12:45:27 +0000 (13:45 +0100)]
[3.14] GH-140590: Fix setstate for functools.partial C-module (GH-140671) (#140698)
GH-140590: Fix setstate for functools.partial C-module (GH-140671)
(cherry picked from commit
d26686a7f87d63499f7296c0811fa0535637a93b )
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Miss Islington (bot) [Tue, 28 Oct 2025 09:24:11 +0000 (10:24 +0100)]
[3.14] gh-134160: Add more comments for the xxlimited module (GH-140214) (GH-140664)
(cherry picked from commit
18e4a89e42c681fe035d4d39a71e79d3c6b70903 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Tue, 28 Oct 2025 06:13:30 +0000 (07:13 +0100)]
[3.14] gh-140189: Add CI job to test iOS builds. (GH-140190) (#140696)
Adds a CI configuration to test iOS builds on every build.
(cherry picked from commit
f4e6370582380b12286b6f5b625c282eaf12c84a )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Mikhail Efimov [Mon, 27 Oct 2025 23:49:10 +0000 (02:49 +0300)]
[3.14] gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233) (GH-140687)
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Miss Islington (bot) [Mon, 27 Oct 2025 20:08:57 +0000 (21:08 +0100)]
[3.14] gh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667) (GH-140685)
(cherry picked from commit
364ae607d8035db8ba92486ebebd8225446c1a90 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 27 Oct 2025 13:29:43 +0000 (14:29 +0100)]
[3.14] gh-140358: Bring back elapsed time and unreachable count to gc debug output (GH-140359) (#140405)
Co-authored-by: Pål Grønås Drange <paal.drange+pgdr@gmail.com>
Miss Islington (bot) [Mon, 27 Oct 2025 13:15:49 +0000 (14:15 +0100)]
[3.14] gh-140487: Fix Py_RETURN_NOTIMPLEMENTED in limited C API 3.11 (GH-140636) (#140668)
gh-140487: Fix Py_RETURN_NOTIMPLEMENTED in limited C API 3.11 (GH-140636)
Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE have already been
fixed by commit
9258f3da9175134d03f2c8c7c7eed223802ad945 (issue gh-134989).
(cherry picked from commit
c6364775236e3c634c3393c7f50fece50611245f )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 27 Oct 2025 13:08:00 +0000 (14:08 +0100)]
[3.14] gh-140633: AppleFrameworkLoader: Ignore AttributeError when setting __file__ (GH-140635) (GH-140660)
(cherry picked from commit
3416e7c8dc004773d814b6f9ec9562434ed961cd )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Mon, 27 Oct 2025 09:51:14 +0000 (10:51 +0100)]
[3.14] Docs: Replace "encoder" with "decoder" in `Doc/c-api/codec.rst` (GH-140613) (#140661)
Docs: Replace "encoder" with "decoder" in `Doc/c-api/codec.rst` (GH-140613)
(cherry picked from commit
d12086e8228323cc2e31d263f1aeb8190bd1c1d9 )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
Miss Islington (bot) [Mon, 27 Oct 2025 09:21:43 +0000 (10:21 +0100)]
[3.14] Remove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) (GH-140637) (#140658)
Remove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) (GH-140637)
(cherry picked from commit
7d70a147f58edabc9691869a0e8b606c9c3ac184 )
Co-authored-by: Shamil <ashm.tech@proton.me>
Sebastian Pipping [Sun, 26 Oct 2025 15:19:18 +0000 (16:19 +0100)]
[3.14] gh-140593: Fix a memory leak in function `my_ElementDeclHandler` of `pyexpat` (GH-140602) (#140629)
[3.14] gh-140593: Fix a memory leak in function `my_ElementDeclHandler` of `pyexpat` (GH-140602)
Ensure that the memory allocated for the content model
passed to `my_ElementDeclHandler` is freed in all error
paths.
(cherry picked from commit
e34a5e33049ce845de646cf24a498766a2da3586 )
Miss Islington (bot) [Sun, 26 Oct 2025 15:15:49 +0000 (16:15 +0100)]
[3.14] gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295) (GH-140628)
gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)
(cherry picked from commit
06c779474c7f53bccb8ebf42c66e73b2488bf488 )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Miss Islington (bot) [Sun, 26 Oct 2025 12:49:20 +0000 (13:49 +0100)]
[3.14] gh-133346: add tests for `_colorize.Theme` (GH-139687) (#140622)
* gh-133346: add tests for `_colorize.Theme` (GH-139687)
(cherry picked from commit
37827c17526b7d3e1275861a1207be71aef6b284 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 26 Oct 2025 12:00:10 +0000 (13:00 +0100)]
[3.14] gh-133346: make `_colorize.Argparse` kw-only constructible (GH-140620) (#140621)
gh-133346: make `_colorize.Argparse` kw-only constructible (GH-140620)
Other themes are kw-only constructible.
(cherry picked from commit
387ac2d2f3a9de139d2e1ad5f0dc7996af015f54 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 26 Oct 2025 09:45:34 +0000 (10:45 +0100)]
[3.14] Docs: Fix a grammatical error in `Doc/c-api/codec.rst` (GH-140612) (#140616)
Docs: Fix a grammatical error in `Doc/c-api/codec.rst` (GH-140612)
(cherry picked from commit
33b2ca80bb073e25b8e23691da96cf0eda67c7bf )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
Miss Islington (bot) [Sat, 25 Oct 2025 23:37:24 +0000 (01:37 +0200)]
[3.14] gh-124694: Add versionadded note to InterpreterPoolExecutor (GH-140605)
(cherry picked from commit
421a475c87771d46752c27def264e5c622a58427 )
Co-authored-by: Zachary Ware <zach@python.org>
Miss Islington (bot) [Sat, 25 Oct 2025 15:41:04 +0000 (17:41 +0200)]
[3.14] Fix typo in `Doc/c-api/code.rst` (GH-140586) (#140591)
Fix typo in `Doc/c-api/code.rst` (GH-140586)
(cherry picked from commit
d74a96366df58b6e55d4a03612c3e67da2211ddd )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
Miss Islington (bot) [Sat, 25 Oct 2025 15:39:42 +0000 (17:39 +0200)]
[3.14] Remove unreachable break statements in _ctypes_test.c (GH-140585) (#140587)
Remove unreachable break statements in _ctypes_test.c (GH-140585)
(cherry picked from commit
2a1c9bd616b1b3a07c74d280e3f7e2bd94d0cc22 )
Co-authored-by: Shamil <ashm.tech@proton.me>
Miss Islington (bot) [Sat, 25 Oct 2025 14:02:20 +0000 (16:02 +0200)]
[3.14] Docs: Fix a grammatical error in `Doc/c-api/capsule.rst` (GH-140577) (GH-140580)
Docs: Fix a grammatical error in `Doc/c-api/capsule.rst` (GH-140577)
"who" -> "which"
(cherry picked from commit
4ad599501fe8ec58ef2842d26330696820b2cc5c )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>
Miss Islington (bot) [Fri, 24 Oct 2025 20:53:24 +0000 (22:53 +0200)]
[3.14] gh-140463: Fix typo in xmlrpc.client documentation (GH-140552) (#140568)
gh-140463: Fix typo in xmlrpc.client documentation (GH-140552)
Fix typo in xmlrpc.client documentation
(cherry picked from commit
44b6eead21080e1abb3ca9ee2e1c7bc8e7a3c3a6 )
Co-authored-by: Miša Jakovljević <misajakovljevic3@gmail.com>
Miss Islington (bot) [Fri, 24 Oct 2025 20:00:21 +0000 (22:00 +0200)]
[3.14] Add missing NEWS entry for gh-140517 (GH-140560) (GH-140565)
(cherry picked from commit
d78d7a50b06c4ea10d13fc2dcb42607a97f9260c )
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Miss Islington (bot) [Fri, 24 Oct 2025 19:24:17 +0000 (21:24 +0200)]
[3.14] gh-140482: Preserve and restore `stty echo` as a test environment (GH-140519) (#140562)
gh-140482: Preserve and restore `stty echo` as a test environment (GH-140519)
(cherry picked from commit
b3c713a0af5f5c4b5704d8019a893a1b70eba941 )
gh-140482: Restore `stty echo` as a test environment
Co-authored-by: Barry Warsaw <barry@python.org>
Miss Islington (bot) [Fri, 24 Oct 2025 16:30:36 +0000 (18:30 +0200)]
[3.14] gh-140517: fix leak in `map_next` in strict mode (GH-140543) (#140554)
gh-140517: fix leak in `map_next` in strict mode (GH-140543)
(cherry picked from commit
be5af997f3461eee638645396866d9cd7acf18fb )
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Miss Islington (bot) [Fri, 24 Oct 2025 13:36:35 +0000 (15:36 +0200)]
[3.14] Document that PyModule_GetDef can return NULL with or without setting an exception (GH-140529) (GH-140545)
(cherry picked from commit
289360ae63933c8956f87307ff091ec9ed19afed )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Fri, 24 Oct 2025 12:24:26 +0000 (14:24 +0200)]
[3.14] Docs: Fix a grammatical error in `Doc/c-api/arg.rst` (GH-140525) (GH-140538)
Docs: Fix a grammatical error in `Doc/c-api/arg.rst` (GH-140525)
"have" -> "has"
(cherry picked from commit
fc2e23c2ed25bb7b23cf8a870a2e21f012735507 )
Co-authored-by: RayXu <140802139+F18-Maverick@users.noreply.github.com>