]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
7 days agogh-146445: Update CODEOWNERS for Android and iOS migration to Platforms directory...
Malcolm Smith [Fri, 8 May 2026 10:32:36 +0000 (11:32 +0100)] 
gh-146445: Update CODEOWNERS for Android and iOS migration to Platforms directory (#149543)

7 days agogh-149521: Do not update `last_profiled_frame` if it's not changed (#149522)
Maurycy Pawłowski-Wieroński [Fri, 8 May 2026 08:25:49 +0000 (10:25 +0200)] 
gh-149521: Do not update `last_profiled_frame` if it's not changed (#149522)

7 days agogh-149528: Remove `annotationlib.ForwardRef._evaluate` for 3.16 (#149529)
sobolevn [Fri, 8 May 2026 04:48:15 +0000 (07:48 +0300)] 
gh-149528: Remove `annotationlib.ForwardRef._evaluate` for 3.16 (#149529)

7 days agogh-149481: skip `FOR_ITER` inline specialization for Python `__next__` (#149491)
Neko Asakura [Thu, 7 May 2026 23:02:04 +0000 (07:02 +0800)] 
gh-149481: skip `FOR_ITER` inline specialization for Python `__next__` (#149491)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <stan@python.org>
7 days agoImprove error messages when the WASI SDK can't be found (GH-149508)
Brett Cannon [Thu, 7 May 2026 22:20:35 +0000 (15:20 -0700)] 
Improve error messages when the WASI SDK can't be found (GH-149508)

7 days agogh-106693: Revert "Explicitly mark ob_sval as unsigned char to avoid UB (#106826...
Hugo van Kemenade [Thu, 7 May 2026 20:39:08 +0000 (23:39 +0300)] 
gh-106693: Revert "Explicitly mark ob_sval as unsigned char to avoid UB (#106826)" (#149514)

7 days agogh-79638: Treat an unreachable robots.txt as "disallow all" (GH-138555)
Serhiy Storchaka [Thu, 7 May 2026 19:06:57 +0000 (22:06 +0300)] 
gh-79638: Treat an unreachable robots.txt as "disallow all" (GH-138555)

Disallow all access in urllib.robotparser if the robots.txt file is
unreachable due to server or network errors.

7 days agogh-106693: Explicitly mark ob_sval as unsigned char to avoid UB (#106826)
Pablo Galindo Salgado [Thu, 7 May 2026 19:06:53 +0000 (20:06 +0100)] 
gh-106693: Explicitly mark ob_sval as unsigned char to avoid UB (#106826)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
7 days agogh-149499: Fixes for 3.16 bump (GH-149500)
Stan Ulbrych [Thu, 7 May 2026 19:06:37 +0000 (20:06 +0100)] 
gh-149499: Fixes for 3.16 bump (GH-149500)

Also fixes gh-149507, regenerating `configure` for 3.16.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
8 days agoPython 3.16.0a0
Hugo van Kemenade [Thu, 7 May 2026 16:05:52 +0000 (19:05 +0300)] 
Python 3.16.0a0

8 days agoPython 3.15.0b1 v3.15.0b1
Hugo van Kemenade [Thu, 7 May 2026 13:26:06 +0000 (16:26 +0300)] 
Python 3.15.0b1

8 days agogh-126910: Update 3.15 what's new to include GDB/backtrace integration (#149494)
Diego Russo [Thu, 7 May 2026 13:05:29 +0000 (14:05 +0100)] 
gh-126910: Update 3.15 what's new to include GDB/backtrace integration (#149494)

Update 3.15 what's new to include GDB/backtrace intergration

8 days agogh-148937: revert process RSS based GC deferral (#149475)
Neil Schemenauer [Thu, 7 May 2026 11:32:14 +0000 (04:32 -0700)] 
gh-148937: revert process RSS based GC deferral (#149475)

8 days agogh-149202: Don't use -fno-omit-frame-pointer on ppc64le (#149485)
Victor Stinner [Thu, 7 May 2026 09:47:08 +0000 (11:47 +0200)] 
gh-149202: Don't use -fno-omit-frame-pointer on ppc64le (#149485)

The power ABI specification requires that compilers maintain a back
chain by default, so unwinding already works without a dedicated
frame pointer. Don't use -fno-omit-frame-pointer on ppc64le.

8 days agogh-149202: Fix frame pointer unwinding on ppc64le and armv7/clang (#149409)
Petr Viktorin [Thu, 7 May 2026 08:37:00 +0000 (10:37 +0200)] 
gh-149202: Fix frame pointer unwinding on ppc64le and armv7/clang (#149409)

- ppc64's backchain format is also different from x86
- On 32-bit ARM, clang needs `-mno-thumb`, not `-marm` like GCC

8 days agogh-142295: Update macOS framework build Info.plist files. (#149479)
Ned Deily [Thu, 7 May 2026 03:52:23 +0000 (23:52 -0400)] 
gh-142295: Update macOS framework build Info.plist files. (#149479)

For Python macOS framework builds, update all Info.plist files to be more
compliant with current Apple guidelines. Original patch contributed by
Martinus Verburg.

8 days agogh-142295: Update CFBundleShortVersionString in Mac framework Info.plist (#143064)
Martinus Verburg [Thu, 7 May 2026 03:07:17 +0000 (05:07 +0200)] 
gh-142295: Update CFBundleShortVersionString in Mac framework Info.plist (#143064)

Updated macOS framework Info.plist to use x.y.z format for CFBundleShortVersionString to comply with Apple guidelines. Patch contributed by Martinus Verburg.

8 days agogh-149101: Implement PEP 788 (GH-149116)
Peter Bierma [Wed, 6 May 2026 21:39:30 +0000 (17:39 -0400)] 
gh-149101: Implement PEP 788 (GH-149116)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
8 days agoUpdate Doc/pylock.toml (#149467)
Ned Batchelder [Wed, 6 May 2026 20:05:30 +0000 (16:05 -0400)] 
Update Doc/pylock.toml (#149467)

update Doc/pylock.toml

8 days agogh-141560: Add annotation_format parameter to getfullargspec (#149457)
Jelle Zijlstra [Wed, 6 May 2026 19:00:56 +0000 (12:00 -0700)] 
gh-141560: Add annotation_format parameter to getfullargspec (#149457)

9 days agogh-148823: Avoid importing `_colorize` when creating an `ArgumentParser` (#148827)
David Ellis [Wed, 6 May 2026 18:24:18 +0000 (19:24 +0100)] 
gh-148823: Avoid importing `_colorize` when creating an `ArgumentParser` (#148827)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
9 days agogh-148599: Update WSA `socket` error codes (#148033)
Alexis Dauphin [Wed, 6 May 2026 17:52:23 +0000 (19:52 +0200)] 
gh-148599: Update WSA `socket` error codes (#148033)

9 days agogh-133879: Copyedit "What's new in Python 3.15" (#149451)
Hugo van Kemenade [Wed, 6 May 2026 17:33:08 +0000 (20:33 +0300)] 
gh-133879: Copyedit "What's new in Python 3.15" (#149451)

9 days agogh-144384: Lazily import `_colorize` (#149318)
Hugo van Kemenade [Wed, 6 May 2026 16:07:43 +0000 (19:07 +0300)] 
gh-144384: Lazily import `_colorize` (#149318)

9 days agogh-124111: Only set TCLSH_NATIVE for AMD64/ARM64 (GH-149443)
Zachary Ware [Wed, 6 May 2026 16:04:42 +0000 (11:04 -0500)] 
gh-124111: Only set TCLSH_NATIVE for AMD64/ARM64 (GH-149443)

The Tcl 9 makefile.vc now uses TCLSH_NATIVE during the build process,
not just the installation.  We had been setting it to the installed
location of the x86 tclsh.exe, which does not yet exist when the x86
build process needs it.  That build doesn't actually need TCLSH_NATIVE,
though (there's a check specifically allowing TCLSH to be used if
MACHINE is IX86 and TCLSH_NATIVE is undefined), so don't set it.

9 days agoRewrite RTD configuration to use build.jobs rather than build.commands (GH-149429)
Zachary Ware [Wed, 6 May 2026 15:44:47 +0000 (10:44 -0500)] 
Rewrite RTD configuration to use build.jobs rather than build.commands (GH-149429)

As part of this conversion, we now ensure that we're comparing against the
merge-base of the PR branch and the base branch when checking whether an RTD
build is worthwhile, deepening the history of the base branch by up to 500
commits if necessary.  If the merge-base can't be found or there are merge
conflicts with the head of the base branch, the build is skipped since it would
give a warped perception of the actual changes anyway.

This unfortunately does nothing about RTD preview comments comparing against
the wrong base, other than skipping builds that shouldn't produce any diff at
all thus avoiding the comment.

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
9 days agogh-149202: Fix frame pointer unwinding on s390x and ARM (GH-149362)
Pablo Galindo Salgado [Wed, 6 May 2026 15:03:37 +0000 (16:03 +0100)] 
gh-149202: Fix frame pointer unwinding on s390x and ARM (GH-149362)

-fno-omit-frame-pointer is not enough to make every target walkable by the
simple manual frame pointer unwinder.

The helper used by test_frame_pointer_unwind used to assume the frame pointer
named a two-word record where fp[0] was the previous frame pointer and fp[1]
was the return address. That is only the generic layout used by some targets.
This patch keeps that default, but moves the slots behind named offsets so
architecture-specific layouts can describe where the backchain and return
address really live.

On s390x, GCC and Clang do not emit a usable backchain unless -mbackchain is
enabled. Without it, the unwinder stops at the current C frame and the test
reports no Python frames. Once backchains are present, the helper must also
stop at the current thread's known C stack bounds; otherwise it can follow the
final backchain far enough to dereference an invalid frame and segfault.
For Linux s390x backchain frames, the documented z/Architecture stack-frame
layout saves r14, the return-address register, at byte offset 112 from the
frame pointer, so read the return address from that named slot instead of fp[1].

The 112-byte offset comes from Linux's s390 debugging documentation: its Stack
Frame Layout table shows z/Architecture backchain frames with the backchain at
offset 0 and saved r14 of the caller function at offset 112:
https://www.kernel.org/doc/html/v5.3/s390/debugging390.html#stack-frame-layout

This helper remains scoped to Linux s390x backchain frames. GNU SFrame's s390x
notes state that the s390x ELF ABI does not generally mandate where RA and FP
are saved, or whether they are saved at all:
https://sourceware.org/binutils/docs/sframe-spec.html#s390x

As Jens Remus noted, -fno-omit-frame-pointer is not needed when -mbackchain is
present.

On 32-bit ARM, GCC defaults to Thumb mode on common armhf toolchains. The Thumb
prologue keeps the saved frame pointer and link register at offsets that depend
on the generated frame, which breaks the fp[0]/fp[1] walk used by the helper.
Use -marm when it is supported for frame-pointer builds, and teach the helper
the GCC ARM-mode slots where the previous frame pointer is at fp[-1] and the
saved LR return address is at fp[0].

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
9 days agogh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() ...
Alex Malyshev [Wed, 6 May 2026 15:01:12 +0000 (11:01 -0400)] 
gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() (#148145)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
9 days agogh-142307: deprecate legacy support for altering `IMAP4.file` (#142335)
Bénédikt Tran [Wed, 6 May 2026 14:41:26 +0000 (16:41 +0200)] 
gh-142307: deprecate legacy support for altering `IMAP4.file` (#142335)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 days agogh-139489: Add xml.is_valid_text() (GH-149412)
Serhiy Storchaka [Wed, 6 May 2026 14:40:10 +0000 (17:40 +0300)] 
gh-139489: Add xml.is_valid_text() (GH-149412)

9 days agogh-148675: Optimize arraydescr structure: use char[3] (GH-149455)
Victor Stinner [Wed, 6 May 2026 14:28:11 +0000 (16:28 +0200)] 
gh-148675: Optimize arraydescr structure: use char[3] (GH-149455)

Replace "const char *typecode;" with "char typecode[3];" to make the
arraydescr structure smaller and avoids an indirection.

9 days agogh-137586: Replace 'osascript' with 'open' on macOS in webbrowser (#146439)
Jeff Lyon [Wed, 6 May 2026 13:56:17 +0000 (06:56 -0700)] 
gh-137586: Replace 'osascript' with 'open' on macOS in webbrowser (#146439)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
9 days agogh-146270: Fix `PyMember_SetOne(..., NULL)` not being atomic (gh-148800)
Daniele Parmeggiani [Wed, 6 May 2026 13:50:24 +0000 (14:50 +0100)] 
gh-146270: Fix `PyMember_SetOne(..., NULL)` not being atomic (gh-148800)

Fixes a sequential consistency bug whereby two threads that are deleting a struct member may observe both their deletions to be successful.

9 days agogh-148766: Add colour to Python help (#148767)
Hugo van Kemenade [Wed, 6 May 2026 13:48:04 +0000 (16:48 +0300)] 
gh-148766: Add colour to Python help (#148767)

9 days agogh-146238: Add missing tests for 'e', 'Zf' and 'Zd' array type codes in test_buffer...
Sergey B Kirpichev [Wed, 6 May 2026 13:14:49 +0000 (16:14 +0300)] 
gh-146238: Add missing tests for 'e', 'Zf' and 'Zd' array type codes in test_buffer (#149345)

This amends e79fd60.  I'll not fix this for 'F'/'D' complex types as
they might be removed.

9 days agogh-100239: specialize mixed int/float inplace binary ops (GH-149413)
Wulian233 [Wed, 6 May 2026 12:59:08 +0000 (20:59 +0800)] 
gh-100239: specialize mixed int/float inplace binary ops (GH-149413)

9 days agogh-149415: Replace `typing._LazyAnnotationLib` with `lazy import` (#149416)
sobolevn [Wed, 6 May 2026 12:58:45 +0000 (15:58 +0300)] 
gh-149415: Replace `typing._LazyAnnotationLib` with `lazy import` (#149416)

9 days agoReplace use of Python keyword in `issubclass` function documentation (#142357)
Guo Ci [Wed, 6 May 2026 12:08:13 +0000 (08:08 -0400)] 
Replace use of Python keyword in `issubclass` function documentation (#142357)

9 days agogh-148641: Flesh out PEP 829 for What's New (#149347)
Barry Warsaw [Wed, 6 May 2026 11:22:54 +0000 (04:22 -0700)] 
gh-148641: Flesh out PEP 829 for What's New (#149347)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 days agoAdd the posix dependencies to Ubuntu JIT builds (#149422)
Diego Russo [Wed, 6 May 2026 09:20:11 +0000 (10:20 +0100)] 
Add the posix dependencies to Ubuntu JIT builds (#149422)

9 days agoSkip test_jit when the JIT backend is "interpreter" (GH-149423)
Diego Russo [Wed, 6 May 2026 08:20:33 +0000 (09:20 +0100)] 
Skip test_jit when the JIT backend is "interpreter" (GH-149423)

9 days agogh-148615: Handle `--` separator in pdb argument parsing (#148624)
Shrey Naithani [Wed, 6 May 2026 04:22:58 +0000 (09:52 +0530)] 
gh-148615: Handle `--` separator in pdb argument parsing (#148624)

9 days agogh-124111: Fix tclWin32Exe value in tcltk.props for Tcl 9 (GH-149441)
Zachary Ware [Wed, 6 May 2026 03:48:00 +0000 (22:48 -0500)] 
gh-124111: Fix tclWin32Exe value in tcltk.props for Tcl 9 (GH-149441)

9 days agogh-149096: Remove 'im_*' attribute reference from inspect module docstring (#149108)
Vineet Kumar [Wed, 6 May 2026 02:25:08 +0000 (07:55 +0530)] 
gh-149096: Remove  'im_*' attribute reference from inspect module docstring (#149108)

The im_class/func/self names were removed in 3.0.  The prefix appears nowhere else in inspect.py
and nowhere in inspect.rst.

9 days agogh-149425: Increase `test_write_without_source_date_epoch` assertion delta (#149426)
Eduardo Villalpando Mello [Tue, 5 May 2026 21:22:04 +0000 (14:22 -0700)] 
gh-149425: Increase `test_write_without_source_date_epoch` assertion delta (#149426)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
10 days agogh-149353: Preserve JIT shim object during PGO clean (#149387)
Diego Russo [Tue, 5 May 2026 15:20:12 +0000 (16:20 +0100)] 
gh-149353: Preserve JIT shim object during PGO clean (#149387)

10 days agogh-149410: Test that `typing.NoDefault` is final (#149411)
sobolevn [Tue, 5 May 2026 14:58:49 +0000 (17:58 +0300)] 
gh-149410: Test that `typing.NoDefault` is final (#149411)

10 days agoGH-143732: SEND specialization (GH-148963)
Mark Shannon [Tue, 5 May 2026 14:19:16 +0000 (15:19 +0100)] 
GH-143732: SEND specialization (GH-148963)

* SEND specialization. Adds 2 new specialized instructions:

* SEND_VIRTUAL: for sends to virtual iterators e.g lists and tuples
* SEND_ASYNC_GEN: for sends to async generators

Tweak FOR_ITER_VIRTUAL so that SEND_VIRTUAL and FOR_ITER_VIRTUAL use equivalent guards

10 days agogh-137855: Improve import time of `pathlib` (GH-146327)
Hugo van Kemenade [Tue, 5 May 2026 12:38:03 +0000 (15:38 +0300)] 
gh-137855: Improve import time of `pathlib` (GH-146327)

Improve import time of pathlib

10 days agogh-149189: Modern defaults for `pprint` (#149190)
Hugo van Kemenade [Tue, 5 May 2026 12:04:05 +0000 (15:04 +0300)] 
gh-149189: Modern defaults for `pprint` (#149190)

10 days agogh-149216: Notify type watchers on heap type deallocation (GH-149236)
Anuj Nitin Bharambe [Tue, 5 May 2026 10:24:07 +0000 (15:54 +0530)] 
gh-149216: Notify type watchers on heap type deallocation (GH-149236)

Authored-by: Anuj Bharambe <anujnitinb@gmail.com>
10 days agogh-149403: Fix `NameError` in `Lib/test/test_capi/test_getargs.py` (#149404)
sobolevn [Tue, 5 May 2026 09:58:32 +0000 (12:58 +0300)] 
gh-149403: Fix `NameError` in `Lib/test/test_capi/test_getargs.py` (#149404)

10 days agoIgnore `.jit-stamp` generated file (#149401)
sobolevn [Tue, 5 May 2026 09:10:34 +0000 (12:10 +0300)] 
Ignore `.jit-stamp` generated file (#149401)

10 days agogh-148726: Add gc changes to What's New (#149398)
Hugo van Kemenade [Tue, 5 May 2026 09:05:48 +0000 (12:05 +0300)] 
gh-148726: Add gc changes to What's New (#149398)

10 days agoGH-126910: Add GNU backtrace support for unwinding JIT frames (#149104)
Diego Russo [Tue, 5 May 2026 08:29:07 +0000 (09:29 +0100)] 
GH-126910: Add GNU backtrace support for unwinding JIT frames (#149104)

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
10 days agogh-145378: Generate consistent colors for pdb commands (#149305)
Tian Gao [Tue, 5 May 2026 08:25:45 +0000 (01:25 -0700)] 
gh-145378: Generate consistent colors for pdb commands (#149305)

10 days agogh-139489: Add xml.is_valid_name() (GH-139768)
Serhiy Storchaka [Tue, 5 May 2026 08:25:22 +0000 (11:25 +0300)] 
gh-139489: Add xml.is_valid_name() (GH-139768)

It allows to check whether a string can be used as an element or attribute
name in XML.

10 days agogh-140550: Single What's New highlight for PEPs 793, 803 and 820 (GH-149397)
Petr Viktorin [Tue, 5 May 2026 07:50:00 +0000 (09:50 +0200)] 
gh-140550: Single What's New highlight for PEPs 793, 803 and 820 (GH-149397)

Also: a section in New Features for 793

10 days agogh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055)
Petr Viktorin [Tue, 5 May 2026 07:18:04 +0000 (09:18 +0200)] 
gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
10 days agogh-137840: Document PEP 728 (#149207)
Jelle Zijlstra [Tue, 5 May 2026 03:30:03 +0000 (20:30 -0700)] 
gh-137840: Document PEP 728 (#149207)

10 days agogh-130472: Use fancycompleter in import completions (#148188)
Tomas R. [Tue, 5 May 2026 01:36:43 +0000 (03:36 +0200)] 
gh-130472: Use fancycompleter in import completions (#148188)

10 days agogh-137293: Ignore Exceptions when searching ELF File in Remote Debug (#137309)
Uxío García Andrade [Tue, 5 May 2026 00:51:39 +0000 (02:51 +0200)] 
gh-137293: Ignore Exceptions when searching ELF File in Remote Debug (#137309)

10 days agogh-149202: Highlight PEP 831 in What's New for Python 3.15 (#149390)
Pablo Galindo Salgado [Tue, 5 May 2026 00:51:28 +0000 (01:51 +0100)] 
gh-149202: Highlight PEP 831 in What's New for Python 3.15 (#149390)

10 days agogh-149009: Validate `thread_count` in `profiling.sampling` binary reader (#149147)
Maurycy Pawłowski-Wieroński [Tue, 5 May 2026 00:50:06 +0000 (02:50 +0200)] 
gh-149009: Validate `thread_count` in `profiling.sampling` binary reader (#149147)

10 days agogh-146256: Add `--jsonl` collector to the `profiling.sampling` (#146257)
Maurycy Pawłowski-Wieroński [Tue, 5 May 2026 00:44:37 +0000 (02:44 +0200)] 
gh-146256: Add `--jsonl` collector to the `profiling.sampling` (#146257)

10 days agogh-149230: `_remote_debugging`: Fix async-aware for tasks in non-main threads (#149235)
Maurycy Pawłowski-Wieroński [Tue, 5 May 2026 00:33:56 +0000 (02:33 +0200)] 
gh-149230: `_remote_debugging`: Fix async-aware for tasks in non-main threads (#149235)

10 days agogh-149342: `_remote_debugging`: Fix binary profile corruption when sampling a (tempor...
Maurycy Pawłowski-Wieroński [Tue, 5 May 2026 00:32:06 +0000 (02:32 +0200)] 
gh-149342: `_remote_debugging`: Fix binary profile corruption when sampling a (temporarily) empty stack (#149343)

10 days agogh-149300: `_remote_debugging`: clean up magic and duplicate consts in the binary...
Maurycy Pawłowski-Wieroński [Tue, 5 May 2026 00:31:53 +0000 (02:31 +0200)] 
gh-149300: `_remote_debugging`: clean up magic and duplicate consts in the binary format helper (#149301)

10 days agogh-98894: Restore function entry/exit DTrace probes (#142397)
Pablo Galindo Salgado [Tue, 5 May 2026 00:29:55 +0000 (01:29 +0100)] 
gh-98894: Restore function entry/exit DTrace probes (#142397)

The function__entry and function__return probes stopped working in Python 3.11
when the interpreter was restructured around the new bytecode system. This change
restores these probes by adding DTRACE_FUNCTION_ENTRY() at the start_frame label
in bytecodes.c and DTRACE_FUNCTION_RETURN() in the RETURN_VALUE and YIELD_VALUE
instructions. The helper functions are defined in ceval.c and extract the
filename, function name, and line number from the frame before firing the probe.

This builds on the approach from https://github.com/python/cpython/pull/125019
but avoids modifying the JIT template since the JIT does not currently support
DTrace. The macros are conditionally compiled with WITH_DTRACE and are no-ops
otherwise. The tests have been updated to use modern opcode names (CALL, CALL_KW,
CALL_FUNCTION_EX) and a new bpftrace backend was added for Linux CI alongside
the existing SystemTap tests. Line probe tests were removed since that probe
was never restored after 3.11.

10 days agogh-146462: Add dict introspection debug offsets (#148633)
Pablo Galindo Salgado [Mon, 4 May 2026 23:00:23 +0000 (00:00 +0100)] 
gh-146462: Add dict introspection debug offsets (#148633)

10 days agogh-142389: Add support for backtick colorisation in argparse help text (#149375)
Hugo van Kemenade [Mon, 4 May 2026 22:58:04 +0000 (01:58 +0300)] 
gh-142389: Add support for backtick colorisation in argparse help text (#149375)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
10 days agogh-142389: Add backticks to stdlib argparse help to display in colour (#149384)
Hugo van Kemenade [Mon, 4 May 2026 22:23:18 +0000 (01:23 +0300)] 
gh-142389: Add backticks to stdlib argparse help to display in colour (#149384)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
10 days agoGH-130750: Restore quoting of choices in argparse error messages to match documentati...
Savannah Ostrowski [Mon, 4 May 2026 21:51:48 +0000 (14:51 -0700)] 
GH-130750: Restore quoting of choices in argparse error messages to match documentation and improve clarity (#144983)

10 days agogh-146406: Add cross-language method suggestions for builtin AttributeError (#146407)
Matt Van Horn [Mon, 4 May 2026 21:38:07 +0000 (14:38 -0700)] 
gh-146406: Add cross-language method suggestions for builtin AttributeError (#146407)

When Levenshtein-based suggestions find no match for an AttributeError
on list, str, or dict, check a static table of common method names from
JavaScript, Java, C#, and Ruby.

For example, [].push() now suggests .append(), "".toUpperCase() suggests
.upper(), and {}.keySet() suggests .keys().

The list.add() case suggests using a set instead of suggesting .append(),
since .add() is a set method and the user may have passed a list where
a set was expected (per discussion with Serhiy Storchaka, Terry Reedy,
and Paul Moore).

Design: flat (type, attr) -> suggestion text table, no runtime
introspection. Only exact builtin types are matched to avoid false
positives on subclasses.

Discussion: https://discuss.python.org/t/106632

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 days agoGH-148726: Add heap_size to generational GC (#149195)
Sergey Miryanov [Mon, 4 May 2026 21:14:45 +0000 (02:14 +0500)] 
GH-148726: Add heap_size to generational GC (#149195)

10 days agogh-149377: update bundled pip to 26.1.1 (#149378)
Stéphane Bidoul [Mon, 4 May 2026 19:58:28 +0000 (21:58 +0200)] 
gh-149377: update bundled pip to 26.1.1 (#149378)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
11 days agogh-149321: Fix stdlib imports with lazy imports disabled (#149338)
Pablo Galindo Salgado [Mon, 4 May 2026 18:03:21 +0000 (19:03 +0100)] 
gh-149321: Fix stdlib imports with lazy imports disabled (#149338)

11 days agogh-138907: Support RFC 9309 in robotparser (GH-138908)
Serhiy Storchaka [Mon, 4 May 2026 18:03:11 +0000 (21:03 +0300)] 
gh-138907: Support RFC 9309 in robotparser (GH-138908)

* empty lines are always ignored instead of separating groups
* the "user-agent" line after a rule starts a new group
* groups matching the same user agent are now merged
* the rule with the longest match wins instead of the first matching rule
* in case of equal matches, the “Allow” rule wins over “Disallow”
* special characters “$” and “*” are now supported in rules
* prefer full match for user agent

11 days agogh-145917: Add MIME types for TTC and Haptics formats (#145918)
Charlie Lin [Mon, 4 May 2026 18:02:50 +0000 (14:02 -0400)] 
gh-145917: Add MIME types for TTC and Haptics formats (#145918)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
11 days agogh-148690: Build Windows freethreaded binaries into separate directory and include...
Steve Dower [Mon, 4 May 2026 16:45:08 +0000 (17:45 +0100)] 
gh-148690: Build Windows freethreaded binaries into separate directory and include python3t.dll on GIL-enabled (GH-149218)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
11 days agogh-143732: add specialization for `FOR_ITER` (GH-148745)
Neko Asakura [Mon, 4 May 2026 16:29:10 +0000 (00:29 +0800)] 
gh-143732: add specialization for `FOR_ITER` (GH-148745)

11 days agogh-137030: Fix YIELD_VALUE bytecode assertion (#149184)
Victor Stinner [Mon, 4 May 2026 16:09:57 +0000 (18:09 +0200)] 
gh-137030: Fix YIELD_VALUE bytecode assertion (#149184)

Co-authored-by: Mark Shannon <mark@hotpy.org>
11 days agogh-149225: Expose Py_CriticalSection in Stable ABI (GH-149227)
Petr Viktorin [Mon, 4 May 2026 15:32:17 +0000 (17:32 +0200)] 
gh-149225: Expose Py_CriticalSection in Stable ABI (GH-149227)

11 days agogh-148675: Remove F and D formats from array and memoryview (GH-149368)
Victor Stinner [Mon, 4 May 2026 15:26:30 +0000 (17:26 +0200)] 
gh-148675: Remove F and D formats from array and memoryview (GH-149368)

11 days agogh-137337: Clarify import statement namespace binding (GH-144607)
Kit Dallege [Mon, 4 May 2026 14:45:00 +0000 (16:45 +0200)] 
gh-137337: Clarify import statement namespace binding (GH-144607)

It is not always in the local namespace.

11 days agogh-148292: Remove shutdown() test in test_ssl.test_got_eof() (#149366)
Victor Stinner [Mon, 4 May 2026 14:20:25 +0000 (16:20 +0200)] 
gh-148292: Remove shutdown() test in test_ssl.test_got_eof() (#149366)

The shutdown() behavior depends too much on the operating system and
it's unrelated to the got_eof_error change.

11 days agogh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct (#148676)
Victor Stinner [Mon, 4 May 2026 14:14:23 +0000 (16:14 +0200)] 
gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct (#148676)

* Add Zd/Zf format support to array, memoryview and struct.
* ctypes: Replace F/D/G complex format with Zf/Zd/Zg.
* Modify array, ctypes and struct modules to support format strings
  longer than 1 character (such as "Zd").
* Change array.typecodes type from str to tuple.

11 days agogh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999)
Maurycy Pawłowski-Wieroński [Mon, 4 May 2026 13:45:31 +0000 (15:45 +0200)] 
gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999)

11 days agogh-149010: Improve reliability of inspect CLI (#149357)
Alyssa Coghlan [Mon, 4 May 2026 13:42:20 +0000 (20:42 +0700)] 
gh-149010: Improve reliability of inspect CLI (#149357)

* Handle non-source modules more gracefully (and consistently)
* Improve handling of frozen modules (which may or may not have source)
* Avoid reporting misleading info when looking up objects via aliases
* Refactor CLI implementation to improve testability
* Add several more test cases

Closes #149010

11 days agogh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal stream...
Wulian233 [Mon, 4 May 2026 13:42:02 +0000 (21:42 +0800)] 
gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal stream (GH-148419)

11 days agogh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API (#146172)
Victor Stinner [Mon, 4 May 2026 13:37:45 +0000 (15:37 +0200)] 
gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API (#146172)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
11 days agogh-148600: Add OpenSSL 4.0.0 support to test configurations (#149356)
Victor Stinner [Mon, 4 May 2026 13:21:04 +0000 (15:21 +0200)] 
gh-148600: Add OpenSSL 4.0.0 support to test configurations (#149356)

Co-authored-by: Charlie Lin <tuug@gmx.us>
11 days agogh-87245: Improve IPv6Address.ipv4_mapped documentation (#92572)
wouter bolsterlee [Mon, 4 May 2026 13:03:20 +0000 (15:03 +0200)] 
gh-87245: Improve IPv6Address.ipv4_mapped documentation (#92572)

Avoid the phrasing ‘starting with ::FFFF/96’, which is confusing since
it seems to mix a prefix and a range. Instead, make it clear what the
actual range is, and refer to the relevant RFC.

Closes #87245.

11 days agogh-148352: Add more colour to `calendar` CLI output (#148354)
Hugo van Kemenade [Mon, 4 May 2026 12:14:57 +0000 (15:14 +0300)] 
gh-148352: Add more colour to `calendar` CLI output (#148354)

Co-authored-by: Rihaan Meher <sharktidedev@gmail.com>
11 days agogh-149351: Avoid possible broken macOS framework install names when DESTDIR is speci...
Ned Deily [Mon, 4 May 2026 11:55:06 +0000 (07:55 -0400)] 
gh-149351:  Avoid possible broken macOS framework install names when DESTDIR is specified during builds (#149352)

11 days agogh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102)
Victor Stinner [Mon, 4 May 2026 11:52:57 +0000 (13:52 +0200)] 
gh-148292: Update _ssl._SSLSocket for OpenSSL 4 (#149102)

The _SSLSocket object now remembers if it gets an EOF error. In this
case, read(), sendfile(), write() and do_handshake method calls fail
with SSLEOFError without calling the underlying OpenSSL function.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
11 days agogh-149231: tomllib: Limit the number of parts in a key (GH-149233)
Petr Viktorin [Mon, 4 May 2026 11:49:07 +0000 (13:49 +0200)] 
gh-149231: tomllib: Limit the number of parts in a key (GH-149233)

Co-authored-by: Stan Ulbrych <stan@python.org>
11 days agogh-148849: Deprecate http.cookies.BaseCookie.js_output() (GH-148978)
kishorhange111 [Mon, 4 May 2026 09:51:17 +0000 (15:21 +0530)] 
gh-148849: Deprecate http.cookies.BaseCookie.js_output() (GH-148978)

11 days agogh-148093: Raise binascii.Error from binascii.a2b_uu() on empty input (GH-149077)
Maurycy Pawłowski-Wieroński [Mon, 4 May 2026 09:40:52 +0000 (11:40 +0200)] 
gh-148093: Raise binascii.Error from binascii.a2b_uu() on empty input (GH-149077)

Instead of reading past the end of the empty buffer.

11 days agogh-146609: Use argparse for colour help timeit CLI (#149334)
Hugo van Kemenade [Mon, 4 May 2026 08:44:37 +0000 (11:44 +0300)] 
gh-146609: Use argparse for colour help timeit CLI (#149334)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>