Commit graph

131327 commits

Author SHA1 Message Date
Manoj K M
4e97ff3351
Fix minor typos in unicode.rst (#149587) 2026-05-09 21:31:55 +00:00
Max Schmitt
7241f2739c
gh-149388: Make asyncio PipeHandle.close idempotent (#149518) 2026-05-09 19:44:29 +05:30
László Kiss Kollár
9587726a3e
gh-149430: Fix edge-cases in profiling.sampling outputs (#149431)
The line highlights on the heatmap are driven by the URL hash and the
`:target` selector. When clicking a caller/callee link for the line that
was already selected, the hash doesn't change, so the browser keeps the
existing target state and doesn't restart the animation. Due to this the
highlight only works the first time.

With this fix, line navigation goes through JavaScript. If the target
URL already points to the current location, the highlight is replayed by
clearing the animation, forcing style recalculation, and restoring it.

The `baseline_self` variable isn't initialized for structural elided
roots. This variable is accessed later unconditionally and leads to a
crash.

The child process ends up being invoked with `--diff_flamegraph` instead
of the correct argument.
2026-05-09 14:05:46 +01:00
sobolevn
46a2c11eaa
gh-149530: Remove symtable.Class.get_methods deprecated method (#149531) 2026-05-09 08:33:09 +00:00
sobolevn
bc8cf07d8d
gh-149083: Convert _initial_missing for pure py reduce to sentinel (#149536) 2026-05-09 10:55:09 +03:00
Maurycy Pawłowski-Wieroński
354ef336e4
gh-149474: use Py_fopen in Binary{Reader,Writer} for audit hook and path-like support (#149524) 2026-05-09 01:01:35 +01:00
Jeff Lyon
45c47d26c2
gh-149496: Fix MacOSTest.test_default regression when BROWSER env var is set (GH-149579)
gh-149496: Fix MacOSTest.test_default failing when BROWSER env var is set

MacOSTest.test_default calls webbrowser.get() and asserts it returns a
MacOS instance. When BROWSER is set in the environment (e.g. BROWSER=open,
a common macOS workaround for the old osascript-based implementation),
register_standard_browsers() registers a GenericBrowser as the preferred
browser instead, causing the assertion to fail.

This is a regression introduced in gh-137586, which added MacOSTest and
moved test_default into it from MacOSXOSAScriptTest. MacOSXOSAScriptTest
had an identical setUp() guard added in gh-131254 specifically to fix this
same failure. The guard was not carried over to MacOSTest.

Add setUp() to MacOSTest to unset BROWSER for the duration of each test,
restoring the isolation that was already established as the correct pattern
for macOS webbrowser tests.
2026-05-08 20:33:05 +00:00
Serhiy Storchaka
57ef219950
gh-79638: Test other HTTP error codes besides 403 in test_robotparser (#149569)
Also, use urllib.request.urlcleanup() in NetworkTestCase.
2026-05-08 20:24:34 +00:00
sobolevn
3a62c8f13a
gh-149537: Remove kw parameters from python version of reduce (#149538) 2026-05-08 18:34:48 +03:00
Diego Russo
ebf6d9c3e2
Rename fp unwind test module to C stack unwind (#149563) 2026-05-08 14:58:38 +01:00
Diego Russo
2a8cece95c
Skip GNU backtrace test on Arm 32-bit (#149493) 2026-05-08 14:03:05 +01:00
Petr Viktorin
578411982c
gh-149486: tarfile.data_filter: validate written link target (GH-149487)
The data filter rewrote linknames with normpath() but ran the
containment check against the un-normalised value, and computed a
symlink's directory before stripping trailing slashes.  Both let a
crafted archive create links pointing outside the destination.  Also
reject link members that resolve to the destination directory itself,
which could otherwise replace it with a symlink and redirect all
subsequent members.

(Patch by Greg; Petr's just reviewing & merging.)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-08 14:16:06 +02:00
Diego Russo
2f6b3800e6
Add Diego as author of PEP 831 (#149551) 2026-05-08 12:58:48 +01:00
Hai Zhu
c341e341b2
gh-149459: Fix segfault when _LOAD_SPECIAL guard deoptimizes (#149478) 2026-05-08 11:20:27 +00:00
Neko Asakura
d2d24e46d3
gh-100239: expose sq_repeat helpers for BINARY_OP_EXTEND (#148791) 2026-05-08 11:12:20 +00:00
Malcolm Smith
52a05e8da7
gh-145176: Update CODEOWNERS for Emscripten migration to Platforms directory (#149544) 2026-05-08 14:08:07 +03:00
Nathan Goldbaum
3565d31690
docs: Clarify docs for error case of PyDict_GetItemRef (#149506) 2026-05-08 10:53:44 +00:00
Malcolm Smith
5b58fbc07c
gh-146445: Update CODEOWNERS for Android and iOS migration to Platforms directory (#149543) 2026-05-08 13:32:36 +03:00
Maurycy Pawłowski-Wieroński
d36e5b8644
gh-149521: Do not update last_profiled_frame if it's not changed (#149522) 2026-05-08 08:25:49 +00:00
sobolevn
4ae1a260c7
gh-149528: Remove annotationlib.ForwardRef._evaluate for 3.16 (#149529) 2026-05-08 07:48:15 +03:00
Neko Asakura
49918f5b0c
gh-149481: skip FOR_ITER inline specialization for Python __next__ (#149491)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-07 23:02:04 +00:00
Brett Cannon
b142878db1
Improve error messages when the WASI SDK can't be found (GH-149508) 2026-05-07 17:20:35 -05:00
Hugo van Kemenade
f0daba1652
gh-106693: Revert "Explicitly mark ob_sval as unsigned char to avoid UB (#106826)" (#149514) 2026-05-07 23:39:08 +03:00
Serhiy Storchaka
310fe88994
gh-79638: Treat an unreachable robots.txt as "disallow all" (GH-138555)
Disallow all access in urllib.robotparser if the robots.txt file is
unreachable due to server or network errors.
2026-05-07 22:06:57 +03:00
Pablo Galindo Salgado
fbba343622
gh-106693: Explicitly mark ob_sval as unsigned char to avoid UB (#106826)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2026-05-07 22:06:53 +03:00
Stan Ulbrych
9d07159cda
gh-149499: Fixes for 3.16 bump (GH-149500)
Also fixes gh-149507, regenerating `configure` for 3.16.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-05-07 19:06:37 +00:00
Hugo van Kemenade
f5c75351de Python 3.16.0a0 2026-05-07 19:05:52 +03:00
Hugo van Kemenade
f31a89bb90 Python 3.15.0b1 2026-05-07 16:26:31 +03:00
Diego Russo
299cf3c497
gh-126910: Update 3.15 what's new to include GDB/backtrace integration (#149494)
Update 3.15 what's new to include GDB/backtrace intergration
2026-05-07 16:05:29 +03:00
Neil Schemenauer
13188dbf85
gh-148937: revert process RSS based GC deferral (#149475) 2026-05-07 14:32:14 +03:00
Victor Stinner
b3cfd36ba4
gh-149202: Don't use -fno-omit-frame-pointer on ppc64le (#149485)
The power ABI specification requires that compilers maintain a back
chain by default, so unwinding already works without a dedicated
frame pointer. Don't use -fno-omit-frame-pointer on ppc64le.
2026-05-07 11:47:08 +02:00
Petr Viktorin
612140e7dd
gh-149202: Fix frame pointer unwinding on ppc64le and armv7/clang (#149409)
- ppc64's backchain format is also different from x86
- On 32-bit ARM, clang needs `-mno-thumb`, not `-marm` like GCC
2026-05-07 10:37:00 +02:00
Ned Deily
5fcab14c35
gh-142295: Update macOS framework build Info.plist files. (#149479)
For Python macOS framework builds, update all Info.plist files to be more
compliant with current Apple guidelines. Original patch contributed by
Martinus Verburg.
2026-05-06 23:52:23 -04:00
Martinus Verburg
65ed109b5d
gh-142295: Update CFBundleShortVersionString in Mac framework Info.plist (#143064)
Updated macOS framework Info.plist to use x.y.z format for CFBundleShortVersionString to comply with Apple guidelines. Patch contributed by Martinus Verburg.
2026-05-06 23:07:17 -04:00
Peter Bierma
2b7c28a440
gh-149101: Implement PEP 788 (GH-149116)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2026-05-06 17:39:30 -04:00
Ned Batchelder
b2582a6cf2
Update Doc/pylock.toml (#149467)
update Doc/pylock.toml
2026-05-06 16:05:30 -04:00
Jelle Zijlstra
ff422bd1c1
gh-141560: Add annotation_format parameter to getfullargspec (#149457) 2026-05-06 12:00:56 -07:00
David Ellis
8cad740557
gh-148823: Avoid importing _colorize when creating an ArgumentParser (#148827)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-05-06 18:24:18 +00:00
Alexis Dauphin
947c8ea3bc
gh-148599: Update WSA socket error codes (#148033) 2026-05-06 19:52:23 +02:00
Hugo van Kemenade
9514dd750c
gh-133879: Copyedit "What's new in Python 3.15" (#149451) 2026-05-06 20:33:08 +03:00
Hugo van Kemenade
7cea70e14d
gh-144384: Lazily import _colorize (#149318) 2026-05-06 16:07:43 +00:00
Zachary Ware
d13fc36f73
gh-124111: Only set TCLSH_NATIVE for AMD64/ARM64 (GH-149443)
The Tcl 9 makefile.vc now uses TCLSH_NATIVE during the build process,
not just the installation.  We had been setting it to the installed
location of the x86 tclsh.exe, which does not yet exist when the x86
build process needs it.  That build doesn't actually need TCLSH_NATIVE,
though (there's a check specifically allowing TCLSH to be used if
MACHINE is IX86 and TCLSH_NATIVE is undefined), so don't set it.
2026-05-06 11:04:42 -05:00
Zachary Ware
1dcc546d84
Rewrite RTD configuration to use build.jobs rather than build.commands (GH-149429)
As part of this conversion, we now ensure that we're comparing against the
merge-base of the PR branch and the base branch when checking whether an RTD
build is worthwhile, deepening the history of the base branch by up to 500
commits if necessary.  If the merge-base can't be found or there are merge
conflicts with the head of the base branch, the build is skipped since it would
give a warped perception of the actual changes anyway.

This unfortunately does nothing about RTD preview comments comparing against
the wrong base, other than skipping builds that shouldn't produce any diff at
all thus avoiding the comment.

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2026-05-06 10:44:47 -05:00
Pablo Galindo Salgado
4ed40146f1
gh-149202: Fix frame pointer unwinding on s390x and ARM (GH-149362)
-fno-omit-frame-pointer is not enough to make every target walkable by the
simple manual frame pointer unwinder.

The helper used by test_frame_pointer_unwind used to assume the frame pointer
named a two-word record where fp[0] was the previous frame pointer and fp[1]
was the return address. That is only the generic layout used by some targets.
This patch keeps that default, but moves the slots behind named offsets so
architecture-specific layouts can describe where the backchain and return
address really live.

On s390x, GCC and Clang do not emit a usable backchain unless -mbackchain is
enabled. Without it, the unwinder stops at the current C frame and the test
reports no Python frames. Once backchains are present, the helper must also
stop at the current thread's known C stack bounds; otherwise it can follow the
final backchain far enough to dereference an invalid frame and segfault.
For Linux s390x backchain frames, the documented z/Architecture stack-frame
layout saves r14, the return-address register, at byte offset 112 from the
frame pointer, so read the return address from that named slot instead of fp[1].

The 112-byte offset comes from Linux's s390 debugging documentation: its Stack
Frame Layout table shows z/Architecture backchain frames with the backchain at
offset 0 and saved r14 of the caller function at offset 112:
https://www.kernel.org/doc/html/v5.3/s390/debugging390.html#stack-frame-layout

This helper remains scoped to Linux s390x backchain frames. GNU SFrame's s390x
notes state that the s390x ELF ABI does not generally mandate where RA and FP
are saved, or whether they are saved at all:
https://sourceware.org/binutils/docs/sframe-spec.html#s390x

As Jens Remus noted, -fno-omit-frame-pointer is not needed when -mbackchain is
present.

On 32-bit ARM, GCC defaults to Thumb mode on common armhf toolchains. The Thumb
prologue keeps the saved frame pointer and link register at offsets that depend
on the generated frame, which breaks the fp[0]/fp[1] walk used by the helper.
Use -marm when it is supported for frame-pointer builds, and teach the helper
the GCC ARM-mode slots where the previous frame pointer is at fp[-1] and the
saved LR return address is at fp[0].


Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:03:37 +00:00
Alex Malyshev
646853df13
gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() (#148145)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:01:12 +00:00
Bénédikt Tran
7b6c248d61
gh-142307: deprecate legacy support for altering IMAP4.file (#142335)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-06 17:41:26 +03:00
Serhiy Storchaka
a5c7a74418
gh-139489: Add xml.is_valid_text() (GH-149412) 2026-05-06 14:40:10 +00:00
Victor Stinner
9274d969f3
gh-148675: Optimize arraydescr structure: use char[3] (GH-149455)
Replace "const char *typecode;" with "char typecode[3];" to make the
arraydescr structure smaller and avoids an indirection.
2026-05-06 16:28:11 +02:00
Jeff Lyon
aeb02ac42b
gh-137586: Replace 'osascript' with 'open' on macOS in webbrowser (#146439)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-06 16:56:17 +03:00
Daniele Parmeggiani
1bdfc0f253
gh-146270: Fix PyMember_SetOne(..., NULL) not being atomic (gh-148800)
Fixes a sequential consistency bug whereby two threads that are deleting a struct member may observe both their deletions to be successful.
2026-05-06 09:50:24 -04:00