]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Tue, 26 May 2026 01:04:49 +0000 (03:04 +0200)]
[3.15] gh-149931: Fix memory leaks on failed realloc (GH-149932) (#150439)
Miss Islington (bot) [Mon, 25 May 2026 23:15:56 +0000 (01:15 +0200)]
[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150434)
gh-149619: Harden _remote_debugging error paths (GH-150349)
(cherry picked from commit
a5be25d3bdc1b3cbc9638a3249c0e3db5a97ebc6 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Pablo Galindo Salgado [Mon, 25 May 2026 23:02:37 +0000 (00:02 +0100)]
[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150435)
(cherry picked from commit
a5be25d3bdc1b3cbc9638a3249c0e3db5a97ebc6 )
Miss Islington (bot) [Mon, 25 May 2026 18:46:19 +0000 (20:46 +0200)]
[3.15] gh-150387: Fix hang in test_run_failed_script_live on slow buildbots (GH-150405) (#150420)
Serhiy Storchaka [Mon, 25 May 2026 18:43:23 +0000 (21:43 +0300)]
[3.15] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398)
Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.
Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit
46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5 )
Miss Islington (bot) [Mon, 25 May 2026 18:19:22 +0000 (20:19 +0200)]
[3.15] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150394)
Miss Islington (bot) [Mon, 25 May 2026 10:13:01 +0000 (12:13 +0200)]
[3.15] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150383)
(cherry picked from commit
832afeddcea78e40d39c47cd1893f8137e588e72 )
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Miss Islington (bot) [Mon, 25 May 2026 09:36:22 +0000 (11:36 +0200)]
[3.15] gh-150374: Fix double release of import lock in lazy import reification (GH-150376) (#150378)
gh-150374: Fix double release of import lock in lazy import reification (GH-150376)
(cherry picked from commit
5498eba545e950c7550c924f2e458c740a689c69 )
Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
Miss Islington (bot) [Mon, 25 May 2026 08:19:36 +0000 (10:19 +0200)]
[3.15] gh-150285: Fix too long docstrings in some Python modules (GH-150366) (GH-150375)
(cherry picked from commit
01c6d3d76bf222d8b847c97e0a3d3fad0c1b1fe3 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 25 May 2026 08:19:05 +0000 (10:19 +0200)]
[3.15] gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373) (GH-150377)
(cherry picked from commit
fbeafc062e55a52ba7369c36be0b3eb34eabb560 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 25 May 2026 07:05:24 +0000 (09:05 +0200)]
[3.15] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150352)
gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323)
(cherry picked from commit
43c60ec2fddd316a4a6b7b6c68eae7cb66df0850 )
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Serhiy Storchaka [Sun, 24 May 2026 19:31:19 +0000 (22:31 +0300)]
[3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350)
(cherry picked from commit
287c98f4cb40c15d638651de4b29ae98b92589aa )
Miss Islington (bot) [Sun, 24 May 2026 15:47:29 +0000 (17:47 +0200)]
[3.15] gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610) (#150342)
gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610)
Recommend `distclean` target over `clean` when source tree is not clean
(cherry picked from commit
34631058f2aec6752ebfc50d40958b247532f536 )
Co-authored-by: James <6125322+SnoopJ@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Serhiy Storchaka [Sun, 24 May 2026 13:53:29 +0000 (16:53 +0300)]
[3.15] gh-150285: Fix too long docstrings in the os module (GH-150296) (GH-150341)
(cherry picked from commit
a5cb7c34dd25aaa639a512f0dbbaaa6c9e03f1a1 )
Miss Islington (bot) [Sun, 24 May 2026 13:43:38 +0000 (15:43 +0200)]
[3.15] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-150340)
(cherry picked from commit
0466560b310fa74c38270328d66d6a16df95ec34 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:41:40 +0000 (15:41 +0200)]
[3.15] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-150337)
(cherry picked from commit
9da7923835a4c72e738551bbd78b8179a81286ad )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:39:29 +0000 (15:39 +0200)]
[3.15] gh-149619: Fix `_remote_debugging` permissions error on Linux (GH-150012) (#150339)
gh-149619: Fix `_remote_debugging` permissions error on Linux (GH-150012)
When running profiling on Linux without sudo, attempts to read
process memory would fail with the misleading error 'Failed to find
the PyRuntime section in process <pid> on Linux platform'.
The actual issue is a permissions error because profiling was not
run with sudo. We were clearing the exception on Linux when trying
to read memory, instead, we should bubble up the permissions error
and show it properly.
(cherry picked from commit
0563890872b3c63f94953e983fe396615b708540 )
Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
Miss Islington (bot) [Sun, 24 May 2026 13:36:30 +0000 (15:36 +0200)]
[3.15] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (#149645)
(cherry picked from commit
24b8f12544468e4cedf5bfbe25442fcd495391e4 )
Co-authored-by: Stan Ulbrych <stan@python.org>
Miss Islington (bot) [Sun, 24 May 2026 13:24:57 +0000 (15:24 +0200)]
[3.15] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150336)
(cherry picked from commit
e1e06be11908ddb6935e8df35f972879dd1bc3d8 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:24:34 +0000 (15:24 +0200)]
[3.15] gh-150285: Fix too long docstrings in the zstd module (GH-150291) (GH-150335)
(cherry picked from commit
9fceb1c0c5c5ad527bc257b115bcf45995daf631 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:24:08 +0000 (15:24 +0200)]
[3.15] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150333)
(cherry picked from commit
6bed57a3b659a34c4a7d75e76f4fe840f762bf7f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:23:45 +0000 (15:23 +0200)]
[3.15] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150332)
(cherry picked from commit
160dc74122ed4e31540b2ef2c77bda122b02c94a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:23:25 +0000 (15:23 +0200)]
[3.15] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150331)
(cherry picked from commit
4c0fe2d134f6ddaa4c705ffba073d9d5874b7fe4 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 13:09:13 +0000 (15:09 +0200)]
[3.15] gh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289) (#150334)
gh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289)
(cherry picked from commit
cdc499ae775e5204ef6bbb0a63bb00e85b0b6b72 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 12:02:45 +0000 (14:02 +0200)]
[3.15] gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272) (#150330)
gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272)
(cherry picked from commit
0f32750fe26428de5e439803cf57f51847c81ce8 )
Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
Miss Islington (bot) [Sun, 24 May 2026 07:18:58 +0000 (09:18 +0200)]
[3.15] gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` (GH-149633) (#150245)
gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` (GH-149633)
(cherry picked from commit
441af3a93426c5e7e3c056fee27e6f4505988584 )
Co-authored-by: Hai Zhu <haiizhu@outlook.com>
Miss Islington (bot) [Sat, 23 May 2026 19:27:27 +0000 (21:27 +0200)]
[3.15] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179) (#150303)
gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179)
(cherry picked from commit
32823af153b76b7042fbce28ea8a6e0c3c4f1ca8 )
Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
Miss Islington (bot) [Sat, 23 May 2026 15:30:19 +0000 (17:30 +0200)]
[3.15] gh-150258: Show relative percentage on Tachyon flamegraph (GH-150266) (#150312)
gh-150258: Show relative percentage on Tachyon flamegraph (GH-150266)
When running profiling, users rarely care about the global percentage of
the runtime. Often, they want to select a function and measure child
percentages relative to that.
This PR updates the flamegraph tooltips to show both "Percentage" and
"Relative Percentage" when the user clicks a specific function.
(cherry picked from commit
fad06746051f6bd95a255d49e38ebf049e965109 )
Co-authored-by: Eduardo Villalpando Mello <eduardovil@microsoft.com>
Miss Islington (bot) [Sat, 23 May 2026 09:25:56 +0000 (11:25 +0200)]
[3.15] gh-149816: add missing critical section on self in buffered_iternext (GH-150295) (#150305)
gh-149816: add missing critical section on self in buffered_iternext (GH-150295)
(cherry picked from commit
e8545ed3eafbf349b51ea308126a67dc70416a62 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Sat, 23 May 2026 08:53:12 +0000 (10:53 +0200)]
[3.15] gh-148450: `abc.register` needs to update `type_version` when `tp_flags` is changed (GH-148623) (#150300)
gh-148450: `abc.register` needs to update `type_version` when `tp_flags` is changed (GH-148623)
(cherry picked from commit
e7eaed56149aa08f7fd5012784cc1deef8e483de )
Co-authored-by: Hai Zhu <haiizhu@outlook.com>
Miss Islington (bot) [Sat, 23 May 2026 08:34:48 +0000 (10:34 +0200)]
[3.15] gh-150232: update Thread group parameter doc (GH-150283) (#150297)
gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit
82191c6d2cdacad6751262a40a44d2cd6d390977 )
Co-authored-by: My-ABC <569817555@qq.com>
Miss Islington (bot) [Sat, 23 May 2026 07:33:21 +0000 (09:33 +0200)]
[3.15] gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (GH-146470) (#150292)
gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (GH-146470)
(cherry picked from commit
e62a61177f8b793d787e337034a740ca75c1ab44 )
Co-authored-by: Farhan Saif <fsaif@uic.edu>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Victor Stinner [Sat, 23 May 2026 06:57:27 +0000 (08:57 +0200)]
[3.15] Revert "[3.15] gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025) (#150039)" (#150262)
Revert "[3.15] gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025) (#150039)"
This reverts commit
66ade2861fec1d6c18998710938a1c71fde5f76b .
Miss Islington (bot) [Fri, 22 May 2026 21:17:51 +0000 (23:17 +0200)]
[3.15] gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269) (GH-150271)
(cherry picked from commit
9df2b6ccc719b0bc0167da65b72b57f9da39398b )
Co-authored-by: Omkar Kabde <omkarkabde@gmail.com>
Miss Islington (bot) [Fri, 22 May 2026 20:49:36 +0000 (22:49 +0200)]
[3.15] gh-149189: Revert "Modern defaults for `pprint` (GH-149190)" (GH-150249) (#150268)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 22 May 2026 14:44:34 +0000 (16:44 +0200)]
[3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092)
Implementation of python/peps#4968.
(cherry picked from commit
08218030a507b2ef38db9696216bf3eb24d9a6a1 )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Fri, 22 May 2026 14:44:08 +0000 (16:44 +0200)]
[3.15] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149882)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
Miss Islington (bot) [Fri, 22 May 2026 11:40:49 +0000 (13:40 +0200)]
[3.15] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150241)
Co-authored-by: Mia Albert <micha@2231puppy.tech>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 22 May 2026 09:46:14 +0000 (11:46 +0200)]
[3.15] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read() (GH-150222) (GH-150229)
This has not been observed in practice, but we cannot be 100% sure that
it will not happen with some weird gzip data.
(cherry picked from commit
28eac9a7263ad8dcfa9b536aa238549131857e0f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 22 May 2026 07:48:42 +0000 (09:48 +0200)]
[3.15] gh-133998: Fix gzip file creation when time is out of range (GH-134278) (GH-150221)
(cherry picked from commit
1daad8a1630c9ee011f6ff3796c4e7aef243463b )
Co-authored-by: adang1345 <adang1345@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 22 May 2026 06:41:43 +0000 (08:41 +0200)]
[3.15] gh-149995: Update typing.py docstrings and documentation (GH-149996) (#150215)
gh-149995: Update typing.py docstrings and documentation (GH-149996)
Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.
A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
there was talk of allowing overload only in stubs, but it is now heavily used at
runtime too and that's more likely to be relevant to users.
(cherry picked from commit
f159419ae2ef1aebbd90ce9427b55e27738c960c )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Fri, 22 May 2026 02:18:28 +0000 (04:18 +0200)]
[3.15] gh-148294: Make configure find g++ correctly (GH-150212)
The `AC_PATH_TOOL` calls had included a duplicated argument, causing a "`PATH`"
consisting of `notfound` to be searched instead of `$PATH`.
(cherry picked from commit
c613f72eeef83340cb369287f7c1a195e086d1d5 )
Co-authored-by: sendaoYan <yansendao@126.com>
Miss Islington (bot) [Thu, 21 May 2026 22:31:41 +0000 (00:31 +0200)]
[3.15] gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH (GH-150177) (#150202)
gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH (GH-150177)
* gh-149819: Fix .pth files not loaded in Python subprocesses
After PR gh-149583 (Fix double evaluation of .pth and .site files in
venvs), .pth files are no longer loaded in subprocesses started with
subprocess.run([sys.executable, ...]). The root cause: main() seeds
known_paths from removeduppaths() with all sys.path entries inherited
from the parent process. addsitedir() then skips .pth processing for
every directory already in known_paths.
Fix:
- main(): call removeduppaths() for dedup but start known_paths as a
fresh empty set, so that addsitedir() processes .pth files in every
site-packages directory regardless of inherited sys.path.
- addsitedir(): move known_paths.add() before the sys.path.append and
guard the append with 'sitedir not in sys.path' to avoid creating
duplicate entries when called with a fresh known_paths.
This preserves the gh-75723 dedup guarantee while allowing subprocesses
to load .pth files.
* Fill out the tests for GH#149888
* Extend _make_start() and _make_pth() to take an optional `basedir` which is used instead of
`site.tmpdir` if given.
* Add test_pth_processed_when_sitedir_already_on_path() to test the core GH#149819 bug: .pth files
in subprocesses aren't handled if PYTHONPATH pointing to the .pth directory is inherited.
* Similarly add test_start_processed_when_sitedir_already_on_path() to verify that .start files in
the same circumstances are also now processed.
* Update Lib/site.py
* Oops! Remove redundant code
---------
(cherry picked from commit
3c298e2e385fc6f462abaada2fd680deb1a2b58e )
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: BugBounty Mind <bugbounty-mind@deepseek.tui>
Co-authored-by: scoder <stefan_ml@behnel.de>
Miss Islington (bot) [Thu, 21 May 2026 20:02:10 +0000 (22:02 +0200)]
[3.15] gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304) (GH-150199)
(cherry picked from commit
65f99329edf5d0df3ee14d9a242e1a4c8b842211 )
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 21 May 2026 15:22:24 +0000 (17:22 +0200)]
[3.15] gh-149219: Test `frozendict` in `Lib/test/test_crossinterp.py` (GH-149220) (#150186)
gh-149219: Test `frozendict` in `Lib/test/test_crossinterp.py` (GH-149220)
(cherry picked from commit
c35b0f2b624ecc4d649a808acdb07a7fbcea60ac )
Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn [Thu, 21 May 2026 09:53:00 +0000 (12:53 +0300)]
[3.15] gh-149981: Test lazy import corner cases with module-level `__getattr__` (GH-149982) (#150185)
(cherry picked from commit
6dbf4ba403cd38d0219d3c7514f61c2ac8f6a74f )
Miss Islington (bot) [Wed, 20 May 2026 20:10:21 +0000 (22:10 +0200)]
[3.15] Add summary table to the `unicodedata` doc (GH-149957) (#150161)
(cherry picked from commit
87a879f4d0ec2e545e84c898c5ce452a6c87b09e )
Co-authored-by: Stan Ulbrych <stan@python.org>
Miss Islington (bot) [Wed, 20 May 2026 19:49:13 +0000 (21:49 +0200)]
[3.15] gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (GH-134264) (#150137)
gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (GH-134264)
---------
(cherry picked from commit
9dcf94e906906ff39c7955227c2b044b515ee162 )
Co-authored-by: Caleb <23644849+ctrlaltf2@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Wed, 20 May 2026 19:48:04 +0000 (21:48 +0200)]
[3.15] gh-143387: Add news blurb for importlib.metadata highlighting the change. (GH-150169) (#150171)
gh-143387: Add news blurb for importlib.metadata highlighting the change. (GH-150169)
(cherry picked from commit
cb3b4b98d8d141c9de0462a0fa7e227a2104c1c7 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Wed, 20 May 2026 15:17:28 +0000 (17:17 +0200)]
[3.15] PEP 810 - Update some error strings (GH-150126) (#150135)
Miss Islington (bot) [Wed, 20 May 2026 13:55:30 +0000 (15:55 +0200)]
[3.15] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147) (#150153)
gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147)
(cherry picked from commit
f621ba16b72510e1abc9646a844a632df4ac275c )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Wed, 20 May 2026 12:00:49 +0000 (14:00 +0200)]
[3.15] gh-150034: Print JSONL filename when profiling finishes (GH-150035) (#150151)
Miss Islington (bot) [Wed, 20 May 2026 11:59:10 +0000 (13:59 +0200)]
[3.15] gh-149584: Fix excessive overhead in the Tachyon profiler regarding the cache behavior (GH-149649) (#150152)
Miss Islington (bot) [Wed, 20 May 2026 11:51:54 +0000 (13:51 +0200)]
[3.15] gh-149807: Fix hash(frozendict): compute (key, value) pair hash (GH-149841) (#150149)
gh-149807: Fix hash(frozendict): compute (key, value) pair hash (GH-149841)
(cherry picked from commit
244300162d2e863a0588d1754e224d68931ada37 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 20 May 2026 11:48:24 +0000 (13:48 +0200)]
[3.15] gh-148260: Use at least 1 MiB stack size on musl (GH-149993) (#150150)
gh-148260: Use at least 1 MiB stack size on musl (GH-149993)
On Linux when Python is linked to the musl C library, use a thread
stack size of at least 1 MiB instead of musl default which is 128
kiB.
(cherry picked from commit
df6c157e51430e8e7458012417c534ad8c33119f )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 20 May 2026 01:03:47 +0000 (03:03 +0200)]
[3.15] gh-143387: Update docs to reflect the behavior and note the changed version. (GH-150095) (#150106)
gh-143387: Update docs to reflect the behavior and note the changed version. (GH-150095)
(cherry picked from commit
192796cfd4793cd7c9e88261795394ab016d5984 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Wed, 20 May 2026 01:00:54 +0000 (03:00 +0200)]
[3.15] gh-72088: clarify `inspect.ismethod` and `inspect.isfunction` (and related) usage with class-level access (GH-150013) (GH-150119)
(cherry picked from commit
0aa59ce2d4f007a9d19740eb2f6230ed302096f7 )
Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
Miss Islington (bot) [Wed, 20 May 2026 00:54:59 +0000 (02:54 +0200)]
[3.15] gh-134887: Add references to `locale` module for locale-aware number formatting references in `string` module docs (GH-134888) (GH-150120)
(cherry picked from commit
47723af4e74ae1a65108837fe15795e2f70f9d02 )
Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
Miss Islington (bot) [Wed, 20 May 2026 00:46:42 +0000 (02:46 +0200)]
[3.15] gh-150042: queue.SimpleQueue.put: fix minor refleak. (GH-150043) (GH-150127)
If queue.SimpleQueue.put can't handoff the item to a
waiting thread, and fails to allocate memory when adding
the item to a ringbuf, it would leak a reference. Fixed.
(cherry picked from commit
79088e0d82931c21fa72eadc416a18b7b0fdf9c1 )
Co-authored-by: larryhastings <larry@hastings.org>
Miss Islington (bot) [Tue, 19 May 2026 22:05:19 +0000 (00:05 +0200)]
[3.15] gh-150114: Reduce memory usage of test_free_threading.test_iteration (gh-150115) (#150124)
Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full
test_free_threading suite drops from ~850 MB to ~175 MB.
(cherry picked from commit
61f12211fc40aef4a2dcccb9c94aae8108042edb )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Dino Viehland [Tue, 19 May 2026 21:23:30 +0000 (14:23 -0700)]
[3.15] gh-150052: Resolve un-loaded lazily loaded submodules via module.__getattr__ instead of publishing lazy values (#150055)
Miss Islington (bot) [Tue, 19 May 2026 21:11:13 +0000 (23:11 +0200)]
[3.15] gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984) (GH-150113)
(cherry picked from commit
3d2aa899bad1c0e274640dc0c4323f1744e73435 )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Tue, 19 May 2026 20:57:21 +0000 (22:57 +0200)]
[3.15] gh-124111: Keep tests passing for Tcl prior to 9.0 (GH-150102)
Also disables the UWP build in CI, since it was breaking (and is no longer released).
(cherry picked from commit
ec9ce3ee98c68f235be6d075fa4bbd8f56d20256 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Tue, 19 May 2026 20:38:47 +0000 (22:38 +0200)]
[3.15] gh-149945: Fix potential OOM for gzip with large header (GH-149979) (GH-150093)
Do not read the whole filename and comment to memory for calculating the CRC.
(cherry picked from commit
51a5715df9c56f616944cf1b39323bd6ae009143 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 19 May 2026 17:48:48 +0000 (19:48 +0200)]
[3.15] gh-69619: Clarify whitespace definition in str.strip docs (#150049)
(cherry picked from commit
17eb17d43f66a0f7985fca05c7c9684bc01fabcd )
Co-authored-by: Daniil <d.mayorov@innopolis.university>
Miss Islington (bot) [Tue, 19 May 2026 08:44:35 +0000 (10:44 +0200)]
[3.15] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150064)
gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994)
(cherry picked from commit
ba0aca3bffce431fe2fbd53ca4cd6a717a2e2c19 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
Miss Islington (bot) [Tue, 19 May 2026 05:10:01 +0000 (07:10 +0200)]
[3.15] gh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011) (#150036)
bpo-42367: Restore os.makedirs() and pathlib.mkdir() ability to apply *mode* recursively via a new parent_mode= keyword argument.
(cherry picked from commit
9770e32ce07110f0c8c7a381604ec9a490028eed )
+ Make Path.mkdir parent_mode tests umask-independent
test_mkdir_with_parent_mode, test_mkdir_parent_mode_deep_hierarchy and
test_mkdir_parent_mode_same_as_mode assert exact directory mode bits but
did not pin the process umask. On buildbots running with a restrictive
umask (e.g. 0o077) the 0o755 leaf was masked down to 0o700, failing the
assertions. Wrap them in os_helper.temp_umask(0o022), matching the
other umask-aware mkdir tests in this file.
---------
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 19 May 2026 04:42:25 +0000 (06:42 +0200)]
[3.15] gh-149816: fix `dict.clear()` race on split-table dict with non-embedded values (GH-149914) (#150000)
gh-149816: fix `dict.clear()` race on split-table dict with non-embedded values (GH-149914)
(cherry picked from commit
169285470630b697c5e6e0e4c8091c31f25ffb04 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Tue, 19 May 2026 04:41:43 +0000 (06:41 +0200)]
[3.15] gh-149816: fix thread safety of deletion of list slice (GH-149936) (#150003)
gh-149816: fix thread safety of deletion of list slice (GH-149936)
(cherry picked from commit
00ea77613b942a9e08df6e3eb74b2ccd37641ba6 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Dino Viehland [Tue, 19 May 2026 00:53:54 +0000 (17:53 -0700)]
[3.15] gh-148587: Make sys.lazy_modules match PEP and keep internal lazy submodules tra… (#150014)
Make sys.lazy_modules match PEP and keep internal lazy submodules tracking internal
Miss Islington (bot) [Mon, 18 May 2026 23:53:57 +0000 (01:53 +0200)]
[3.15] gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025) (#150039)
gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025)
Remove assertion that could fail in rare race condition.
Replace the coarse critical section wrapping the entire function with
fine-grained sections covering only PyDict_Next + Py_INCREF.
Also handle PyDict_Next returning 0 in the single-item fast path.
(cherry picked from commit
57a0e570d36f41b953a91bbaf4262a5d05d0391b )
Co-authored-by: Saul Cooperman <58375603+scopreon@users.noreply.github.com>
Miss Islington (bot) [Mon, 18 May 2026 23:28:04 +0000 (01:28 +0200)]
[3.15] gh-149590: Remove faulthandler_traverse (GH-150023) (#150037)
gh-149590: Remove faulthandler_traverse (GH-150023)
`faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements `gc_refs` on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.
(cherry picked from commit
56737483c2ffdaadfec648fd38d409c6b10941c0 )
Co-authored-by: Armaan Vakharia <43391096+armaan-v924@users.noreply.github.com>
Miss Islington (bot) [Mon, 18 May 2026 21:47:19 +0000 (23:47 +0200)]
[3.15] gh-95816: Fix TLS version range example in docs (GH-148574) (#150008)
gh-95816: Fix TLS version range example in docs (GH-148574)
docs(ssl): Fix TLS version range example
(cherry picked from commit
dbd8985e8262055ed091de9a72660b7c112a4ce7 )
Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
Miss Islington (bot) [Mon, 18 May 2026 19:24:06 +0000 (21:24 +0200)]
[3.15] gh-149977: Fix extra output of `-m test test_lazy_import` (GH-149978) (#150016)
gh-149977: Fix extra output of `-m test test_lazy_import` (GH-149978)
(cherry picked from commit
6d5be4b1d6ca91a18e76ae8dad2c5e94837d6309 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Mon, 18 May 2026 16:16:55 +0000 (18:16 +0200)]
[3.15] gh-149816: Fix a RC in `_random.Random.__init__` method (GH-149824) (#149997)
gh-149816: Fix a RC in `_random.Random.__init__` method (GH-149824)
(cherry picked from commit
14af19e6c0d9dd05b525596fdd53373f726253d8 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Mon, 18 May 2026 13:52:17 +0000 (15:52 +0200)]
[3.15] gh-149887: Install python3t.lib for GIL-enabled Windows install (GH-149900)
gh-149887: Install python3t.lib for GIL-enabled Windows install (GH-149900)
(cherry picked from commit
bd6bf91fcba8a8fba8b9aea6cc971333c9be3ad9 )
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
Miss Islington (bot) [Mon, 18 May 2026 09:00:19 +0000 (11:00 +0200)]
[3.15] gh-149953: Fix null pointer dereference order in `code_objects.c` (GH-149956) (#149976)
gh-149953: Fix null pointer dereference order in `code_objects.c` (GH-149956)
Move check before
(cherry picked from commit
0ed497a350d76dd20de1a1689c84426c7c1d6e22 )
Co-authored-by: Nezuko Agent <nezukoagent@gmail.com>
Miss Islington (bot) [Sun, 17 May 2026 11:01:15 +0000 (13:01 +0200)]
[3.15] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (GH-149922) (#149943)
gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (GH-149922)
(cherry picked from commit
acefff95eab3db6b7cf837f3ce2707bbf9199376 )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Miss Islington (bot) [Sun, 17 May 2026 08:33:11 +0000 (10:33 +0200)]
[3.15] gh-149916: Restore the commented out part of test_body_encode in test_email (GH-149917) (GH-149937)
(cherry picked from commit
1cbe035723698f15aa1b1af5deef615b28aae2e5 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 16 May 2026 09:06:14 +0000 (11:06 +0200)]
[3.15] gh-149816: Fix a race condition in `_PyBytes_FromList` with free-threading (GH-149909) (#149911)
gh-149816: Fix a race condition in `_PyBytes_FromList` with free-threading (GH-149909)
(cherry picked from commit
46afba7b9324bc9492c3527d0fe47dd74f1f598c )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Fri, 15 May 2026 16:57:59 +0000 (18:57 +0200)]
[3.15] gh-142349: Add `help("lazy")` support (GH-149886) (#149889)
gh-142349: Add `help("lazy")` support (GH-149886)
(cherry picked from commit
8be3fb1b50ce6b01bf0924f0a0362a5e04af83b4 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Fri, 15 May 2026 14:12:05 +0000 (16:12 +0200)]
[3.15] gh-149786: Fixes venvlauncher builds on Windows free-threaded (GH-149847)
(cherry picked from commit
1c5fe21eb2a65190c04bb3f4c0931d76f5ccf415 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Fri, 15 May 2026 13:19:39 +0000 (15:19 +0200)]
[3.15] gh-138489: Add build-details.json generation to PC/layout (GH-149153)
(cherry picked from commit
4aa296f9c4a85a7badc09bf7ca6ede36cd8cd14c )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Fri, 15 May 2026 13:07:18 +0000 (15:07 +0200)]
[3.15] gh-149816: Fix race condition in `memoryview` with free-threading (GH-149858) (#149875)
gh-149816: Fix race condition in `memoryview` with free-threading (GH-149858)
(cherry picked from commit
1fdf0337742762cc47837042747cc607f024a202 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Fri, 15 May 2026 12:08:15 +0000 (14:08 +0200)]
[3.15] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804) (GH-149870)
Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit
20438866aefc2e63949d8bb85d8f8e55633fd977 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 15 May 2026 11:52:55 +0000 (13:52 +0200)]
[3.15] gh-148675: Use a string for ctypes cparam tag (GH-149778) (#149869)
gh-148675: Use a string for ctypes cparam tag (GH-149778)
(cherry picked from commit
3ecca22567249ae44bf4369fbdb4d6d056701405 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Fri, 15 May 2026 11:36:21 +0000 (13:36 +0200)]
[3.15] gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791) (#149865)
gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791)
Change my_strchr() return type to "const char*" (add "const").
Fix the compiler warning:
Modules/_ctypes/_ctypes_test.c: In function 'my_strchr':
Modules/_ctypes/_ctypes_test.c:451:12: warning: return discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
451 | return strchr(s, c);
| ^~~~~~
When using C23, strchr(text, ch) return type is "const char*" if text
type is "const char*".
(cherry picked from commit
5465b69255890650df99debb8256e0a7bc68138b )
Miss Islington (bot) [Fri, 15 May 2026 10:50:45 +0000 (12:50 +0200)]
[3.15] gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648) (#149792)
gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648)
ftpcp() called parse227() directly and passed the source server's
self-reported PASV IPv4 address to the target server's PORT command,
bypassing the CVE-2021-4189 fix that was applied only to FTP.makepasv().
A malicious source FTP server could use this to redirect the target
server's data connection to an arbitrary host:port (SSRF).
ftpcp() now uses the source server's actual peer address, honoring the
existing trust_server_pasv_ipv4_address opt-out, the same as makepasv().
Thanks to Qi Ding at Aurascape AI for the report. (GHSA-w8c5-q2xf-gf7c)
(cherry picked from commit
eac4fe3b2c77693790a5ef7dfab127c1fee81bf9 )
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Miss Islington (bot) [Fri, 15 May 2026 07:24:43 +0000 (09:24 +0200)]
[3.15] gh-149763: Improve availablity docs in `select.rst` (GH-149764) (#149854)
gh-149763: Improve availablity docs in `select.rst` (GH-149764)
(cherry picked from commit
7e98debdf4bfcf1c3f592c9424bc654117c2723e )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Thu, 14 May 2026 22:38:11 +0000 (00:38 +0200)]
[3.15] gh-149144: Use decodeURIComponent() for UTF-8 support in js_output() (GH-149157) (GH-149846)
gh-149144: Use decodeURIComponent() for UTF-8 support in js_output() (GH-149157)
(cherry picked from commit
461b1d96313de02992d284c1782be9aff24586c9 )
Co-authored-by: Seth Larson <seth@python.org>
Miss Islington (bot) [Thu, 14 May 2026 18:49:29 +0000 (20:49 +0200)]
[3.15] gh-124111: Update Windows build to use Tcl/Tk 9.0.3 (GH-149842)
(cherry picked from commit
c62c3710dc795a60c3c3dc8e2aeeeb16c06da197 )
Co-authored-by: Zachary Ware <zach@python.org>
Petr Viktorin [Thu, 14 May 2026 17:16:23 +0000 (19:16 +0200)]
[3.15] gh-149231: Revert extra NEWS entry (GH-149840)
gh-149231: Revert extra NEWS entry
This reverts commit
dc7cad2f5db834aefb5ecabebc6f25bbb898381b .
Miss Islington (bot) [Thu, 14 May 2026 17:09:05 +0000 (19:09 +0200)]
[3.15] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149836)
Link to existing rules in compound_stmts.rst (GH-149811)
In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)
Replace the names with ones that appear in docs:
- `star_named_expression` in the grammar corresponds to
`flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
`flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
`assignment_expression` in the docs
Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit
c37529293d1e05081cb4e8668162c76583b88007 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Thu, 14 May 2026 10:37:11 +0000 (12:37 +0200)]
[3.15] gh-148821: Add more tests for invalid XML encodings (GH-149820) (GH-149821)
(cherry picked from commit
c6f7368157ecf9f2cdd537d8b6fad6e011bce344 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 14 May 2026 08:52:51 +0000 (10:52 +0200)]
[3.15] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149812)
(cherry picked from commit
f1a47e79fb7081d3cde6364530bfa98240ebbe4c )
Co-authored-by: Stan Ulbrych <stan@python.org>
Miss Islington (bot) [Wed, 13 May 2026 23:34:59 +0000 (01:34 +0200)]
[3.15] Fix incorrect sentence in stable.rst (GH-149684) (GH-149814)
(cherry picked from commit
374f9d3f5e70d2204d88ab123f29825d71537de2 )
Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
Miss Islington (bot) [Wed, 13 May 2026 23:24:29 +0000 (01:24 +0200)]
[3.15] gh-149231: tomllib: Limit the number of parts in a key (GH-149233) (GH-149677)
(cherry picked from commit
bc7c102f3462a9f014f3ac2546acfb471b2a7eae )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Barry Warsaw [Wed, 13 May 2026 22:45:39 +0000 (15:45 -0700)]
[3.15] gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.add sitedir() (#149659) (#149799)
* gh-149504: Fix re-entrancy bug when .pth/.start file invokes site.addsitedir() (#149659)
* Add re-entrant tests for gh-149504
* Add end-to-end integration test coverage
This ensures that future whitebox internal test changes do not regress the
public surface semantics.
* Implement a state class to process .pth and .start files
By using this state class and managing implicit and explicit batching, we make it structurally
impossible to get bitten by re-entrant site startup processing.
Fixes #149504
(cherry picked from commit
b162307d7f216e87976d76c9b8f4a932961cb2d4 )
* Add myself back to CODEOWNERS
Miss Islington (bot) [Wed, 13 May 2026 22:00:29 +0000 (00:00 +0200)]
[3.15] gh-140550: Update xxlimited with 3.15 limited API (GH-142827) (GH-149785)
(cherry picked from commit
fa81cd976ad88e022839a37501d75d8716e22e3b )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Wed, 13 May 2026 21:29:08 +0000 (23:29 +0200)]
[3.15] gh-149685: Use the _Py prefix for private C macros (GH-149686) (GH-149790)
(cherry picked from commit
125f26358ac7ecab98095fa85490e5465bdad698 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>