Commit graph

130860 commits

Author SHA1 Message Date
Pieter Eendebak
efda60e2ec
gh-100239: Propagate type info through _BINARY_OP_EXTEND in tier 2 (GH-148146) 2026-04-06 20:52:42 +08:00
Stan Ulbrych
476fadc9ae
Add Stan to docs config reviewers (#148164) 2026-04-06 15:47:44 +03:00
Wulian233
69f51625e6
gh-148119: Refactor get_type_attr_as_size to improve error handling in structseq.c (#148120) 2026-04-06 17:41:30 +05:30
Stan Ulbrych
1795fccfbc
gh-148157: Check for _PyPegen_add_type_comment_to_arg fail in _PyPegen_name_default_pair (#148158) 2026-04-06 12:56:36 +01:00
Hugo van Kemenade
acf5229081
Docs: Update "Installing Python modules" (#146249) 2026-04-06 14:21:59 +03:00
Serhiy Storchaka
d0e204fb1d
gh-148153: Do not use assert for parameter validation in base64 (GH-148154)
base64.b32encode() now always raises ValueError instead of
AssertionError for the value of map01 with invalid length.
2026-04-06 13:47:27 +03:00
Malcolm Smith
a95ee3a21d
gh-144418: Increase Android testbed emulator RAM to 4 GB (#148054)
Pre-create the Android emulator image so that the the configuration can be
modified to use 4GB of RAM.
2026-04-06 13:48:00 +08:00
Pablo Galindo Salgado
fbfc6ccb0a
gh-148144: Initialize visited on copied interpreter frames (#148143)
_PyFrame_Copy() copied interpreter frames into generator and
frame-object storage without initializing the visited byte. Incremental
GC later reads frame->visited in mark_stacks() on non-start passes, so
copied frames could expose an uninitialized value once they became live
on a thread stack again.

Reset visited when copying a frame so copied frames start with defined
GC bookkeeping state. Preserve lltrace in Py_DEBUG builds.
2026-04-06 00:23:07 +01:00
Stan Ulbrych
bce96a1813
gh-145098: Use macos-15-intel instead of unstable macos-26-intel in {jit,tail-call}.yml (#148126)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-05 22:23:43 +03:00
Loïc Simon
b07becb573
gh-140870: PyREPL auto-complete module attributes in import statements (#140871)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2026-04-05 19:10:59 +00:00
Loïc Simon
c64baff1d8
gh-69605: Add math.integer to PyREPL module completer hardcoded list (#144811) 2026-04-05 19:31:19 +01:00
Stan Ulbrych
d6e044512c
Silence unused-variable warnings in optimizer_cases.c.h (#148127) 2026-04-05 19:22:10 +01:00
Gregory P. Smith
a1cf4430ed
gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129) 2026-04-05 11:07:07 -07:00
Pablo Galindo Salgado
77fc2f5a5e
gh-144319: Fix huge page leak in datastack chunk allocator (#147963)
Fix huge page leak in datastack chunk allocator

The original fix rounded datastack chunk allocations in pystate.c so that
_PyObject_VirtualFree() would receive the full huge page mapping size.

Change direction and move that logic into _PyObject_VirtualAlloc() and
_PyObject_VirtualFree() instead. The key invariant is that munmap() must see
the full mapped size, so alloc and free now apply the same platform-specific
rounding in the allocator layer.

This keeps _PyStackChunk bookkeeping in requested-size units, avoids a
hardcoded 2 MB assumption, and also covers other small virtual-memory users
such as the JIT tracer state allocation in optimizer.c.
2026-04-05 16:29:38 +01:00
Chris Eibl
668c5723eb
GH-139922: add interpreter types to InternalDocs/interpreter.md (GH-148035) 2026-04-05 23:25:14 +08:00
Antonio Cuni
1c4408aeca
gh-130472: Integrate fancycompleter with the new repl, to get colored tab completions (#130473)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2026-04-05 14:23:07 +00:00
Ezio Melotti
1f36a510a2
Add permissions: {} to all reusable workflows (#148114)
Add permissions: {} to all reusable workflows
2026-04-05 00:31:54 +02:00
ivonastojanovic
4ff8b07a3d
gh-142927: Show self time in flamegraph tooltip (#147706)
We already show self time in differential flamegraphs, but it should
be included in regular flamegraphs as well. Display the time spent
in the function body excluding callees, not just the total inclusive
time.
2026-04-04 20:55:05 +01:00
Stan Ulbrych
c43b490ca3
gh-145000: Find correct merge base in reusable-check-html-ids.yml workflow (#147975) 2026-04-04 20:47:11 +01:00
Serhiy Storchaka
8bf8bf9292
gh-73613: Support Base32 and Base64 without padding (GH-147974)
Add the padded parameter in functions related to Base32 and Base64 codecs
in the binascii and base64 modules.  In the encoding functions it controls
whether the pad character can be added in the output, in the decoding
functions it controls whether padding is required in input.

Padding of input no longer required in base64.urlsafe_b64decode() by default.
2026-04-04 21:26:16 +03:00
Stan Ulbrych
75be902a13
Docs: Standardize documentation authors (#148102) 2026-04-04 19:02:16 +01:00
Pablo Galindo Salgado
21fb9dc71d
gh-146527: Heap-allocate gc_stats to avoid bloating PyInterpreterState (#148057)
The gc_stats struct contains ring buffers of gc_generation_stats
entries (11 young + 3×2 old on default builds). Embedding it inline
in _gc_runtime_state, which is itself inline in PyInterpreterState,
pushed fields like _gil.locked and threads.head to offsets beyond
what out-of-process profilers and debuggers can reasonably read in
a single buffer (e.g. offset 9384 for _gil.locked vs an 8 KiB read
buffer).

Heap-allocate generation_stats via PyMem_RawCalloc in _PyGC_Init and
free it in _PyGC_Fini. This shrinks PyInterpreterState by ~1.6 KiB
and keeps the GIL, thread-list, and other frequently-inspected fields
at stable, low offsets.
2026-04-04 18:42:30 +01:00
Stan Ulbrych
b1d2d9829c
Docs: Fix a typo in the 'Non-ASCII characters in names' section (#148043) 2026-04-04 17:45:52 +01:00
Hugo van Kemenade
fbdbea949f
Regex HOWTO: invalid string literals result in SyntaxWarning (#148092)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-04 19:13:17 +03:00
Donghee Na
853dafe23a
gh-148083: Prevent constant folding when lhs is container types (gh-148090) 2026-04-05 00:40:12 +09:00
Wulian233
c398490fbf
gh-148074: Fix typeobject.c missing error return (#148075) 2026-04-04 21:04:55 +05:30
Donghee Na
289f19adb0
gh-148083: Constant-fold _CONTAINS_OP_SET for frozenset (gh-148084) 2026-04-04 12:32:12 +00:00
Stan Ulbrych
fe9befc1ca
gh-145883: Fix two heap-buffer-overflows in _zoneinfo (#145885) 2026-04-04 13:29:17 +01:00
Ken Jin
328da67b2c
gh-146073: Revert "gh-146073: Add fitness/exit quality mechanism for JIT trace frontend (GH-147966)" (#148082)
This reverts commit 198b04b75f.
2026-04-04 11:56:40 +00:00
TT
611d606a18
gh-148067: Fix typo in asyncio event loop docs: 'signals' -> 'signal' (#148073) 2026-04-04 16:02:58 +05:30
Ken Jin
c50d6cd012
gh-148078: Fix uses of sym_is_not_null in JIT optimizer (GH-148079) 2026-04-04 18:16:23 +08:00
Kumar Aditya
e7bf8eac0f
gh-131798: split recursion check to _CHECK_RECURSION_LIMIT and combine checks (GH-148070) 2026-04-04 17:23:03 +08:00
Serhiy Storchaka
113038f940
gh-148016: Improve "Leading padding not allowed" error in Base32 and Base64 decoders (GH-148017)
It is now raised instead of "Excess padding not allowed" if all characters
preceding "=" were ignored.
2026-04-04 08:37:14 +00:00
Serhiy Storchaka
985216ced3
gh-148029: Fix error message for invalid number of Base32 characters (GH-148030)
Do not count ignored non-alphabet characters.
2026-04-04 11:07:19 +03:00
Kumar Aditya
7bcc1c4920
gh-131798: relax GUARD_CALLABLE checks for self type checks (#148069) 2026-04-04 12:49:23 +05:30
Kumar Aditya
7e275d4965
gh-131798: JIT inline function addresses of builtin methods (#146906) 2026-04-04 09:12:13 +05:30
Russell Keith-Magee
b8470deb5d
gh-146450: Normalise feature set of Android build script with other platform build scripts (#146451)
Allows for cleaning a subset of targets, customization of the download cache and
cross-build directories, and modifies the build command to allow 'all', 'build'
and 'hosts' targets.
2026-04-04 11:42:04 +08:00
Robert Kirkman
848bbe9ff2
gh-146541: Allow building the Android testbed for 32-bit targets (#146542)
Allows building the Android testbed for 32-bit targets, adding the target triplets
`arm-linux-androideabi` and `i686-linux-android`.

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2026-04-04 11:27:27 +08:00
Chris Eibl
dea4083aa9
GH-146210: Fix building the jit stencils on Windows when the interpreter is built with a different clang version (#146338)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-03 12:42:13 -07:00
Joshua Swanson
80d0a85d96
gh-126676: Expand argparse docs for type=bool with warning and alternatives (#146435)
Co-authored-by: joshuaswanson <joshuaswanson@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-03 18:07:03 +00:00
Hugo van Kemenade
cb76ab3819
gh-145098: Use macos-15-intel instead of unstable macos-26-intel (#148038) 2026-04-03 19:23:29 +03:00
Hai Zhu
198b04b75f
gh-146073: Add fitness/exit quality mechanism for JIT trace frontend (GH-147966) 2026-04-03 23:54:30 +08:00
Łukasz Langa
3681d47a44
gh-143930: Tweak the exception message and increase test coverage (GH-146476) 2026-04-03 17:31:25 +02:00
Pieter Eendebak
48317feec8
gh-146640: Optimize int operations by mutating uniquely-referenced operands in place (JIT only) (GH-146641) 2026-04-03 23:23:04 +08:00
Stan Ulbrych
80ab6d958a
gh-125895: Fix static asset location for sphinx-notfound-page (#147984) 2026-04-03 16:19:30 +01:00
Pablo Galindo Salgado
edab6860a7
gh-148022: Add threat model to remote debugging docs (#148024)
The remote debugging protocol has been generating spurious
vulnerability reports from automated scanners that pattern-match
on "remote access" and "memory operations" without understanding
the privilege model. This section documents the security boundaries
so reporters can self-triage before submitting.

The threat model clarifies three points: attaching requires the
same OS-level privileges as GDB (ptrace, task_for_pid, or
SeDebugPrivilege), crashes caused by reading corrupted target
process memory are not security issues, and a compromised target
process is out of scope. A subsection explains when operators
should use PYTHON_DISABLE_REMOTE_DEBUG for defence-in-depth.
2026-04-03 14:20:50 +00:00
Jakub Kulík
3908593039
test_copy_dir_no_read_permission requires non root user (GH-148028)
This fixes a bug introduced in commit 86b8617747
(GH-146195).
2026-04-03 10:47:59 +02:00
Miikka Koskinen
f3b74d6269
gh-80642: timeit - make target time of autorange configurable (#140283)
Co-authored-by: Alessandro Cucci <alessandro.cucci@gmail.com>
Co-authored-by: blurb-it[bot] <blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-04-03 06:47:21 +00:00
Neil Schemenauer
9d087d6d41
GH-147985: Use lock-free lookup in PySet_Contains (#147986)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-04-03 12:04:06 +05:30
Tadej Magajna
617f4cc1c2
gh-142533: Document CRLF injection vulnerabilities in http.server doc (#143395)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-02 23:26:21 +02:00