Commit graph

131045 commits

Author SHA1 Message Date
Sam Gross
ad7d3616c6
gh-121946: Use clang-20 for TSan build (#148570) 2026-04-19 15:13:47 +03:00
Hugo van Kemenade
9e23652230
Prevent GitHub's web conflict editor from converting LF to CRLF (#148739) 2026-04-19 12:21:17 +03:00
Daniel Hollas
4b33308137
gh-148406: Fix annotations of _colorize.FancyCompleter (#148408)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-18 21:51:58 +03:00
John Seong
28b8d5ffcc
gh-133403: Add type annotations to generate_levenshtein_examples.py (#143317)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-18 21:50:17 +03:00
Dino Viehland
d81599eeb7
gh-148659: Export a few more functions required for external JITs (#148704)
Export a few more functions required for external JITs
2026-04-18 11:32:22 -07:00
Serhiy Storchaka
7ce737ea11
gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725) 2026-04-18 12:11:14 +00:00
Victor Stinner
d61fcf834d
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.
2026-04-18 09:56:56 +00:00
Hugo van Kemenade
e9bbf8617d
Add a new Sphinx soft-deprecated directive (#148630)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-18 11:37:54 +03:00
Serhiy Storchaka
2e37d83641
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.
2026-04-18 11:24:33 +03:00
Jelle Zijlstra
92164dc917
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>
2026-04-17 19:20:41 -07:00
Prakash Sellathurai
634568d030
gh-148222: Fix NULL dereference bugs in genericaliasobject.c (#148226) 2026-04-17 17:21:13 -07:00
Pieter Eendebak
db3e990b98
gh-146393: Remove special character in optimizer_bytecodes.c (#148693) 2026-04-17 16:52:16 +00:00
Michael Bommarito
446edda209
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.
2026-04-17 08:42:41 -07:00
Xuwz
a86234ea85
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
2026-04-17 17:13:41 +03:00
Gleb Popov
afde75664e
gh-148484: Fix memory leak of iterator in array.array constructor (GH-148523) 2026-04-17 14:13:44 +02:00
Sergey B Kirpichev
769cc8338f
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>
2026-04-17 14:09:09 +02:00
Dino Viehland
2a07ff980b
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.
2026-04-17 01:55:03 +02:00
Victor Stinner
2faceeec5c
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.
2026-04-16 19:13:25 +02:00
Dino Viehland
c0af5c024b
gh-146031: Allow keeping specialization enabled when specifying eval frame function (#146032)
Allow keeping specialization enabled when specifying eval frame function
2026-04-16 09:44:26 -07:00
Mark Shannon
cecf564073
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.
2026-04-16 15:33:09 +01:00
Mark Shannon
600f4dbd54
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
2026-04-16 15:22:22 +01:00
Petr Viktorin
0fcf2b72d3
gh-146636: PEP 803: Reference documentation (GH-148013)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-16 14:17:44 +02:00
Pieter Eendebak
1f6a09fb36
gh-100239: Specialize more binary operations using BINARY_OP_EXTEND (GH-128956) 2026-04-16 09:22:41 +01:00
Havmaagen
9d38143088
Docs: Fix typos and a comment in enum.rst (#148156) 2026-04-16 11:23:29 +05:30
Joshua Root
5f28e6b818
gh-148474: Fix _Py_hexlify_simd compilation with older clang (#148475) 2026-04-16 11:21:23 +05:30
Jelle Zijlstra
5b8cd314e2
gh-137814: Fix __qualname__ of __annotate__ (#137842) 2026-04-15 21:52:30 -07:00
Steve Dower
54607eec34
Add PyManager documentation for index signatures (GH-148631) 2026-04-15 22:48:14 +01:00
Hugo van Kemenade
eb2f634b83
gh-148100: Soft deprecate re.match and re.Pattern.match in favour of prefixmatch (#148101) 2026-04-15 23:09:47 +03:00
Neko Asakura
e998eb9a83
gh-148604: change ADD_OP(_POP_TOP, ...) to optimize_pop_top in optimizer_bytecodes.c (GH-148619) 2026-04-16 01:08:29 +08:00
Hugo van Kemenade
55c9d60a3a
Docs: Use bash lexer for http.server CLI commands, not Python (#148612) 2026-04-15 18:18:49 +03:00
Victor Stinner
70eb56be42
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.
2026-04-15 15:59:02 +02:00
Carey Metcalfe
cb339d3c9e
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.
2026-04-15 06:24:28 -07:00
Ken Jin
ab45919812
gh-148609: Remove unicode character in bytecodes.c (GH-148611)
Remove unicode character in bytecodes.c
2026-04-15 12:58:35 +00:00
Wulian233
c7e9919df0
gh-131798: Fix _ITER_CHECK_RANGE type in the JIT (#148607) 2026-04-15 12:22:55 +00:00
Michiel W. Beijen
ca064d9b99
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.
2026-04-15 14:21:43 +02:00
Bénédikt Tran
69e0a78e6e
gh-148390: fix undefined behavior of memoryview(...).cast("?") (#148454) 2026-04-15 11:42:20 +00:00
Pieter Eendebak
aee63e2dae
gh-139038: Add whatsnew entry for jit unique reference tracking (GH-148572)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-04-15 18:53:47 +08:00
Anerdw
d14e31ed68
gh-147957: pop items from UserDict in LIFO order (gh-147958) 2026-04-14 23:29:41 -05:00
Stan Ulbrych
d0e7c6acc9
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
2026-04-14 17:15:27 -07:00
Kliment Lamonov
94d42bf5c2
gh-148186: Improve assertCountEqual description in docs. (#148463) 2026-04-14 19:39:16 -04:00
Gregory P. Smith
fd81246bd5
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
2026-04-14 23:31:58 +00:00
Gregory P. Smith
236aa0a4e2
tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580)
pair of minor doc typo fixes
2026-04-14 23:29:35 +00:00
Pieter Eendebak
5c3decad66
gh-146393: Use recorded type instead of instance in BINARY_OP (#148569) 2026-04-14 20:11:42 +00:00
Filipe Laíns
0012686d92
GH-145278: freeze encodings (partially) and linecache (#148347) 2026-04-14 21:01:23 +01:00
Pieter Eendebak
95cbd4a232
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>
2026-04-15 02:08:04 +08:00
Hugo van Kemenade
bdb0b36192
gh-86519: Update docs for prefixmatch (#148096)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2026-04-14 20:15:06 +03:00
Bénédikt Tran
356a031de5
gh-146563: add exception note for invalid Expat handler return values (#146565) 2026-04-14 19:12:47 +02:00
Santi Hernandez
4286227308
gh-72406: Document argument ordering in argparse help output (#148534)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-14 16:24:16 +00:00
Kumar Aditya
3cb7eaec85
gh-131798: constant fold special method lookups in JIT (#148432) 2026-04-14 16:02:23 +00:00
Ken Jin
11da7d4e21
gh-148047: Revert "GH-148047: Check early whether tail-calling is possible for MSVC builds on Windows (#148036)" (#148558)
This reverts commit cbd81d59cf.
2026-04-14 23:46:54 +08:00