Commit graph

130799 commits

Author SHA1 Message Date
Sergey B Kirpichev
b456cb25a9
gh-143050: Add helper _PyLong_InitTag() (#147956)
With this we can assume, that _PyLong_SetSignAndDigitCount() and
_PyLong_SetDigitCount() operate on non-immortal integers.

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-01 21:42:10 +00:00
Yongtao Huang
4810beddbf
gh-147960: Fix memory leak in crossinterp _tuple_shared() on alloc failure (#147961) 2026-04-01 18:34:55 +02:00
Peter Sutton
021ee7fd6a
Docs: Use !r in __repr__ example (gh-146273) 2026-04-01 11:16:36 -05:00
Mark Shannon
255026d9ee
GH-126910: Make _Py_get_machine_stack_pointer return the stack pointer (#147945)
* Make _Py_get_machine_stack_pointer return the stack pointer (or close to it), not the frame pointer

* Make ``_Py_ReachedRecursionLimit`` inline again
* Remove ``_Py_MakeRecCheck`` relacing its use with ``_Py_ReachedRecursionLimit``
* Move stack swtiching check into ``_Py_CheckRecursiveCall``
2026-04-01 17:15:13 +01:00
Hugo van Kemenade
9e5b838372
gh-146488: hash-pin check-html-ids action references (#147968) 2026-04-01 14:23:25 +00:00
konsti
03f3b9ade9
gh-146907: Clarify ABI compatibility between debug and release builds (GH-146925) 2026-04-01 16:17:56 +02:00
Petr Viktorin
2452324001
gh-146636: PEP 803: add Py_TARGET_ABI3T and .abi3t.so extension (GH-146637)
- Add Py_TARGET_ABI3T macro.
- Add ".abi3t.so" to importlib EXTENSION_SUFFIXES.
- Remove ".abi3.so" from importlib EXTENSION_SUFFIXES on Free Threading.
- Adjust tests

This is part of the implementation for PEP-803.
Detailed documentation to come later.

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
2026-04-01 16:14:59 +02:00
Stan Ulbrych
08c5d3d423
gh-145000: Run check-html-ids.py in CI (#145632)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-01 15:10:27 +02:00
Stan Ulbrych
07d5d72484
Increase dependabot interval to quarterly (#147959) 2026-04-01 12:46:57 +00:00
William Woodruff
a504c0a590
gh-146488: hash-pin all action references
Signed-off-by: William Woodruff <william@yossarian.net>
2026-04-01 12:46:19 +00:00
Victor Stinner
b38cfb7bca
gh-146479: Skip test_frame_pointer_unwind for gcc -O3 --enable-shared (#147947)
Skip the test if Python is built with --enable-shared and "gcc -O2"
or "gcc -O3".
2026-04-01 12:35:58 +02:00
Serhiy Storchaka
473d2a35ce
gh-147944: Increase range of bytes_per_sep (GH-147946)
Accepted range for the bytes_per_sep argument of bytes.hex(),
bytearray.hex(), memoryview.hex(), and binascii.b2a_hex()
is now increased, so passing sys.maxsize and -sys.maxsize is now
valid.
2026-04-01 08:33:30 +00:00
Serhiy Storchaka
42825e6387
gh-146431: Add the wrapcol and ignorechars parameters for more Base XX codec (GH-146434)
Add the wrapcol parameter to base64 functions b16encode(), b32encode(),
b32hexencode(), b85encode() and z85encode(), and binascii functions
b2a_base32() and b2a_base85().

Add the ignorechars parameter to base64 functions b16decode(), b32decode(),
b32hexdecode(), b85decode() and z85decode(), and binascii functions
a2b_hex(), unhexlify(), a2b_base32() and a2b_base85().
2026-04-01 10:48:50 +03:00
dependabot[bot]
4497cf3aed
build(deps): bump qs from 6.14.0 to 6.15.0 in /Platforms/emscripten/browser_test (#146048)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 09:43:58 +03:00
Boy Steven
9e1f1644cd
Docs: fill in descriptor C API docs (GH-146644) 2026-03-31 17:52:11 -04:00
Stan Ulbrych
62a6e898e0
gh-147856: Allow the 'count' argument of bytes.replace() to be a keyword (#147943) 2026-03-31 19:27:52 +02:00
Ken Jin
362145c20e
gh-139109: Document the trace recording interpreter in internaldocs (GH-146110) 2026-03-31 23:25:54 +08:00
Sergey B Kirpichev
db5936c5b8
gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (#145901)
The long_from_string_base() might return a small integer, when the
_pylong.py is used to do conversion.  Hence, we must be careful here to
not smash it "small int" bit by using the _PyLong_FlipSign().

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-31 13:17:49 +00:00
Hugo van Kemenade
829e4d0b14
gh-141510: Support frozendict in plistlib (#145590)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-31 15:45:23 +03:00
Pieter Eendebak
67354b2925
gh-145563: Add thread-safety annotation for PyCapsule C-API (#146612) 2026-03-31 16:32:35 +05:30
Thomas Kowalski
b4fac15613
gh-145458: use self.skip_idle consistently in the tachyon profiler (#145459) 2026-03-31 09:57:07 +01:00
sunmy2019
bbf7fb2c15
gh-146615: Fix format specifiers in Objects/ directory (GH-146620) 2026-03-31 10:59:48 +03:00
sunmy2019
dcb260eff2
gh-146615: Fix format specifiers in Python/ directory (GH-146619) 2026-03-31 10:59:17 +03:00
sunmy2019
b7055533ab
gh-146615: Fix format specifiers in test cextensions (GH-146618) 2026-03-31 10:58:27 +03:00
sunmy2019
1c396e1821
gh-146615: Fix format specifiers in extension modules (GH-146617) 2026-03-31 10:57:37 +03:00
sunmy2019
72d29ea363
gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (GH-146634) 2026-03-31 10:48:02 +03:00
Hood Chatham
70d1b08a4b
gh-146376: Reduce timeout in Emscripten GHA workflow (#146378) 2026-03-30 20:31:36 +00:00
Brandon
ca95e979d6
gh-146442: Fix various bugs in compiler pipeline (#146443)
Fix null derefs, missing decrefs, and unchecked returns from bug report.
2026-03-30 22:04:04 +02:00
Sergey B Kirpichev
e79fd60339
gh-146238: Support half-floats in the array module (#146242)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-30 19:48:34 +00:00
Serhiy Storchaka
ec2bc12e54
gh-145056: Add support for merging collections.UserDict and frozendict (GH-146465) 2026-03-30 22:07:28 +03:00
Serhiy Storchaka
727890410b
gh-145056: Fix merging of collections.OrderedDict and frozendict (GH-146466) 2026-03-30 22:06:44 +03:00
Cody Maloney
a25e09721a
gh-139633: Run netrc file permission check only once per parse (GH-139634)
Change the `.netrc` security check to be run once per parse of the
default file rather than once per line inside the file.
2026-03-30 22:05:18 +03:00
Neko Asakura
afd8113e9d
gh-144270: Make SubElement parent and tag positional-only (GH-144845)
The C accelerator implementations use PyArg_ParseTuple, which
inherently enforces positional-only parameters. The Python fallback
allowed these as keyword arguments, creating a behavioral mismatch.

Make the tag parameter of Element.__init__ and the parent and tag
parameters of SubElement positional-only to align with the C
accelerator.
2026-03-30 19:42:24 +03:00
Kumar Aditya
8e9d21c64b
gh-146558: JIT optimize dict access for objects with known hash (#146559) 2026-03-30 14:23:29 +00:00
Chris Eibl
76c554bcdf
gh-139922: always run MSVC 64-bit tail-calling CI (GH-146570)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2026-03-30 21:55:44 +08:00
Victor Stinner
adf2c47911
gh-126835: Fix _PY_IS_SMALL_INT() macro (#146631) 2026-03-30 12:48:18 +00:00
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
Hood Chatham
6857de625f
gh-146416: Emscripten: Improve standard stream handling in node_entry.mjs (#146417)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-30 13:24:35 +02:00
Russell Keith-Magee
6420847bda
gh-146444: Don't package as part of iOS 'build hosts' target (#146628)
* Revert Py3.9 compatibility fixes.
* Only build the package on 'build all'.
2026-03-30 12:58:57 +02: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
Victor Stinner
382c04308d
gh-146444: Make Platforms/Apple/ compatible with Python 3.9 (#146624)
Replace "str | None" with typing.Union[str, None].
2026-03-30 09:25:11 +00: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
cui
4d0e8ee649
gh-146579: _zstd: Fix decompression options dict error message (#146577)
The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
2026-03-29 12:58:12 -07: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
Chris Eibl
1af025dd22
gh-146004: fix test_args_from_interpreter_flags on windows (#146580) 2026-03-29 09:38:45 +05:30