Commit graph

35274 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
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
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
Chris Eibl
1af025dd22
gh-146004: fix test_args_from_interpreter_flags on windows (#146580) 2026-03-29 09:38:45 +05:30
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
Donghee Na
5992238986
gh-146381: Constant-fold frozendict subscript lookups via REPLACE_OPCODE_IF_EVALUATES_PURE (gh-146490) 2026-03-28 09:48:53 +09: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
Bartosz Sławecki
69b08c397b
gh-145057: Fix test names and comments to reflect sys.lazy_modules is a dict, not a set (#146084)
Fix test names and comments to reflect sys.lazy_modules is a dict, not a set
2026-03-27 14:35:50 -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
Neko Asakura
a492d9ff74
gh-145866: Convert LIST_EXTEND to leave its inputs on the stack to be cleaned up by _POP_TOP be cleaned up by _POP_TOP (GH-146383) 2026-03-28 01:04:17 +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
Victor Stinner
d4153a9f76
gh-146480: Override the exception in _PyErr_SetKeyError() (#146486)
If _PyErr_SetKeyError() is called with an exception set, it now
replaces the current exception with KeyError (as expected), instead
of setting a SystemError or failing with a fatal error (in debug
mode).
2026-03-27 11:20:19 +00:00
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
Victor Stinner
0c7a75aeef
gh-146059: Cleanup pickle fast_save_enter() test (#146481)
Remove {"key": data}, it's not required to reproduce the bug.
Simplify also deep_nested_struct(): remove the seed parameter.
Fix a typo in a comment.
2026-03-27 09:13:48 +01:00
Victor Stinner
5c0dcb3e0d
gh-146059: Call fast_save_leave() in pickle save_frozenset() (#146173)
Add more pickle tests: test also nested structures.
2026-03-26 17:35:27 +01: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
Kumar Aditya
bfdaa3c565
gh-131798: JIT: split call method and call builtin opcodes into smaller uops (#146463) 2026-03-26 14:20:57 +00: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
Sacul
1516c26399
gh-145866: Convert DICT_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146190) 2026-03-26 19:38:44 +08: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
Kumar Aditya
fc1f6b176e
gh-GH-131798: optimize jit attribute loads on immutable types (#146449) 2026-03-26 10:12:10 +00:00
Victor Stinner
b5a27bdcf0
gh-146410: Add --pythoninfo option to regrtest (#146413)
* Android now runs tests with --pythoninfo to dump build information.
* Add display_title() function.
2026-03-26 10:56:38 +01:00
Kevin Huai
f5364ae750
gh-145866: Convert _CALL_INTRINSIC_2 to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146262) 2026-03-26 17:41:07 +08:00
Kumar Aditya
495178ab05
gh-146453: fix _PyType_LookupByVersion for types with fixed pre-defined version tags (#146454) 2026-03-26 14:36:55 +05:30
Sergey B Kirpichev
8e1469c952
gh-138573: Filter out failing math tests on Solaris (#146402) 2026-03-26 00:11:20 +01:00
Victor Stinner
0055140b2c
gh-146358: Fix warnings.catch_warnings on Free Threading (#146374)
catch_warnings now also overrides warnings.showwarning() on Free
Threading to support custom warnings.showwarning().
2026-03-25 14:34:50 +01:00
Hugo van Kemenade
d0e66ef1c0
gh-146369: Ensure PYTHON_LAZY_IMPORTS=none overrides __lazy_modules__ (#146371) 2026-03-25 11:08:45 +00:00
Victor Stinner
3364e7e62f
gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217)
OpenSSL 4.0.0 alpha1 removed these functions:

* SSLv3_method()
* TLSv1_method()
* TLSv1_1_method()
* TLSv1_2_method()

Other changes:

* Update test_openssl_version().
* Update multissltests.py for OpenSSL 4.
* Add const qualifier to fix compiler warnings.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-25 07:44:47 +01:00
Petr Viktorin
119fce7b88
gh-144984: Skip test under tracerefs (GH-146218) 2026-03-24 17:34:12 +01: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
Neko Asakura
6d73bc2267
gh-145866: Convert DICT_MERGE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146329) 2026-03-24 18:31:41 +08: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
Hood Chatham
0c83e8bed8
gh-146325: Use test.support.requires_fork in test_fastpath_cache_cleared_in_forked_child (#146330) 2026-03-23 16:56:11 +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
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
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
Serhiy Storchaka
161329cde2
gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) 2026-03-22 16:22:25 +02:00