Commit graph

32413 commits

Author SHA1 Message Date
Kumar Aditya
8e10bd77ea
gh-146587: fix type slot assignment incase of multiple slots for same name (#146593) 2026-03-30 18:07:38 +05:30
ivonastojanovic
f4d3c61f36
gh-138122: Add differential flame graph (#145785)
Differential flame graphs compare two profiling runs and highlight where
performance has changed. This makes it easier to detect regressions
introduced by code changes and to verify that optimizations have the
intended effect.

The visualization renders the current profile with frame widths
representing current time consumption. Color is then applied to show the
difference relative to the baseline profile: red gradients indicate
regressions, while blue gradients indicate improvements.

Some call paths may disappear entirely between profiles. These are
referred to as elided stacks and occur when optimizations remove code
paths or when certain branches stop executing. When elided stacks are
present, an "Elided" toggle is displayed, allowing the user to switch
between the main differential view and a view showing only the removed
paths.

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2026-03-30 12:31:06 +01:00
Marcel Telka
7b2495e811
gh-138850: Add --disable-epoll to configure (GH-145768)
* gh-138850: Add --disable-epoll to configure


Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-30 11:55:42 +02:00
Sanyam Khurana
7f0c4f6a0b
gh-138577: Fix keyboard shortcuts in getpass with echo_char (#141597)
When using getpass.getpass(echo_char='*'), keyboard shortcuts like
Ctrl+U (kill line), Ctrl+W (erase word), and Ctrl+V (literal next)
now work correctly by reading the terminal's control character
settings and processing them in non-canonical mode.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-30 11:11:13 +02:00
Ramin Farajpour Cami
2cf6a68f02
gh-146556: Fix infinite loop in annotationlib.get_annotations() on circular __wrapped__ (#146557) 2026-03-30 03:08:18 +00:00
Stan Ulbrych
e39d84a37d
gh-146083: Upgrade bundled Expat to 2.7.5 (#146085) 2026-03-29 19:05:14 +02:00
Bénédikt Tran
24db78c532
gh-146080: fix a crash in SNI callbacks when the SSL object is gone (#146573) 2026-03-29 14:27:22 +02:00
Bénédikt Tran
aa6680775d
gh-146090: fix memory management of internal sqlite3 callback contexts (#146569) 2026-03-29 14:21:37 +02:00
Serhiy Storchaka
6932c3ee6a
gh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (GH-146472)
KeyErrors raised in keys() or __getitem__() during dictionary unpacking
in call (func(**mymapping)) are no longer masked by TypeError.
2026-03-29 11:58:52 +03:00
Gregory P. Smith
1efe441de7
gh-146004: propagate all -X options to multiprocessing child processes (GH-146005)
Propagate all -X command line options to multiprocessing spawned child Python processes.
2026-03-28 05:03:05 +00:00
Bartosz Sławecki
a5b9d60a69
gh-145059: Record lazy modules without submodules in sys.lazy_modules (#146081)
Record simple lazy modules as well
2026-03-27 14:37:11 -07:00
Imgyu Kim
73cc1fd4f4
gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (#146357)
Path('') resolves to CWD, so an empty WHEEL_PKG_DIR string caused
ensurepip to search the current working directory for wheel files.
Add a truthiness check to treat empty strings the same as None.

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 20:48:07 +00:00
Diego Russo
6763d26b2b
GH-126910: reserve FP on AArch64 when generating JIT stencils (GH-146520) 2026-03-28 01:51:51 +08:00
moktamd
1417737810
gh-146507: cache the buffer size for SelectorTransport.get_write_buffer_size() (#146518) 2026-03-27 21:43:15 +05:30
Brandon
c8ee196030
gh-146388: Add null check for sym_new(ctx) in make_bottom (GH-146389) 2026-03-27 22:50:29 +08:00
Pieter Eendebak
9214e3f33e
gh-123471: Make itertools.zip_longest safe in the FT build (#146033) 2026-03-27 19:31:49 +05:30
Brij Kapadia
0de4e08a59
gh-146250: Fix memory leak in re-initialization of SyntaxError (#146251) 2026-03-27 19:29:21 +05:30
Joao S. O. Bueno
d0061d50b0
gh-146440: Add array_hook parameter to JSON decoders (#146441)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 11:10:48 +00:00
Sergey B Kirpichev
256907d3aa
gh-138580: Revert sys.float_info.iec_60559 boolean flag (#146501)
This reverts commit 68c7fad757.

It looks like on practice the __STDC_IEC_559__ doesn't indicate
conformance to the standard. It can't be used to filter out tests
or to give some promises in documentation. See discussion in
the reverted PR thread:
https://github.com/python/cpython/pull/138811#issuecomment-4117692418
2026-03-27 11:29:15 +01:00
Russell Keith-Magee
36e4ffc173
gh-146444: Move the Apple folder to the Platforms directory (#146497)
Migrate the Apple/iOS XCframework build tools to the Platforms directory.
2026-03-27 02:50:35 +00:00
Russell Keith-Magee
5684b3a04c
gh-146498: Ensure binary content is correctly processed in multi-arch iOS XCframeworks (#146499)
Ensure that multi-arch libpython dylibs aren't copied into the app, and the
standard lib is always found for framework post-processing.
2026-03-27 09:56:49 +08:00
Russell Keith-Magee
ca6dfa0f31
gh-146446: Miscellaneous improvements to iOS XCframework build script (#146447)
Modifies the iOS build script so that the clean target is more selective about
what is cleaned, the test target has a valid fallback value for ci mode, and the
cross-build directory can be customised.
2026-03-27 05:54:03 +08:00
Sergey B Kirpichev
0e3b3b895c
gh-146151: Add support for complex arrays in the array module (#146237)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-26 15:45:20 +01:00
Sergey B Kirpichev
c68a19448a
gh-146151: memoryview supports 'F' and 'D' format types (complex) (#146241)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-26 15:26:34 +01:00
Serhiy Storchaka
0e543055b0
gh-145876: Do not mask AttributeErrors raised during dictionary unpacking (GH-145906)
AttributeErrors raised in keys() or __getitem__() during
dictionary unpacking ({**mymapping} or func(**mymapping)) are
no longer masked by TypeError.
2026-03-26 13:48:57 +00:00
Jack Danger
e1d4823797
gh-145650: Add logging.{Formatter,Filter}.__repr__ (GH-145652) 2026-03-26 12:41:14 +00:00
Robert Kirkman
3a2b81e919
gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel (GH-145617)
When Python is running on 32-bit ARM Android on a 64-bit ARM kernel, `os.uname().machine` is `armv8l`. Such devices run the same userspace code as `armv7l` devices, so apply the same `armeabi_v7a` Android ABI to them, which works.
2026-03-26 13:27:36 +01:00
Victor Stinner
8de70b31c5
gh-145633: Fix struct.pack('f') on s390x (#146422)
Use PyFloat_Pack4() to raise OverflowError.
Add more tests on packing/unpacking floats.

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-26 11:12:49 +00:00
Hugo van Kemenade
d0e66ef1c0
gh-146369: Ensure PYTHON_LAZY_IMPORTS=none overrides __lazy_modules__ (#146371) 2026-03-25 11:08:45 +00:00
Sam Gross
60093096ba
gh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072)
Fix free-threading scaling bottleneck in sys.intern and `PyObject_SetAttr` by
avoiding the interpreter-wide lock when the string is already interned and
immortalized.
2026-03-24 14:29:37 -04:00
Brandt Bucher
535b09c19d
GH-126910: Allow most native profilers and debuggers to unwind through JIT frames (GH-143548) 2026-03-25 02:09:35 +08:00
Pieter Eendebak
951675c18a
gh-146306: JIT: Optimize float operations by mutating uniquely-referenced operands in place (GH-146307)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:16:02 +08:00
Sergey B Kirpichev
68c7fad757
gh-138580: Add sys.float_info.iec_60559 boolean flag (#138811)
This value indicating support the IEC 60559 floating-point standard (the
Annex F of C99).  If enabled, the float type characteristics matches the
IEC 60559 double format and exceptional cases for the math's functions
follow to the section F.10 of the C99 standard.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-24 11:36:15 +00:00
Victor Stinner
bcff99cb3f
gh-146202: Create tmp_dir in regrtest worker (#146347)
Create tmp_dir in libregrtest.worker since the directory can be
different than the --tempdir directory.
2026-03-23 23:47:47 +00:00
Brij Kapadia
e017971eb9
gh-146199: Fix error handling in code_richcompare when PyObject_RichCompareBool fails (#146200)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-23 23:41:53 +01:00
Daniele Parmeggiani
daa159f98b
gh-135871: Reload lock internal state while spinning in PyMutex_LockTimed (gh-146064)
Add atomic loads in the slow path of PyMutex to increase the number
of lock acquisitions per second that threads can make on a shared mutex.
2026-03-23 16:55:06 -04:00
Charlie Lin
821581adae
gh-145719: Add .efi file detection in mimetypes (#145720)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-23 22:16:41 +02:00
Jason R. Coombs
f5d47fceb0
gh-143387: Raise an exception instead of returning None when metadata file is missing. (#146234) 2026-03-23 09:12:36 -04:00
Petr Viktorin
91cd2e5806
gh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-23 12:42:09 +01:00
Serhiy Storchaka
4561f6418a
gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)
Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc)
no longer ignores excess data after the first padded quad in non-strict
(default) mode.  Instead, in conformance with RFC 4648, it ignores the
pad character, "=", if it is present before the end of the encoded data.
2026-03-22 23:12:58 +02:00
Pablo Galindo Salgado
ae6adc9079
gh-146308: Fix error handling issues in _remote_debugging module (#146309) 2026-03-22 21:12:02 +00:00
kangtastic
b4e5bc2164
gh-146192: Add base32 support to binascii (GH-146193)
Add base32 encoder and decoder functions implemented in
C to the binascii module and use them to greatly improve the
performance and reduce the memory usage of the existing
base32 codec functions in the base64 module.
2026-03-22 23:10:28 +02:00
flow
a17301ab3d
gh-135953: Properly obtain main thread identifier in Gecko Collector (#146045) 2026-03-22 18:53:00 +00:00
reiden
e36f8db7e5
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (GH-144300)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-03-23 00:57:23 +08:00
AN Long
c30fae4bea
gh-146245: Fix reference and buffer leaks via audit hook in socket module (GH-146248) 2026-03-22 13:29:34 +02:00
Stan Ulbrych
f0aeabc6f9
gh-140049: Colorize exception notes in traceback.py (#140051)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-22 08:54:43 +00:00
Serhiy Storchaka
3776aba204
Update docs for gh-146056 (GH-146213) 2026-03-22 09:29:04 +02:00
Kumar Aditya
60fbc20ef9
gh-140947: fix contextvars handling for server tasks in asyncio (#141158) 2026-03-21 17:44:08 +05:30
Mark Shannon
879c85f6e4
GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
2026-03-21 10:48:13 +00:00
Jason R. Coombs
b5e4c46be2
gh-146228: Better fork support in cached FastPath (#146231)
* Apply changes from importlib_metadata 8.9.0
* Suppress deprecation warning in fork.
2026-03-20 20:10:50 +00:00