]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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.

11 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)

11 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>
11 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>
11 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)

11 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>
11 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)

11 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>
11 days agogh-143732: allow dict subclasses to be specialized (GH-148128)
Kumar Aditya [Mon, 4 May 2026 08:39:03 +0000 (14:09 +0530)] 
gh-143732: allow dict subclasses to be specialized  (GH-148128)

11 days agogh-142389: Add colour to regrtest and pdb's help descriptions (#149332)
Hugo van Kemenade [Mon, 4 May 2026 07:20:23 +0000 (10:20 +0300)] 
gh-142389: Add colour to regrtest and pdb's help descriptions (#149332)

12 days agogh-149296: Add `dump` subcommand to sampling profiler for one-shot stack snapshots...
Pablo Galindo Salgado [Mon, 4 May 2026 00:02:33 +0000 (01:02 +0100)] 
gh-149296: Add `dump` subcommand to sampling profiler for one-shot stack snapshots (#149297)

Adds `python -m profiling.sampling dump <pid>`, which prints a single
traceback-style snapshot of a running process's Python stack via the
existing `_remote_debugging` unwinder. Supports per-thread status,
source line highlighting, optional bytecode opcodes, and async-aware
task reconstruction (`--async-aware`, default `--async-mode=all`).

12 days agogh-145521: Add 'infer_variance' parameter to ParamSpec class (#145522)
Kai (Kazuya Ito) [Sun, 3 May 2026 23:08:38 +0000 (08:08 +0900)] 
gh-145521: Add 'infer_variance' parameter to ParamSpec class (#145522)

12 days agogh-133956 fix bug where `dataclass` wouldn't detect `ClassVar` fields if `ClassVar...
Tamika Nomara [Sun, 3 May 2026 22:59:18 +0000 (02:59 +0400)] 
gh-133956 fix bug where `dataclass` wouldn't detect `ClassVar` fields if `ClassVar` was re-exported from a module other than `typing` (#140541)

Co-authored-by: Dmitrii Zherbin <zherbin.dima@yandex.ru>
12 days agogh-149254: Update CI to use latest OpenSSL and AWS-LC versions (GH-149330)
Zachary Ware [Sun, 3 May 2026 20:20:51 +0000 (15:20 -0500)] 
gh-149254: Update CI to use latest OpenSSL and AWS-LC versions (GH-149330)

Also update Modules/_ssl_data_36.h to include an added symbol from OpenSSL 3.6.2.

12 days agogh-149254: Update Windows builds to use OpenSSL 3.5.6 (GH-149326)
Zachary Ware [Sun, 3 May 2026 20:04:30 +0000 (15:04 -0500)] 
gh-149254: Update Windows builds to use OpenSSL 3.5.6 (GH-149326)

12 days agogh-148641: Implement PEP 829 - startup configuration files (#149109)
Barry Warsaw [Sun, 3 May 2026 17:17:29 +0000 (10:17 -0700)] 
gh-148641: Implement PEP 829 - startup configuration files (#149109)

Implement PEP 829 - startup configuration files
Also add `pkgutil.resolve_name(..., strict=True)`

Co-authored-by: Brett Cannon <brett@python.org>
12 days agogh-135056: Fix teardown order for Windows in `test_httpservers` (#149320)
Hugo van Kemenade [Sun, 3 May 2026 16:42:42 +0000 (19:42 +0300)] 
gh-135056: Fix teardown order for Windows in `test_httpservers` (#149320)

12 days agogh-135056: Add a `--header` CLI option to `http.server` (#135057)
Anton Ian Sipos [Sun, 3 May 2026 11:01:37 +0000 (04:01 -0700)] 
gh-135056: Add a `--header` CLI option to `http.server` (#135057)

Support custom headers in `python -m http.server` and `http.server.SimpleHTTPRequestHandler`.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 days agogh-149243: Check for recursion limits in `CALL_ALLOC_AND_ENTER_INIT` (#149310)
sobolevn [Sun, 3 May 2026 10:26:05 +0000 (13:26 +0300)] 
gh-149243: Check for recursion limits in `CALL_ALLOC_AND_ENTER_INIT` (#149310)

12 days agogh-143231: Do not swallow not matched warnings in assertWarns*() (GH-149229)
Serhiy Storchaka [Sun, 3 May 2026 10:24:57 +0000 (13:24 +0300)] 
gh-143231: Do not swallow not matched warnings in assertWarns*() (GH-149229)

unittest.TestCase methods assertWarns() and assertWarnsRegex() no longer
swallow warnings that do not match the specified category or regex.
Nested context managers are now supported.

12 days agogh-149217: Avoid adding dependencies on immutable, immortal classes in the JIT (GH149256)
Wulian233 [Sun, 3 May 2026 10:06:39 +0000 (18:06 +0800)] 
gh-149217: Avoid adding dependencies on immutable, immortal classes in the JIT (GH149256)

12 days agogh-143231: Add the module attribute to warnings.WarningMessage (GH-149298)
Serhiy Storchaka [Sun, 3 May 2026 09:35:47 +0000 (12:35 +0300)] 
gh-143231: Add the module attribute to warnings.WarningMessage (GH-149298)

12 days agoIgnore `/jit_unwind_info*.h` from git (#149311)
sobolevn [Sun, 3 May 2026 09:31:53 +0000 (12:31 +0300)] 
Ignore `/jit_unwind_info*.h` from git (#149311)

12 days agoGH-148189: Fix miscalculation of type-specific free list memory use (#148190)
Mazin Sharaf [Sun, 3 May 2026 03:03:13 +0000 (13:03 +1000)] 
GH-148189: Fix miscalculation of  type-specific free list memory use (#148190)

* Fix calculation of PyListObject size in allocator

* Fix size calculation in _PyDict_DebugMallocStats

* Fix memory size calculation in tupleobject.c

Adjusted memory calculation for PyTupleObject freelist entries.

* Revert in tupleobject.c

Removed unnecessary comment regarding memory calculation and the memory calculation itself.

* 📜🤖 Added by blurb_it.

* Update tupleobject.c

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
12 days agogh-141388: Improve docs/tests for non-function callables as annotate functions (...
dr-carlos [Sun, 3 May 2026 01:21:59 +0000 (10:51 +0930)] 
gh-141388: Improve docs/tests for non-function callables as annotate functions (#142327)

13 days agogh-139167: Allow users to hook gen_colors function to pyrepl Reader (#141619)
Tian Gao [Sat, 2 May 2026 20:28:00 +0000 (13:28 -0700)] 
gh-139167: Allow users to hook gen_colors function to pyrepl Reader (#141619)

13 days agogh-148871: extend and improve `LOAD_COMMON_CONSTANT` (GH-148971)
Neko Asakura [Sat, 2 May 2026 18:59:51 +0000 (02:59 +0800)] 
gh-148871: extend and improve `LOAD_COMMON_CONSTANT` (GH-148971)

13 days agogh-149171: Make TypeAliasType __module__ writable (#149172)
Eric Mark Martin [Sat, 2 May 2026 17:28:08 +0000 (13:28 -0400)] 
gh-149171: Make TypeAliasType __module__ writable (#149172)

closes #149171.

13 days agogh-149267: Document ast.Constant.kind attribute (#149268)
Anuj Nitin Bharambe [Sat, 2 May 2026 16:55:29 +0000 (22:25 +0530)] 
gh-149267: Document ast.Constant.kind attribute (#149268)

The kind attribute of ast.Constant was not mentioned in the
documentation. It is set to 'u' for u-prefixed string literals
and None for all other constants.

---------

Co-authored-by: Anuj Bharambe <anujnitinb@gmail.com>
13 days agogh-148063: documentation: move ast.compare from "Compiler flags" to "ast helpers...
Hunter Hogan [Sat, 2 May 2026 16:54:26 +0000 (11:54 -0500)] 
gh-148063: documentation: move ast.compare from "Compiler flags" to "ast helpers" (#147954)

13 days agogh-116021: Deprecate support for instantiating abstract AST nodes (#137865)
Brian Schubert [Sat, 2 May 2026 16:50:06 +0000 (12:50 -0400)] 
gh-116021: Deprecate support for instantiating abstract AST nodes (#137865)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
13 days agogh-149285: Increase recursion depth for `test_xml_etree` from 150k to 500k (#149286)
Zanie Blue [Sat, 2 May 2026 16:04:36 +0000 (11:04 -0500)] 
gh-149285: Increase recursion depth for `test_xml_etree` from 150k to 500k (#149286)

13 days agogh-149282: Fix `gc.c` compilation with `--enable-pystats` (#149283)
sobolevn [Sat, 2 May 2026 15:24:17 +0000 (18:24 +0300)] 
gh-149282: Fix `gc.c` compilation with `--enable-pystats` (#149283)

13 days agogh-146527: Remove private module entry from what's new (#149284)
Pablo Galindo Salgado [Sat, 2 May 2026 15:16:38 +0000 (16:16 +0100)] 
gh-146527: Remove private module entry from what's new (#149284)

Remove private module entry from what's new

13 days agoGH-146527: Add get_gc_stats function to _remote_debugging (#148071)
Sergey Miryanov [Sat, 2 May 2026 15:04:18 +0000 (20:04 +0500)] 
GH-146527: Add get_gc_stats function to _remote_debugging (#148071)

13 days agogh-148380: remove all uses of `_PyType_LookupByVersion` in `optimizer_bytecodes.c...
Neko Asakura [Sat, 2 May 2026 14:45:38 +0000 (22:45 +0800)] 
gh-148380: remove all uses of `_PyType_LookupByVersion` in `optimizer_bytecodes.c` (GH-148394)

13 days agogh-149214: Fix non ascii characters in remote debugging (#149228)
Pablo Galindo Salgado [Sat, 2 May 2026 14:07:28 +0000 (15:07 +0100)] 
gh-149214: Fix non ascii characters in remote debugging (#149228)

13 days agoGH-126910: Add gdb support for unwinding JIT frames (#146071)
Diego Russo [Sat, 2 May 2026 13:42:03 +0000 (14:42 +0100)] 
GH-126910: Add gdb support for unwinding JIT frames (#146071)

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
13 days agogh-149221: Minor comment edit (gh-149278)
Raymond Hettinger [Sat, 2 May 2026 13:29:06 +0000 (08:29 -0500)] 
gh-149221: Minor comment edit (gh-149278)

Minor comment edit

13 days agogh-149221:Fix binomialvariate Function for random module (gh-149222)
lighting9999 [Sat, 2 May 2026 12:55:43 +0000 (20:55 +0800)] 
gh-149221:Fix binomialvariate Function for random module (gh-149222)

13 days agoGH-148932: Improve error message if profiling.sampling run from venv on Windows platf...
Sergey Miryanov [Sat, 2 May 2026 09:23:16 +0000 (14:23 +0500)] 
GH-148932: Improve error message if profiling.sampling run from venv on Windows platform (#149247)

13 days agogh-148914: Fix memoization of in-band PickleBuffer in the Python implementation ...
Serhiy Storchaka [Sat, 2 May 2026 09:04:05 +0000 (12:04 +0300)] 
gh-148914: Fix memoization of in-band PickleBuffer in the Python implementation (GH-149052)

Previously, identical PickleBuffers did not preserve identity.
Also, empty writable PickleBuffer memoized an empty bytearray object
in place of b'' which is a singleton in CPython, so the following
references to b'' were unpickled as an empty bytearray object.

13 days agogh-149254: Bump OpenSSL versions for iOS and Android. (#149270)
Russell Keith-Magee [Sat, 2 May 2026 08:50:32 +0000 (16:50 +0800)] 
gh-149254: Bump OpenSSL versions for iOS and Android. (#149270)

Bump OpenSSL versions for iOS and Android.

13 days agogh-149244 Document statistics functions that require sequence inputs. (gh-149264)
Raymond Hettinger [Sat, 2 May 2026 03:58:23 +0000 (22:58 -0500)] 
gh-149244 Document statistics functions that require sequence inputs. (gh-149264)

13 days agostatistics: Fix geometric_mean() error message for negative inputs (#149246)
htjworld [Sat, 2 May 2026 03:54:24 +0000 (12:54 +0900)] 
statistics: Fix geometric_mean() error message for negative inputs (#149246)

13 days agogh-149254: Update macOS installer to use OpenSSL 3.5.6. (#149262)
Ned Deily [Sat, 2 May 2026 03:52:43 +0000 (23:52 -0400)] 
gh-149254: Update macOS installer to use OpenSSL 3.5.6. (#149262)

13 days agogh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path` (gh...
W. H. Wang [Sat, 2 May 2026 02:27:23 +0000 (10:27 +0800)] 
gh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path` (gh-149159)

Set ImportError.name on errors from runpy.run_module/run_path

`runpy.run_module()` and `runpy.run_path()` now set the `name` attribute
of the `ImportError` they raise to the requested module name, matching
the behaviour of a regular import statement (previously `name` was
always `None`, which broke introspection).

The `name=` kwarg is gated on `issubclass(error, ImportError)` because
`_get_module_details()` is also used by `_run_module_as_main()` with
a private `_Error` sentinel class. `_Error` does not subclass
ImportError, and `BaseException.__init__` rejects unknown kwargs at
the C level, so passing `name=` unconditionally would break the
`python -m foo` codepath.

2 weeks agoGH-149252: Update WASI SDK version from 32 to 33 (#149253)
Brett Cannon [Fri, 1 May 2026 23:51:06 +0000 (16:51 -0700)] 
GH-149252: Update WASI SDK version from 32 to 33 (#149253)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks agogh-75707: tarfile: Add optional open() argument "mtime" (GH-138117)
Amp Tell [Fri, 1 May 2026 22:39:58 +0000 (00:39 +0200)] 
gh-75707: tarfile: Add optional open() argument "mtime" (GH-138117)

This makes it possible to set the gzip header mtime field without
overriding time.time(), making it useful when creating reproducible
archives.

* 📜🤖 Added by blurb_it.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2 weeks agogh-124397: Add free-threading support for iterators. (gh-148894)
Raymond Hettinger [Fri, 1 May 2026 21:31:00 +0000 (16:31 -0500)] 
gh-124397: Add free-threading support for iterators. (gh-148894)

2 weeks agogh-149202: Implement PEP 831 – Frame Pointers Everywhere: Enabling System-Level Obser...
Pablo Galindo Salgado [Fri, 1 May 2026 20:16:11 +0000 (21:16 +0100)] 
gh-149202: Implement PEP 831 – Frame Pointers Everywhere: Enabling System-Level Observability for Python (#149201)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2 weeks agogh-149083: Change several other docs examples to use `sentinel()` (#149213)
sobolevn [Fri, 1 May 2026 19:53:28 +0000 (22:53 +0300)] 
gh-149083: Change several other docs examples to use `sentinel()` (#149213)

2 weeks agoFix source link in `Doc/howto/descriptor.rst` (#149215)
sobolevn [Fri, 1 May 2026 19:37:14 +0000 (22:37 +0300)] 
Fix source link in `Doc/howto/descriptor.rst` (#149215)

2 weeks agoClarify `max_length` in zstd & zlib decompressor documentation (#143805)
Sam Bull [Fri, 1 May 2026 19:32:50 +0000 (20:32 +0100)] 
Clarify `max_length` in zstd & zlib decompressor documentation (#143805)

Also provide examples of how to decompress data using max_length for zstd and zlib.

Co-authored-by: Emma Smith <emma@emmatyping.dev>