]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 weeks agogh-148680: Replace internal names with type_reprs of objects in string representation...
David Ellis [Thu, 23 Apr 2026 13:22:20 +0000 (14:22 +0100)] 
gh-148680: Replace internal names with type_reprs of objects in string representations of ForwardRef (#148682)

Co-authored-by: Shamil <ashm.tech@proton.me>
3 weeks agoGH-126910: Build/link the JIT shim in the Python interpreter (#148872)
Diego Russo [Thu, 23 Apr 2026 11:23:18 +0000 (12:23 +0100)] 
GH-126910: Build/link the JIT shim in the Python interpreter (#148872)

3 weeks agogh-148907: fix performance regression in `PyType_GetModuleByDef` on free-threading...
Kumar Aditya [Thu, 23 Apr 2026 11:12:57 +0000 (16:42 +0530)] 
gh-148907: fix performance regression in `PyType_GetModuleByDef` on free-threading (#148908)

3 weeks agogh-146636: Improve ABI/feature selection, add new header for it (GH-148302)
Petr Viktorin [Thu, 23 Apr 2026 09:52:13 +0000 (11:52 +0200)] 
gh-146636: Improve ABI/feature selection, add new header for it (GH-148302)

Improve ABI/feature selection, add new header for it.

Add a test that Python headers themselves don't use
Py_GIL_DISABLED in abi3t: abi3 and abi3t ought to be the
same except the _Py_OPAQUE_PYOBJECT differences.
This is done using the GCC-only poison pragma.

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks agogh-148892: Drop mention of deprecated cibuildwheel option (#148893)
Nathan Goldbaum [Thu, 23 Apr 2026 04:00:35 +0000 (22:00 -0600)] 
gh-148892: Drop mention of deprecated cibuildwheel option (#148893)

3 weeks agoSpeed up counting in statistics.fmean() (gh-148875)
Raymond Hettinger [Thu, 23 Apr 2026 03:06:56 +0000 (22:06 -0500)] 
Speed up counting in statistics.fmean() (gh-148875)

3 weeks agogh-119180: Document the `format` parameter in `typing.get_type_hints()` (#143758)
Victorien [Thu, 23 Apr 2026 02:50:15 +0000 (04:50 +0200)] 
gh-119180: Document the `format` parameter in `typing.get_type_hints()` (#143758)

Do not mention `__annotations__` dictionaries, as this is slightly
outdated since 3.14.

Rewrite the note about possible exceptions for clarity. Also do not
mention imported type aliases, as since 3.12 aliases with the `type`
statement do not suffer from this limitation anymore.

3 weeks agogh-142965: Fix Concatenate documentation to reflect valid use cases (#143316)
John Seong [Thu, 23 Apr 2026 02:46:04 +0000 (10:46 +0800)] 
gh-142965: Fix Concatenate documentation to reflect valid use cases (#143316)

The documentation previously stated that Concatenate is only valid
when used as the first argument to Callable, but according to PEP 612,
it can also be used when instantiating user-defined generic classes
with ParamSpec parameters.

3 weeks agogh-145194: Fix typing in re tokenizer example (#145198)
Vikash Kumar [Thu, 23 Apr 2026 02:40:10 +0000 (08:10 +0530)] 
gh-145194: Fix typing in re tokenizer example (#145198)

3 weeks agogh-145056: Add support for frozendict in dataclass asdict and astuple (#145125)
Pieter Eendebak [Thu, 23 Apr 2026 02:39:08 +0000 (04:39 +0200)] 
gh-145056: Add support for frozendict in dataclass asdict and astuple (#145125)

3 weeks agogh-146553: Fix infinite loop in typing.get_type_hints() on circular __wrapped__ ...
Shamil [Thu, 23 Apr 2026 02:31:58 +0000 (05:31 +0300)] 
gh-146553: Fix infinite loop in typing.get_type_hints() on circular __wrapped__ (#148595)

3 weeks agogh-148883: Docs: clarify grammar in Counter dictionary methods note (gh-148882)
Sanjay Janardhan [Wed, 22 Apr 2026 22:56:14 +0000 (15:56 -0700)] 
gh-148883: Docs: clarify grammar in Counter dictionary methods note (gh-148882)

3 weeks agogh-90309: Base64-encode cookie values embedded in JS
Seth Larson [Wed, 22 Apr 2026 19:22:31 +0000 (14:22 -0500)] 
gh-90309: Base64-encode cookie values embedded in JS

3 weeks agogh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh-148852)
Sam Gross [Wed, 22 Apr 2026 18:31:19 +0000 (14:31 -0400)] 
gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh-148852)

_PyRawMutex_UnlockSlow CAS-removes the waiter from the list and then
calls _PySemaphore_Wakeup, with no handshake. If _PySemaphore_Wait
returns Py_PARK_INTR, the waiter can destroy its stack-allocated
semaphore before the unlocker's Wakeup runs, causing a fatal error from
ReleaseSemaphore / sem_post.

Loop in _PyRawMutex_LockSlow until _PySemaphore_Wait returns Py_PARK_OK,
which is only signalled when a matching Wakeup has been observed.

Also include GetLastError() and the handle in the Windows fatal messages
in _PySemaphore_Init, _PySemaphore_Wait, and _PySemaphore_Wakeup to make
similar races easier to diagnose in the future.

3 weeks agogh-148858: Remove duplicated recipe.yaml files in Tools/pixi-packages (#148859)
Isuru Fernando [Wed, 22 Apr 2026 17:50:30 +0000 (10:50 -0700)] 
gh-148858: Remove duplicated recipe.yaml files in Tools/pixi-packages (#148859)

3 weeks agoAdditional itertool recipes for running statistics (gh-148879)
Raymond Hettinger [Wed, 22 Apr 2026 16:52:41 +0000 (11:52 -0500)] 
Additional itertool recipes for running statistics (gh-148879)

3 weeks agogh-148207: add additional keywords to `typing.TypeVarTuple` (#148212)
KotlinIsland [Wed, 22 Apr 2026 13:28:12 +0000 (23:28 +1000)] 
gh-148207: add additional keywords to `typing.TypeVarTuple` (#148212)

3 weeks agoGH-146073: Add example script for dumping JIT traces (GH-148840)
Mark Shannon [Wed, 22 Apr 2026 10:09:05 +0000 (11:09 +0100)] 
GH-146073: Add example script for dumping JIT traces (GH-148840)

3 weeks agogh-142186: Allow all PEP-669 events to be per-code object and disableable (GH-146182)
Gabriele N. Tornetta [Wed, 22 Apr 2026 08:08:23 +0000 (09:08 +0100)] 
gh-142186: Allow all PEP-669 events to be per-code object and disableable  (GH-146182)

* Make the `PY_UNWIND` monitoring event available as a code-local
event to allow trapping on function exit events when an exception
bubbles up. This complements the PY_RETURN event by allowing to
catch any function exit event.

* Allow `PY_UNWIND`  to be `DISABLE`d; disabling it disables the event for the whole code object.

* Do the above for `PY_THROW`, `RAISE`, `EXCEPTION_HANDLED`, and `RERAISE` events.

3 weeks agogh-146578: _zstd: Fix printf format for pledged size errors (#146576)
cui [Tue, 21 Apr 2026 19:49:44 +0000 (03:49 +0800)] 
gh-146578: _zstd: Fix printf format for pledged size errors (#146576)

Use %llu instead of %ull for unsigned long long in zstd_contentsize_converter ValueError messages.

3 weeks ago[Enum] Improve clarity of comparison sentence (GH-148753)
Rida Zouga [Tue, 21 Apr 2026 17:17:02 +0000 (18:17 +0100)] 
[Enum] Improve clarity of comparison sentence (GH-148753)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
3 weeks agogh-148801: Fix unbound C recursion in `Element.__deepcopy__()` (#148802)
Stan Ulbrych [Tue, 21 Apr 2026 16:20:18 +0000 (17:20 +0100)] 
gh-148801: Fix unbound C recursion in `Element.__deepcopy__()` (#148802)

3 weeks agogh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (#148809)
Seth Larson [Tue, 21 Apr 2026 14:29:07 +0000 (09:29 -0500)] 
gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (#148809)

3 weeks agogh-148814: Fix an issue in Emscripten README (#148752)
Stan Ulbrych [Mon, 20 Apr 2026 23:04:50 +0000 (00:04 +0100)] 
gh-148814: Fix an issue in Emscripten README (#148752)

Correct the description of the default state of test module compilation.

3 weeks agogh-108411: Make typing.IO/BinaryIO arguments positional-only (#142906)
Roman Donchenko [Mon, 20 Apr 2026 20:19:43 +0000 (23:19 +0300)] 
gh-108411: Make typing.IO/BinaryIO arguments positional-only (#142906)

`IO` is purported to be the type of the file objects returned by `open`.
However, all methods on those objects take positional-only arguments, while
`IO`'s methods are declared with regular arguments. As such, the file objects
cannot actually be considered to implement `IO`. The same thing applies to
`BinaryIO`.

Fix this by adjusting the definition of these ABCs to match the file objects.

This is technically a breaking change, but it is unlikely to actually break
anything:

* These methods should never be called at runtime, since they are abstract.
  Therefore, this should not cause any runtime errors.

* In typeshed these arguments are already positional-only, so this should
  not cause any errors during typechecking either.

3 weeks agoFix typos in asyncio, ctypes, and importlib documentation (#148747)
ByteFlow [Mon, 20 Apr 2026 19:22:37 +0000 (03:22 +0800)] 
Fix typos in asyncio, ctypes, and importlib documentation (#148747)

3 weeks agogh-138451: Support custom LLVM installation path (#138452)
Uwe L. Korn [Mon, 20 Apr 2026 16:45:53 +0000 (18:45 +0200)] 
gh-138451: Support custom LLVM installation path (#138452)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks agoUse `soft-deprecated` in more places (#148769)
Stan Ulbrych [Mon, 20 Apr 2026 16:00:35 +0000 (17:00 +0100)] 
Use `soft-deprecated` in more places (#148769)

3 weeks agoDocs: Fix some typos in `calendar.rst` (GH-148756)
Manoj K M [Mon, 20 Apr 2026 14:37:12 +0000 (20:07 +0530)] 
Docs: Fix some typos in `calendar.rst` (GH-148756)

3 weeks agogh-148644: Propagate the PGO job exit code in PCbuild/build.bat (GH-148645)
Régis Desgroppes [Mon, 20 Apr 2026 14:18:10 +0000 (16:18 +0200)] 
gh-148644: Propagate the PGO job exit code in PCbuild/build.bat (GH-148645)

3 weeks agogh-148790: Eliminate redundant call to `_PyRuntime_Initialize` in `Py_InitializeEx...
AraHaan [Mon, 20 Apr 2026 14:01:06 +0000 (10:01 -0400)] 
gh-148790: Eliminate redundant call to `_PyRuntime_Initialize` in `Py_InitializeEx` (GH-121628)

3 weeks agoGH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648)
Filipe Laíns [Mon, 20 Apr 2026 13:41:10 +0000 (14:41 +0100)] 
GH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648)

Signed-off-by: Filipe Laíns <lains@riseup.net>
3 weeks agogh-148718: Fix Py_STACKREF_DEBUG build by defining macros (#148719)
Donghee Na [Mon, 20 Apr 2026 12:55:03 +0000 (21:55 +0900)] 
gh-148718: Fix Py_STACKREF_DEBUG build by defining macros (#148719)

3 weeks agogh-123853: Update locale.windows_locale (GH-123901)
Serhiy Storchaka [Mon, 20 Apr 2026 08:47:37 +0000 (11:47 +0300)] 
gh-123853: Update locale.windows_locale (GH-123901)

Update the table of Windows language code identifiers (LCIDs) to
protocol version 16.0 (2024-04-23).

3 weeks agogh-148788: Update Emscripten example post move to Platforms dir (#148761)
Stan Ulbrych [Mon, 20 Apr 2026 02:17:50 +0000 (03:17 +0100)] 
gh-148788: Update Emscripten example post move to Platforms dir (#148761)

Update Emscripten example post move to Platforms dir.

3 weeks agogh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_int...
Matthew Davis [Mon, 20 Apr 2026 00:05:50 +0000 (02:05 +0200)] 
gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603)

Doc: Fix buf argument name in multiprocessing connection send_bytes

3 weeks agogh-148779: Update Briefcase link in android.rst documentation (#148777)
partev [Sun, 19 Apr 2026 21:44:08 +0000 (17:44 -0400)] 
gh-148779: Update Briefcase link in android.rst documentation (#148777)

Use canonical beeware.org URL for link to Briefcase.

3 weeks agogh-133879: Copyedit "What's new in Python 3.15" (#148686)
Hugo van Kemenade [Sun, 19 Apr 2026 18:42:23 +0000 (21:42 +0300)] 
gh-133879: Copyedit "What's new in Python 3.15" (#148686)

3 weeks agogh-121946: Use clang-20 for TSan build (#148570)
Sam Gross [Sun, 19 Apr 2026 12:13:47 +0000 (08:13 -0400)] 
gh-121946: Use clang-20 for TSan build (#148570)

3 weeks agoPrevent GitHub's web conflict editor from converting LF to CRLF (#148739)
Hugo van Kemenade [Sun, 19 Apr 2026 09:21:17 +0000 (12:21 +0300)] 
Prevent GitHub's web conflict editor from converting LF to CRLF (#148739)

3 weeks agogh-148406: Fix annotations of _colorize.FancyCompleter (#148408)
Daniel Hollas [Sat, 18 Apr 2026 18:51:58 +0000 (19:51 +0100)] 
gh-148406: Fix annotations of _colorize.FancyCompleter (#148408)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks agogh-133403: Add type annotations to generate_levenshtein_examples.py (#143317)
John Seong [Sat, 18 Apr 2026 18:50:17 +0000 (02:50 +0800)] 
gh-133403: Add type annotations to generate_levenshtein_examples.py (#143317)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks agogh-148659: Export a few more functions required for external JITs (#148704)
Dino Viehland [Sat, 18 Apr 2026 18:32:22 +0000 (11:32 -0700)] 
gh-148659: Export a few more functions required for external JITs (#148704)

Export a few more functions required for external JITs

3 weeks agogh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725)
Serhiy Storchaka [Sat, 18 Apr 2026 12:11:14 +0000 (15:11 +0300)] 
gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725)

3 weeks agogh-148688: Fix _BlocksOutputBuffer_Finish() double free (#148689)
Victor Stinner [Sat, 18 Apr 2026 09:56:56 +0000 (11:56 +0200)] 
gh-148688: Fix _BlocksOutputBuffer_Finish() double free (#148689)

If _BlocksOutputBuffer_Finish() fails (memory allocation failure),
PyBytesWriter_Discard() is called on the writer. Then if
_BlocksOutputBuffer_OnError() is called, it calls again
PyBytesWriter_Discard() causing a double free.

Fix _BlocksOutputBuffer_Finish() by setting buffer->writer to NULL,
so _BlocksOutputBuffer_OnError() does nothing instead of calling
PyBytesWriter_Discard() again.

3 weeks agoAdd a new Sphinx `soft-deprecated` directive (#148630)
Hugo van Kemenade [Sat, 18 Apr 2026 08:37:54 +0000 (11:37 +0300)] 
Add a new Sphinx `soft-deprecated` directive (#148630)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-148653: Fix some marshal errors related to recursive immutable objects (GH-148698)
Serhiy Storchaka [Sat, 18 Apr 2026 08:24:33 +0000 (11:24 +0300)] 
gh-148653: Fix some marshal errors related to recursive immutable objects (GH-148698)

Forbid marshalling recursive code, slice and frozendict objects which
cannot be correctly unmarshalled.
Reject invalid marshal data produced by marshalling recursive frozendict
objects which was previously incorrectly unmarshalled.
Add multiple tests for recursive data structures.

3 weeks agogh-148639: Implement PEP 800 (typing.disjoint_base) (#148640)
Jelle Zijlstra [Sat, 18 Apr 2026 02:20:41 +0000 (19:20 -0700)] 
gh-148639: Implement PEP 800 (typing.disjoint_base) (#148640)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 weeks agogh-148222: Fix NULL dereference bugs in genericaliasobject.c (#148226)
Prakash Sellathurai [Sat, 18 Apr 2026 00:21:13 +0000 (05:51 +0530)] 
gh-148222: Fix NULL dereference bugs in genericaliasobject.c (#148226)

4 weeks agogh-146393: Remove special character in optimizer_bytecodes.c (#148693)
Pieter Eendebak [Fri, 17 Apr 2026 16:52:16 +0000 (18:52 +0200)] 
gh-146393: Remove special character in optimizer_bytecodes.c (#148693)

4 weeks agogh-148651: Fix refcount leak in _zstd decompressor options (#148657)
Michael Bommarito [Fri, 17 Apr 2026 15:42:41 +0000 (11:42 -0400)] 
gh-148651: Fix refcount leak in _zstd decompressor options (#148657)

The option parsing in Modules/_zstd/decompressor.c had a missing Py_DECREF(value) before the early return -1 when PyLong_AsInt(key) fails. The identical code in Modules/_zstd/compressor.c line 158 has the fix.

4 weeks agogh-148683: Doc: fix misplaced pprint entries in What's New 3.15 (#148685)
Xuwz [Fri, 17 Apr 2026 14:13:41 +0000 (22:13 +0800)] 
gh-148683: Doc: fix misplaced pprint entries in What's New 3.15 (#148685)

Doc: fix misplaced pprint entries in What's New 3.15

4 weeks agogh-148484: Fix memory leak of iterator in array.array constructor (GH-148523)
Gleb Popov [Fri, 17 Apr 2026 12:13:44 +0000 (15:13 +0300)] 
gh-148484: Fix memory leak of iterator in array.array constructor (GH-148523)

4 weeks agogh-148464: Add missing ``__ctype_le/be__`` attributes for complex types in the ctype...
Sergey B Kirpichev [Fri, 17 Apr 2026 12:09:09 +0000 (15:09 +0300)] 
gh-148464: Add missing ``__ctype_le/be__`` attributes for complex types in the ctype module (GH-148485)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
4 weeks agogh-148659: Export some internal functions for the JIT (PEP-523) (#148634)
Dino Viehland [Thu, 16 Apr 2026 23:55:03 +0000 (16:55 -0700)] 
gh-148659: Export some internal functions for the JIT (PEP-523) (#148634)

Export (as internal functions, not public ones) C API functions necessary to implement a JIT as a separate extension module.

4 weeks agogh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554)
Victor Stinner [Thu, 16 Apr 2026 17:13:25 +0000 (19:13 +0200)] 
gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554)

The -fprofile-update=atomic flag was added to fix a random GCC
internal error on PGO build (gh-145801) caused by corruption of
profile data (.gcda files). The problem is that it makes the PGO
build way slower (up to 47x slower) on i686. Since the GCC internal
error was not seen on i686 so far, don't use -fprofile-update=atomic
on i686.

4 weeks agogh-146031: Allow keeping specialization enabled when specifying eval frame function...
Dino Viehland [Thu, 16 Apr 2026 16:44:26 +0000 (09:44 -0700)] 
gh-146031: Allow keeping specialization enabled when specifying eval frame function (#146032)

Allow keeping specialization enabled when specifying eval frame function

4 weeks agoGH-146128: Fix AArch64 multi-instruction constants and relocations (GH-148598)
Mark Shannon [Thu, 16 Apr 2026 14:33:09 +0000 (15:33 +0100)] 
GH-146128: Fix AArch64 multi-instruction constants and relocations (GH-148598)

Fix AArch64 multi-instruction constants and relocations

* Elimates rendundant orr xN, xN, 0xffff after 16 or 32 bit loads
* Merges adrp (21rx) and ldr (12) relocations into single 33rx relocation, when safe to do so.

4 weeks agoGH-145668: Add FOR_ITER specialization for virtual iterators. Specialize GET_ITER...
Mark Shannon [Thu, 16 Apr 2026 14:22:22 +0000 (15:22 +0100)] 
GH-145668: Add FOR_ITER specialization for virtual iterators. Specialize GET_ITER. (GH-147967)

* Add FOR_ITER_VIRTUAL to specialize FOR_ITER for virtual iterators
* Add GET_ITER_SELF to specialize GET_ITER for iterators (including generators)
* Add GET_ITER_VIRTUAL to specialize GET_ITER for iterables as virtual iterators
* Add new (internal) _tp_iteritem function slot to PyTypeObject
* Put limited RESUME at start of genexpr for free-threading. Fix up exception handling in genexpr

4 weeks agogh-146636: PEP 803: Reference documentation (GH-148013)
Petr Viktorin [Thu, 16 Apr 2026 12:17:44 +0000 (14:17 +0200)] 
gh-146636: PEP 803: Reference documentation (GH-148013)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 weeks agogh-100239: Specialize more binary operations using BINARY_OP_EXTEND (GH-128956)
Pieter Eendebak [Thu, 16 Apr 2026 08:22:41 +0000 (10:22 +0200)] 
gh-100239: Specialize more binary operations using BINARY_OP_EXTEND (GH-128956)

4 weeks agoDocs: Fix typos and a comment in enum.rst (#148156)
Havmaagen [Thu, 16 Apr 2026 05:53:29 +0000 (07:53 +0200)] 
Docs: Fix typos and a comment in enum.rst (#148156)

4 weeks agogh-148474: Fix `_Py_hexlify_simd` compilation with older clang (#148475)
Joshua Root [Thu, 16 Apr 2026 05:51:23 +0000 (15:51 +1000)] 
gh-148474: Fix `_Py_hexlify_simd` compilation with older clang (#148475)

4 weeks agogh-137814: Fix `__qualname__` of `__annotate__` (#137842)
Jelle Zijlstra [Thu, 16 Apr 2026 04:52:30 +0000 (21:52 -0700)] 
gh-137814: Fix `__qualname__` of `__annotate__` (#137842)

4 weeks agoAdd PyManager documentation for index signatures (GH-148631)
Steve Dower [Wed, 15 Apr 2026 21:48:14 +0000 (22:48 +0100)] 
Add PyManager documentation for index signatures (GH-148631)

4 weeks agogh-148100: Soft deprecate `re.match` and `re.Pattern.match` in favour of `prefixmatch...
Hugo van Kemenade [Wed, 15 Apr 2026 20:09:47 +0000 (23:09 +0300)] 
gh-148100: Soft deprecate `re.match` and `re.Pattern.match` in favour of `prefixmatch` (#148101)

4 weeks agogh-148604: change `ADD_OP(_POP_TOP, ...)` to `optimize_pop_top` in `optimizer_bytecod...
Neko Asakura [Wed, 15 Apr 2026 17:08:29 +0000 (13:08 -0400)] 
gh-148604: change `ADD_OP(_POP_TOP, ...)` to `optimize_pop_top` in `optimizer_bytecodes.c` (GH-148619)

4 weeks agoDocs: Use bash lexer for http.server CLI commands, not Python (#148612)
Hugo van Kemenade [Wed, 15 Apr 2026 15:18:49 +0000 (18:18 +0300)] 
Docs: Use bash lexer for http.server CLI commands, not Python (#148612)

4 weeks agogh-148600: Add Modules/_ssl_data_40.h data (#148601)
Victor Stinner [Wed, 15 Apr 2026 13:59:02 +0000 (15:59 +0200)] 
gh-148600: Add Modules/_ssl_data_40.h data (#148601)

The Modules/_ssl_data_40.h file was created with the commands:

python Tools/ssl/multissltests.py --steps=library --base-directory "$PWD/multissl" --openssl '4.0.0' --system Linux
python Tools/ssl/make_ssl_data.py multissl/src/openssl-4.0.0 Modules/_ssl_data_40.h

Update Modules/_ssl.c to include it on OpenSSL 4.0.0 and newer.

Update test_ssl for the new error message.

4 weeks agogh-143886: Ensure function annotations are returned in order of definition (#143888)
Carey Metcalfe [Wed, 15 Apr 2026 13:24:28 +0000 (09:24 -0400)] 
gh-143886: Ensure function annotations are returned in order of definition (#143888)

Ensure function annotations are returned in order of definition

Previously, when getting type annotations of a function, normal
arguments were returned before positional-only ones in the dictionary.
Since `functools.singledispatch` relies on this ordering being correct
to dispatch based on the type of the first argument, this issue was
causing incorrect registrations for functions with positional-only
arguments.

This commit updates how annotations are generated so that
positional-only arguments are generated and added to the dictionary
before normal arguments.

4 weeks agogh-148609: Remove unicode character in bytecodes.c (GH-148611)
Ken Jin [Wed, 15 Apr 2026 12:58:35 +0000 (20:58 +0800)] 
gh-148609: Remove unicode character in bytecodes.c (GH-148611)

Remove unicode character in bytecodes.c

4 weeks agogh-131798: Fix `_ITER_CHECK_RANGE` type in the JIT (#148607)
Wulian233 [Wed, 15 Apr 2026 12:22:55 +0000 (20:22 +0800)] 
gh-131798: Fix `_ITER_CHECK_RANGE`  type in the JIT (#148607)

4 weeks agogh-117716: Fix wave RIFF padding for data chunks (GH-145237)
Michiel W. Beijen [Wed, 15 Apr 2026 12:21:43 +0000 (14:21 +0200)] 
gh-117716: Fix wave RIFF padding for data chunks (GH-145237)

wave.Wave_write now writes the required RIFF pad byte when the data chunk
size is odd.

Update RIFF chunk size calculations in both header writing and header
patching so they include the alignment pad byte when present.

Add a regression test in test_wave.py that verifies
odd-sized writes are padded, RIFF size is correct, and roundtrip reads
preserve frame data.

4 weeks agogh-148390: fix undefined behavior of `memoryview(...).cast("?")` (#148454)
Bénédikt Tran [Wed, 15 Apr 2026 11:42:20 +0000 (13:42 +0200)] 
gh-148390: fix undefined behavior of `memoryview(...).cast("?")` (#148454)

4 weeks agogh-139038: Add whatsnew entry for jit unique reference tracking (GH-148572)
Pieter Eendebak [Wed, 15 Apr 2026 10:53:47 +0000 (12:53 +0200)] 
gh-139038: Add whatsnew entry for jit unique reference tracking (GH-148572)

Co-authored-by: Ken Jin <kenjin4096@gmail.com>
4 weeks agogh-147957: pop items from UserDict in LIFO order (gh-147958)
Anerdw [Wed, 15 Apr 2026 04:29:41 +0000 (23:29 -0500)] 
gh-147957: pop items from UserDict in LIFO order (gh-147958)

4 weeks agoGH-70647: Remove support for `%d` (and deprecate for `%e`) without year in `strptime...
Stan Ulbrych [Wed, 15 Apr 2026 00:15:27 +0000 (01:15 +0100)] 
GH-70647: Remove support for `%d` (and deprecate for `%e`) without year in `strptime()` (GH-144570)

* Add deprecation for %e with no year
* schedule `%e` for 3.17, and remove `%d` now

4 weeks agogh-148186: Improve `assertCountEqual` description in docs. (#148463)
Kliment Lamonov [Tue, 14 Apr 2026 23:39:16 +0000 (02:39 +0300)] 
gh-148186: Improve `assertCountEqual` description in docs. (#148463)

4 weeks agogh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanne...
Gregory P. Smith [Tue, 14 Apr 2026 23:31:58 +0000 (16:31 -0700)] 
gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise (GH-148578)

remove a mktemp use to avoid security scanner noise

4 weeks agotiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580)
Gregory P. Smith [Tue, 14 Apr 2026 23:29:35 +0000 (16:29 -0700)] 
tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580)

pair of minor doc typo fixes

4 weeks agogh-146393: Use recorded type instead of instance in BINARY_OP (#148569)
Pieter Eendebak [Tue, 14 Apr 2026 20:11:42 +0000 (22:11 +0200)] 
gh-146393: Use recorded type instead of instance in BINARY_OP (#148569)

4 weeks agoGH-145278: freeze encodings (partially) and linecache (#148347)
Filipe Laíns [Tue, 14 Apr 2026 20:01:23 +0000 (21:01 +0100)] 
GH-145278: freeze encodings (partially) and linecache (#148347)

4 weeks agogh-146393: Optimize float division operations by mutating uniquely-referenced operand...
Pieter Eendebak [Tue, 14 Apr 2026 18:08:04 +0000 (20:08 +0200)] 
gh-146393: Optimize float division operations by mutating uniquely-referenced operands in place (JIT only) (GH-146397)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 weeks agogh-86519: Update docs for `prefixmatch` (#148096)
Hugo van Kemenade [Tue, 14 Apr 2026 17:15:06 +0000 (20:15 +0300)] 
gh-86519: Update docs for `prefixmatch` (#148096)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
4 weeks agogh-146563: add exception note for invalid Expat handler return values (#146565)
Bénédikt Tran [Tue, 14 Apr 2026 17:12:47 +0000 (19:12 +0200)] 
gh-146563: add exception note for invalid Expat handler return values (#146565)

4 weeks agogh-72406: Document argument ordering in argparse help output (#148534)
Santi Hernandez [Tue, 14 Apr 2026 16:24:16 +0000 (10:24 -0600)] 
gh-72406: Document argument ordering in argparse help output (#148534)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
4 weeks agogh-131798: constant fold special method lookups in JIT (#148432)
Kumar Aditya [Tue, 14 Apr 2026 16:02:23 +0000 (21:32 +0530)] 
gh-131798: constant fold special method lookups in JIT (#148432)

4 weeks agogh-148047: Revert "GH-148047: Check early whether tail-calling is possible for MSVC...
Ken Jin [Tue, 14 Apr 2026 15:46:54 +0000 (23:46 +0800)] 
gh-148047: Revert "GH-148047: Check early whether tail-calling is possible for MSVC builds on Windows (#148036)" (#148558)

This reverts commit cbd81d59cfea4f7b881642e804646da3a328a712.

4 weeks agogh-gh-131798: optimize `LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN` in the JIT (#148555)
Kumar Aditya [Tue, 14 Apr 2026 15:30:32 +0000 (21:00 +0530)] 
gh-gh-131798: optimize `LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN` in the JIT (#148555)

4 weeks agogh-133312: configure: add --enable-static-libpython-for-interpreter (#133313)
Geoffrey Thomas [Tue, 14 Apr 2026 15:26:19 +0000 (11:26 -0400)] 
gh-133312: configure: add --enable-static-libpython-for-interpreter (#133313)

This option changes the behavior of --enable-shared to continue to build
the libpython3.x.so shared library, but not use it for linking the
python3 interpreter executable. Instead, the executable is linked
directly against the libpython .o files as it would be with
--disable-shared.

There are two benefits of this change. First, libpython uses
thread-local storage, which is noticeably slower when used in a loaded
module instead of in the main program, because the main program can take
advantage of constant offsets from the thread state pointer but loaded
modules have to dynamically call a function __tls_get_addr() to
potentially allocate their thread-local storage area. (There is another
thread-local storage model for dynamic libraries which mitigates most of
this performance hit, but it comes at the cost of preventing
dlopen("libpython3.x.so"), which is a use case we want to preserve.)

Second, this improves the user experience around relocatable Python a
little bit, in that we don't need to use an $ORIGIN-relative path to
locate libpython3.x.so, which has some mild benefits around musl (which
does not support $ORIGIN-relative DT_NEEDED, only $ORIGIN-relative
DT_RPATH/DT_RUNPATH), users who want to make the interpreter setuid or
setcap (which prevents processing $ORIGIN), etc.

4 weeks agogh-131798: Constant-fold `_CONTAINS_OP_DICT` for frozendict (GH-148548)
Wulian233 [Tue, 14 Apr 2026 15:04:28 +0000 (23:04 +0800)] 
gh-131798: Constant-fold `_CONTAINS_OP_DICT` for frozendict (GH-148548)

4 weeks agogh-148510: restore `func_version` check in `_LOAD_ATTR_PROPERTY_FRAME` (GH-148528)
Neko Asakura [Tue, 14 Apr 2026 14:44:39 +0000 (10:44 -0400)] 
gh-148510: restore `func_version` check in `_LOAD_ATTR_PROPERTY_FRAME` (GH-148528)

4 weeks agogh-148192: Fix Generator._make_boundary behavior with CRLF line endings. (#148193)
Henry Jones [Tue, 14 Apr 2026 13:10:08 +0000 (01:10 +1200)] 
gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. (#148193)

The Generator._make_boundary regex did not match on boundary phrases correctly when using CRLF line endings due to re.MULTILINE not considering \r\n as a line ending.

4 weeks agogh-134551: Add t-strings support to pprint (#134577)
Loïc Simon [Tue, 14 Apr 2026 11:37:41 +0000 (13:37 +0200)] 
gh-134551: Add t-strings support to pprint (#134577)

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>
4 weeks agogh-148378: Allow multiple consecutive recording ops per macro op (GH-148496)
Hai Zhu [Tue, 14 Apr 2026 11:26:53 +0000 (19:26 +0800)] 
gh-148378: Allow multiple consecutive recording ops per macro op (GH-148496)

4 weeks agogh-143955: Prevent schema drift false-positives in asyncio tools tests (#148525)
Bartosz Sławecki [Tue, 14 Apr 2026 09:29:01 +0000 (11:29 +0200)] 
gh-143955: Prevent schema drift false-positives in asyncio tools tests (#148525)

4 weeks agogh-148487: Fix issues in `test_add_python_opts` (#148507)
Stan Ulbrych [Tue, 14 Apr 2026 06:45:26 +0000 (07:45 +0100)] 
gh-148487: Fix issues in `test_add_python_opts` (#148507)

4 weeks agogh-148515: make `optimizer_generator` respect multiple caches (#148524)
Neko Asakura [Tue, 14 Apr 2026 04:51:05 +0000 (00:51 -0400)] 
gh-148515: make `optimizer_generator` respect multiple caches (#148524)

4 weeks agogh-148508: Add resilience to SSL preauth tests on iOS (#148536)
Russell Keith-Magee [Tue, 14 Apr 2026 03:12:37 +0000 (11:12 +0800)] 
gh-148508: Add resilience to SSL preauth tests on iOS (#148536)

Adds handling for a test case seen in the iOS SSL tests where an SSL connection fails to
handshake correctly.

4 weeks agogh-148252: Fix stack depth calculation in binary reader on 32-bit platforms (#148253)
Pablo Galindo Salgado [Mon, 13 Apr 2026 22:43:55 +0000 (23:43 +0100)] 
gh-148252: Fix stack depth calculation in binary reader on 32-bit platforms (#148253)

Compute ``final_depth`` in ``decode_stack_pop_push()`` and
``decode_stack_suffix()`` using ``uint64_t`` before validating it.

On 32-bit builds, using ``size_t`` arithmetic for ``keep + push`` can wrap
for large input values, causing the later bounds check to validate the wrong
final depth. Using a widened type keeps the validation aligned with the
actual result.