Commit graph

131777 commits

Author SHA1 Message Date
Miss Islington (bot)
68abb378af
[3.15] gh-152434: Fix async-aware Gecko collection (GH-152442) (#152450)
gh-152434: Fix async-aware Gecko collection (GH-152442)
(cherry picked from commit 87ac0bc66a)

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
2026-06-27 18:00:28 +00:00
Pablo Galindo Salgado
65fbec64f6
[3.15] gh-151613: Fix remote debugging frame cache ABA (#152448)
gh-151613: Fix remote debugging frame cache ABA (#151614)

The remote debugging frame cache previously used only the last_profiled_frame address as its cache anchor. If a frame returned and a later frame reused the same _PyInterpreterFrame address, the profiler could accept a stale cache entry and splice parent frames from a different call chain into the current stack.

This adds a last_profiled_frame_seq counter next to last_profiled_frame, increments it when the anchor advances, stores it in frame cache entries, and validates cache hits against both the frame address and the sequence. Cache miss walks now copy stack chunks before storing new cache entries so stored continuations come from a stable snapshot. The new regression test exercises alternating call chains and checks that cached stacks never contain frames from both branches.

(cherry picked from commit 8cda6ae2f1)
2026-06-27 17:42:31 +00:00
Miss Islington (bot)
5d0fa7a5c4
[3.15] gh-145306: Fix browser open after empty export (GH-150017) (#152447)
gh-145306: Fix browser open after empty export (GH-150017)
(cherry picked from commit 860f8a5add)

Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
2026-06-27 17:36:38 +00:00
Miss Islington (bot)
61bb57fa3f
[3.15] gh-152434: Block --async-aware with --binary (GH-152444) (#152446)
gh-152434: Block --async-aware with --binary (GH-152444)

The binary writer does not currently handle AwaitedInfo samples and
crashes when running in --async-aware mode.
(cherry picked from commit 876c06cab9)

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
2026-06-27 17:24:53 +00:00
Miss Islington (bot)
e88d41685b
[3.15] gh-151029: Fix sys.remote_exec() unable to find writable memory when libpython replaced on disk (GH-151032) (#152443)
gh-151029: Fix sys.remote_exec() unable to find writable memory when libpython replaced on disk (GH-151032)
(cherry picked from commit a69d0fc41e)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2026-06-27 16:49:40 +00:00
Miss Islington (bot)
3206fc74fb
[3.15] gh-152391: Improve test_interpreters.test_stress test (GH-152396) (#152427)
gh-152391: Improve `test_interpreters.test_stress` test (GH-152396)
(cherry picked from commit 219f7a9453)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-27 15:37:40 +00:00
Miss Islington (bot)
bfb01d8a0c
[3.15] gh-152305: Fix _pydatetime.time.strftime() raising on year directives (GH-152306) (#152425)
(cherry picked from commit 5733361fdd)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-27 15:36:31 +00:00
Miss Islington (bot)
592575ca7a
[3.15] gh-151126: Sets missing exceptions in tkinter and socket modules initializations (GH-152418) (#152420)
gh-151126: Sets missing exceptions in `tkinter` and `socket` modules initializations (GH-152418)
(cherry picked from commit a9fa856014)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-27 15:28:27 +00:00
Miss Islington (bot)
2c7e8908cd
[3.15] gh-152402: Use support.nomemtest in test_pyexpat (GH-152403) (#152411)
gh-152402: Use `support.nomemtest` in `test_pyexpat` (GH-152403)
(cherry picked from commit 109c59e25f)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-27 13:58:20 +00:00
Miss Islington (bot)
400c7eca4a
[3.15] Docs: Fix incomplete sentence in tp_itemsize documentation (GH-152381) (GH-152417)
(cherry picked from commit 0a21a248cc)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2026-06-27 13:52:57 +00:00
Miss Islington (bot)
01cab1119e
[3.15] gh-70273: Document default class bindings in tkinter (GH-152389) (GH-152393)
Note in the Bindings and events section that every widget inherits Tk
class bindings for its standard behavior, where they are documented, and
how to suppress an unwanted one by returning "break" from a callback.
(cherry picked from commit 4fd69ef97a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 11:47:07 +00:00
Miss Islington (bot)
d0a23186f0
[3.15] gh-82830: Improve tkinter messagebox docstrings and cursor documentation (GH-152380) (GH-152386)
Document Windows cursor files (gh-99089).
(cherry picked from commit ea7f64a65c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 11:30:15 +00:00
Miss Islington (bot)
cab3bb8e30
[3.15] gh-152212: Reject a POSIX TZ footer with a missing std offset in pure-Python zoneinfo (GH-152213) (#152379)
(cherry picked from commit 93454fe0da)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2026-06-27 09:45:43 +00:00
Miss Islington (bot)
d3eea1be60
[3.15] gh-71880: Allow editing the last cell in curses.textpad.Textbox (GH-152363) (GH-152364)
Textbox.edit() ignored typing in the lower-right cell of the window.  It is
now written with insch(), which fills the cell without moving the cursor out
of the window (addch() there raises an error and scrolls a scrollable window).
(cherry picked from commit 11b394381f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 07:50:59 +00:00
Miss Islington (bot)
fbf61fbd4d
[3.15] gh-151678: Add more tests for tkinter.dnd (GH-152362) (GH-152367)
Cover the drag cursor, the Motion and ButtonRelease bindings, switching
between targets, the target search up the master chain, dnd_accept()
returning None, and restarting after a drag has finished.
(cherry picked from commit 389e00f13f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 07:41:21 +00:00
Miss Islington (bot)
029016654e
[3.15] gh-38464: Make tkinter nametowidget() work with cloned menus (GH-152336) (GH-152349)
Map the auto-generated name of a cloned menu (a menu used as a menubar
or a cascade) back to the original widget instead of raising KeyError.
(cherry picked from commit 5c3555bdc5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 23:31:46 +00:00
Miss Islington (bot)
90528ec040
[3.15] gh-88758: Handle non-tkinter widgets in tkinter focus methods (GH-152337) (GH-152346)
focus_get(), focus_displayof(), focus_lastfor() and winfo_containing()
now return None instead of raising KeyError when the focused widget was
not created by tkinter (for example a torn-off menu).
(cherry picked from commit 5fed5ce85d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 23:30:32 +00:00
Miss Islington (bot)
ba4084fa17
[3.15] IDLE: fix dedent() usage in htest (GH-152256) (#152342)
IDLE: fix dedent() usage in htest (GH-152256)

Fix typos: in GH-112642, initial string concatenation quotes were left when switching to textwrap.dedent().
(cherry picked from commit 74272d4f0b)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2026-06-26 23:13:47 +00:00
Miss Islington (bot)
d19b93a6fc
[3.15] gh-98894: Skip test_dtrace when building without dtrace (GH-152239) (#152300)
gh-98894: Skip test_dtrace when building without dtrace (GH-152239)
(cherry picked from commit 671357691f)

Co-authored-by: stratakis <cstratak@redhat.com>
2026-06-26 22:59:17 +02:00
Miss Islington (bot)
2a3189ce67
[3.15] gh-80937: Fix memory leak in tkinter createcommand (GH-152294) (GH-152327)
A command created with createcommand() held a strong reference to the
interpreter, forming an uncollectable cycle (interpreter -> command ->
interpreter) that kept the interpreter and the callback alive until the
command was removed with deletecommand() or destroy().  The command now
borrows the reference; it cannot outlive the interpreter, which deletes its
commands when finalized.
(cherry picked from commit bbf7786a90)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 19:22:21 +00:00
Donghee Na
073b658dd3
[3.15] gh-152235: Defer GC tracking in set.union and set.difference (gh-152290) (gh-152316)
(cherry picked from commit 5a549e82b8)
2026-06-26 17:54:25 +00:00
Miss Islington (bot)
52bdfcc141
[3.15] gh-139145: Fix tkinter event loop in interactive mode (GH-152257) (GH-152291)
When a Tcl command running its own event loop (such as vwait or
wait_variable) was active and the user typed input on stdin, the event
loop kept spinning at 100% CPU.  The stdin file handler is now removed as
soon as input becomes available.

Also fix gh-139816: an exception raised in a callback no longer stops the
event loop to wait for Enter on a Python built without readline; pending
callbacks keep running until input is actually available on stdin.
(cherry picked from commit 3ffda34f5c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: mdehoon <mjldehoon@yahoo.com>
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 18:00:56 +03:00
Victor Stinner
f2402cba9d
[3.15] gh-121249: Soft deprecate F and D struct format types (#149346) (#152274)
gh-121249: Soft deprecate F and D struct format types (#149346)

Remove F/D type codes from table in the struct module documentation.


(cherry picked from commit 5f17434a1e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-06-26 16:26:52 +02:00
Miss Islington (bot)
f3e6bdafd2
[3.15] gh-152052: Fix misleading json error for \uXXXX escape at the end of input (GH-152053) (#152283)
(cherry picked from commit 588be7af08)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-26 14:15:21 +00:00
Miss Islington (bot)
a89de4b230
[3.15] gh-152236: Fix skips on _testcapi.set_nomemory tests (GH-152253) (#152281)
gh-152236: Fix skips on `_testcapi.set_nomemory` tests (GH-152253)
(cherry picked from commit 1cbe460eb6)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-26 14:03:29 +00:00
Miss Islington (bot)
7ed673718b
[3.15] gh-152235: Defer GC tracking in more set operations (gh-152273) (gh-152278)
gh-152235: Defer GC tracking in more set operations (gh-152273)
(cherry picked from commit a87d24a69d)

Co-authored-by: Donghee Na <donghee.na@python.org>
2026-06-26 14:02:58 +00:00
Miss Islington (bot)
c48673b4b6
[3.15] gh-151722: Defer GC tracking in frozendict.copy() (GH-152230) (#152271)
gh-151722: Defer GC tracking in frozendict.copy() (GH-152230)

Fix _PyDict_Or() and frozendict.copy(): only track the frozendict by
the GC once the dictionary is fully initialized.

Functions modifying frozendict now ensures that the object is not
tracked by the GC (in debug mode).

* can_modify_dict() checks that _PyObject_GC_IS_TRACKED() is false
  for frozendicts.
* dict_merge_api() makes sure that the dictionary is tracked by the
  GC.
(cherry picked from commit 05679f3576)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-26 12:26:17 +00:00
Miss Islington (bot)
62842c9ff5
[3.15] gh-152156: Fix a crash in interpeters.create under limited memory conditions (GH-152163) (#152269)
gh-152156: Fix a crash in `interpeters.create` under limited memory conditions (GH-152163)
(cherry picked from commit 3ad66bf10d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-26 12:11:14 +00:00
Miss Islington (bot)
41f5b920e4
[3.15] gh-152246: Fix pure-Python zoneinfo accepting invalid seperators in POSIX TZ rules (GH-152247) (#152265)
(cherry picked from commit f47acc7f09)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-26 12:08:15 +00:00
Miss Islington (bot)
b7a41375ff
[3.15] gh-152235: Defer GC tracking of set and frozenset to end of construction (gh-152237) (gh-152242)
gh-152235: Defer GC tracking of set and frozenset to end of construction (gh-152237)
(cherry picked from commit 908f438e19)

Co-authored-by: Donghee Na <donghee.na@python.org>
2026-06-26 03:49:15 +00:00
Miss Islington (bot)
30f9c8a3ef
[3.15] gh-151722: Do not track the frozendict in the GC in _PyDict_FromKeys() (GH-152067) (#152225)
gh-151722: Do not track the frozendict in the GC in _PyDict_FromKeys() (GH-152067)

_PyDict_FromKeys() now creates a frozendict copy which is
not tracked by the GC.

dict_merge() no longer requires the dictionary to be tracked by the
GC.
(cherry picked from commit 55bc3126e0)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2026-06-25 20:48:52 +02:00
Miss Islington (bot)
59e54f5ce9
[3.15] gh-151929: Add pythoninfo commands to Platforms/WASI (GH-152136) (#152222)
gh-151929: Add pythoninfo commands to Platforms/WASI (GH-152136)

The "build" command now also runs "pythoninfo-build" and
"pythoninfo-host" commands.

If no subcommand is provided, display the help.

GitHub Action "WASI":

* Add "pythoninfo-build" and "pythoninfo-host" commands.
* Remove unused and outdated CROSS_BUILD_PYTHON environment variable.
(cherry picked from commit 7c8163719c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-25 17:22:24 +00:00
Miss Islington (bot)
25c7b0c4c8
[3.15] gh-151929: Add pythoninfo-build command to Platforms/emscripten (GH-152210) (#152217)
gh-151929: Add pythoninfo-build command to Platforms/emscripten (GH-152210)

* Add also "pythoninfo-host" command.
* Add pythoninfo to the "build" command.
(cherry picked from commit 7676427cd8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-25 16:51:32 +00:00
Miss Islington (bot)
eaf4d73112
[3.15] gh-148825: Fix build error if specialization is disabled (GH-148826) (#152206)
gh-148825: Fix build error if specialization is disabled (GH-148826)
(cherry picked from commit 56ae0b8e4f)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2026-06-25 14:36:04 +00:00
Miss Islington (bot)
0222238e3a
[3.15] Don't require _testcapi for test_code (GH-152185) (#152202)
(cherry picked from commit 11c241e1a8)

Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-25 14:02:49 +00:00
Miss Islington (bot)
06e6515e36
[3.15] gh-152168: Don't skip test_bigmem if _testcapi is missing (GH-152171) (#152198)
(cherry picked from commit 6a82832a0b)

Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
2026-06-25 13:58:50 +00:00
Miss Islington (bot)
1926cf3dc9
[3.15] gh-151929: Get uptime on BSD/macOS in pythoninfo (GH-152189) (#152196)
gh-151929: Get uptime on BSD/macOS in pythoninfo (GH-152189)

* Check sysctlbyname() function and sys/sysctl.h header in
  configure.
* Add _testcapi.uptime_bsd() function.
(cherry picked from commit b6d89edc4a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-25 13:41:18 +00:00
Miss Islington (bot)
a53c6ca143
[3.15] gh-127802: Schedule removal of legacy tkinter variable trace methods in 3.17 (GH-152012) (GH-152186)
The tkinter.Variable methods trace_variable(), trace(), trace_vdelete()
and trace_vinfo(), deprecated since Python 3.14, are now scheduled for
removal in Python 3.17.
(cherry picked from commit deeae2ac07)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 12:34:47 +00:00
Victor Stinner
ae4c2c126b
[3.15] gh-151929: Get machine ID and uptime on Windows in pythoninfo (#152146) (#152187)
gh-151929: Get machine ID and uptime on Windows in pythoninfo (#152146)

* Replace "linux." prefix with "system." in pythoninfo.
* Add _winapi.GetTickCount64() function.

(cherry picked from commit f9910519af)
2026-06-25 12:34:16 +00:00
Miss Islington (bot)
1deffc37fd
[3.15] gh-151678: Add tests for ttk Menubutton and OptionMenu widget options (GH-151960) (GH-151963)
Decorate ttk.MenubuttonTest with add_configure_tests() and make
ttk.OptionMenuTest inherit it to cover the standard widget options.
(cherry picked from commit ce147129c1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-25 15:10:18 +03:00
Miss Islington (bot)
d6fd5378e3
[3.15] gh-151126: Add missing PyErr_NoMemory in _winapi.c (GH-151588) (#152182)
gh-151126: Add missing `PyErr_NoMemory` in `_winapi.c` (GH-151588)
(cherry picked from commit a580029f11)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-25 11:15:27 +00:00
Miss Islington (bot)
06506197c9
[3.15] gh-151126: Fix missing memory errors in _interpretersmodule.c (GH-151624) (#152169)
gh-151126: Fix missing memory errors in `_interpretersmodule.c` (GH-151624)
(cherry picked from commit 05225aa06a)

Co-authored-by: stevens <lipengyu@kylinos.cn>
2026-06-25 10:35:45 +00:00
Miss Islington (bot)
93ff7c31af
[3.15] gh-151126: Fix missing PyErr_NoMemory in testinternalcapi.c (GH-152177) (#152179)
gh-151126: Fix missing `PyErr_NoMemory` in `testinternalcapi.c` (GH-152177)
(cherry picked from commit a0093282ea)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-25 13:19:48 +03:00
Miss Islington (bot)
cf8051b2e7
[3.15] gh-152079: Fix _datetime.fromisoformat() mishandling a sub-second tz offset (GH-152087) (#152174)
(cherry picked from commit 6f9c76d8d8)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-25 09:41:48 +00:00
Miss Islington (bot)
703c9bf976
[3.15] gh-151763: Fix crash in _interpqueues.create on MemoryError (GH-152131) (#152158)
gh-151763: Fix crash in `_interpqueues.create` on `MemoryError` (GH-152131)
(cherry picked from commit a6c2d4ae3b)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-25 07:32:24 +00:00
Miss Islington (bot)
7d5e2dd398
[3.15] gh-151929: Get boot ID, machine ID and uptime in test.pythoninfo (GH-152127) (#152134)
gh-151929: Get boot ID, machine ID and uptime in test.pythoninfo (GH-152127)
(cherry picked from commit 3db3bba4d1)


GHA: Run test.pythoninfo on the "Cross build Linux" job.

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-25 00:00:32 +00:00
Miss Islington (bot)
ab8434a3dc
[3.15] gh-105895: Add match and case doc to help() (GH-152113) (#152126)
gh-105895: Add `match` and `case` doc to `help()` (GH-152113)
(cherry picked from commit 1d55b3778c)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: dzherb <zherbin.dima@yandex.ru>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-24 22:02:21 +00:00
Serhiy Storchaka
2d5187116b
[3.15] gh-86726: Improve the structure of the tkinter reference (GH-152109 (GH-152111)
Add short group intros before each cluster of Misc methods.
Group the Tk and Toplevel classes in a new "Toplevel widgets" section, move
the Tcl() function to the module-level functions, and move the "File
handlers" section into the reference.
(cherry picked from commit c7faa6936e)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 21:41:27 +03:00
Miss Islington (bot)
14d23fddd9
[3.15] Re-raise unexpected exceptions instead of swallowing them in various tests (GH-152019) (#152102)
(cherry picked from commit 6c3da17d1f)

Co-authored-by: An Long <aisk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-24 16:53:16 +00:00
Miss Islington (bot)
4e7843ea3e
[3.15] gh-151763: Fix NULL dereference in os._path_normpath() under OOM (GH-151779) (#152096)
(cherry picked from commit ce8b81fff4)

Co-authored-by: Zain Nadeem <zainnadeemzainnadeem80@gmail.com>
2026-06-24 16:25:28 +00:00