Commit graph

131691 commits

Author SHA1 Message Date
Miss Islington (bot)
a2d2ee8e9e
[3.15] RTD Previews: Get correct base branch for backports (GH-150690) (#151867)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-21 18:14:04 +00:00
Miss Islington (bot)
f5119a536a
[3.15] gh-151845: Fix formatfloat() return-value contract in unicode_format.c (GH-151846) (#151865)
gh-151845: Fix formatfloat() return-value contract in unicode_format.c (GH-151846)

Fix formatfloat() return-value contract in unicode_format.c
(cherry picked from commit c2661e6189)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-06-21 17:43:01 +00:00
Miss Islington (bot)
f43f4384cc
[3.15] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) (GH-151802)
Drive the modal query dialogs with generated events to exercise the
<Return> and <Escape> key bindings and the value validation: accepting
an integer, float or string, cancelling, rejecting a non-numeric value
and rejecting a value outside the allowed range.
(cherry picked from commit 706238e764)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:54:36 +00:00
Miss Islington (bot)
aa83ca3ec8
[3.15] gh-86726: Document tkinter.simpledialog query options and Dialog.result (GH-151851) (GH-151852)
(cherry picked from commit 8270ae560c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-21 18:10:43 +03:00
Miss Islington (bot)
37aa97330d
[3.15] gh-150831: docs: clarify generator, generator function, and generator iterator in glossary (GH-150905) (#151840)
gh-150831: docs: clarify generator, generator function, and generator iterator in glossary (GH-150905)
(cherry picked from commit 1de86e1492)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
2026-06-21 07:35:52 -04:00
Miss Islington (bot)
45a0043971
[3.15] gh-151770: Fix datetime.fromisoformat() on an out-of-range month w/ a 24:00 time (GH-151771) (#151809)
(cherry picked from commit 1fb874cc07)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-06-20 17:01:40 +00:00
Miss Islington (bot)
ba8548ca82
[3.15] gh-151678: Add tests for tkinter widget virtual events (GH-151793) (GH-151805)
Verify the virtual events that widgets emit in response to user
interaction, driven by generated events: <<ListboxSelect>> (Listbox),
<<Increment>> and <<Decrement>> (ttk Spinbox), and <<TreeviewSelect>>,
<<TreeviewOpen>> and <<TreeviewClose>> (ttk Treeview).
(cherry picked from commit e51b616eff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 15:00:38 +00:00
Miss Islington (bot)
86cdbd8e44
[3.15] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods (GH-151782) (GH-151799)
Cover Misc.wait_variable and wait_window, tk_focusFollowsMouse,
selection_handle, the error paths of grab_set_global, send, the
X11-specific Wm methods iconposition, iconmask, iconwindow,
colormapwindows and manage/forget, and the Text.window_config alias and
deprecated yview_pickplace.
(cherry picked from commit aa71eb287f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 14:12:08 +00:00
Miss Islington (bot)
70d495aab0
[3.15] gh-151678: Add tests for tkinter.filedialog (GH-151781) (GH-151795)
Exercise the native dialogs (Open, SaveAs and Directory) through the
_test_callback seam without opening them, and test the pure-Python
FileDialog selection, filter and ok/cancel logic without entering its
modal loop.
(cherry picked from commit 58fd9ec3cf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 13:49:16 +00:00
Miss Islington (bot)
3618730de3
[3.15] gh-151678: Add tests for tkinter.dnd (GH-151780) (GH-151790)
Drive the drag-and-drop protocol (dnd_start and the DndHandler enter/
motion/commit, leave/cancel and end callbacks).
(cherry picked from commit 2a126a534b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 13:37:55 +00:00
Miss Islington (bot)
88f79419a8
[3.15] gh-151678: Add tests for tkinter.scrolledtext (GH-151753) (GH-151759)
Add a test for the ScrolledText widget, which had no tests: that it is
a Text widget held in a Frame with a Scrollbar, that Text methods work,
that the geometry manager methods are redirected to the frame while
configure is not, and that the scrollbar tracks the text view.
(cherry picked from commit a9db5cb52f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 09:17:52 +03:00
Miss Islington (bot)
b83a217558
[3.15] gh-150836: Mount embedded Tk ZIP in _tkinter on Windows (GH-151735)
Tcl/Tk 9 may embed the Tk script library in the Tk DLL on Windows. This embedded library is not found by Tcl by default.

Mount the loaded Tk DLL as a zipfs archive before calling Tk_Init(), so Tk can find its embedded tk_library using its existing library discovery logic.

Preserve Tk_Init()'s normal path if the library is not embedded.
(cherry picked from commit c4eb3adbb4)

Co-authored-by: Jonathan J. Helmus <jjhelmus@gmail.com>
2026-06-19 18:31:12 -05:00
Miss Islington (bot)
a30acf2495
[3.15] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) (GH-151754)
* font: copy(), the config alias, the displayof argument of measure and
  metrics, and the errors raised for invalid options and a wrong number
  of arguments;
* image: the cget method and the config alias, and the errors raised by
  transparency_get and transparency_set;
* variable: that initialize is an alias of set and the deprecated trace
  is an alias of trace_variable;
* Misc: tk_focusNext, tk_focusPrev, tk_strictMotif, tk_bisque and
  option_readfile;
* Wm: wm_iconphoto.
(cherry picked from commit 66cc048551)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 23:12:25 +00:00
Miss Islington (bot)
ba0cae13ce
[3.15] gh-151678: Add tests for tkinter.ttk methods (GH-151736) (GH-151741)
Cover previously-untested ttk methods:

* Progressbar.step, start and stop;
* Treeview.parent, next, prev, see and identify_element;
* Style.theme_settings;
* OptionMenu.set_menu.
(cherry picked from commit 7d4a0aad7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 16:12:13 +00:00
Miss Islington (bot)
81ceb56629
[3.15] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH-151732) (GH-151737)
Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid
classes:

* a new WinfoTest class for the winfo_* query methods (class, name,
  parent, children, toplevel, visual and screen information, atoms,
  pointer and screen coordinates, fpixels, containing, interps,
  viewable), including the pre-existing winfo_rgb and winfo_pathname;
* in MiscTest: getint, getdouble, getvar, register, deletecommand,
  option_add/get/clear, nametowidget, the focus_*, grab_* and
  selection_own* methods, event_add/delete/info, and bell;
* in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid,
  positionfrom/sizefrom, focusmodel, iconname, client/command,
  overrideredirect, state (with withdraw and deiconify), frame, group,
  protocol and transient;
* the short-named aliases of the grid_*, pack_* and place_* geometry
  manager methods.
(cherry picked from commit 23793ac211)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 18:06:42 +03:00
Miss Islington (bot)
80d7626c74
[3.15] gh-150902: Optimize PyCriticalSection2 to skip locking the same locks held by the current CS2 (gh-151554)
This mimics an optimization already present for the single-mutex critical section.
(cherry picked from commit c2ca7724af)

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
2026-06-19 09:52:07 -04:00
Miss Islington (bot)
b010116e26
[3.15] gh-151693: Make the curses tests portable to other curses implementations (GH-151729) (GH-151733)
Make the curses tests portable to other curses implementations

Guard the chgat() check (chgat() needs wchgat()) and stop assuming a
subpad shares the parent pad's cells (implementation-defined in X/Open).
(cherry picked from commit 64fab74bd7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 12:37:43 +00:00
Miss Islington (bot)
d81cc86341
[3.15] gh-151693: Add curses tests for panels, textpad, and window behavior (GH-151694) (GH-151719)
Add curses tests for panels, textpad, and window behavior

Extend test_curses with behavior-verifying tests that go beyond the
existing smoke tests:

* curses.panel stacking: new_panel/top/bottom/above/below ordering,
  hide/show/hidden, move, replace and userptr round-trip.
* Real-window curses.textpad.Textbox: gather(), edit(), stripspaces,
  insert mode and the Emacs-like editing commands (previously only
  exercised through a MagicMock).
* Window output: addstr cursor advance and addnstr truncation,
  insstr/insnstr shifting without cursor movement, and pad behavior
  (instr, subpad cell sharing, the required 6-argument refresh()).
* Error handling: out-of-range coordinates raising curses.error and
  bad character/string argument types.
(cherry picked from commit b4cfb992ed)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 12:01:54 +00:00
Miss Islington (bot)
13529d43c9
[3.15] gh-151678: Add tests for the remaining tkinter widgets (GH-151687) (GH-151725)
Cover previously-untested methods of several widgets:

* Button, Checkbutton and Radiobutton: invoke, flash and toggle;
* Entry: delete, icursor and the select_* aliases;
* Spinbox: invoke, identify and scan;
* Scale and Scrollbar: identify, and Scrollbar fraction and delta;
* PanedWindow: panes, remove/forget, sash and proxy positioning,
  identify, and adding panes with configuration options.

Also test that invoke does nothing for a disabled button and the
errors raised for invalid indices, coordinates, option names and values.
(cherry picked from commit 93b9e7666f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:52:05 +00:00
Miss Islington (bot)
be26b8d67f
[3.15] gh-151678: Add tests for tkinter.Canvas (GH-151683) (GH-151716)
Cover previously-untested Canvas methods in CanvasTest:

* item creation and types, bbox, coordinate conversion, move/scale,
  find and addtag queries, tags, item configuration, stacking order,
  text-item editing, selection, focus, scan and postscript;
* the create_arc, create_oval, create_bitmap, create_image,
  create_text and create_window item creation methods, checking
  coordinates, default and explicit options, valid enumerations and
  rejection of invalid values;
* tag_bind() and tag_unbind(), checking the returned function id and
  binding script, querying bound sequences, the add parameter, event
  delivery to items via a tag, and removal of a single binding by id
  or all bindings for a sequence.
(cherry picked from commit bb127c5a96)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 10:47:36 +00:00
Miss Islington (bot)
81e9c08518
[3.15] gh-151678: Add tests for tkinter.Text (GH-151681) (GH-151702)
Cover previously-untested Text methods (indices, content, marks, tags,
undo/redo, dump, embedded images and windows, peers, and geometry) and
the tag, embedded-image and embedded-window configuration options.
(cherry picked from commit 4ac809e10b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 10:41:03 +00:00
Miss Islington (bot)
1495415cb4
[3.15] gh-151678: Add tests for tkinter.Listbox (GH-151686) (GH-151712)
Cover previously-untested Listbox methods in ListboxTest: size, delete,
index resolution, nearest, see, activate, and the selection methods
(selection_set/clear/includes/anchor and their select_* aliases),
including the errors raised for invalid indices.
(cherry picked from commit cf3b3c1148)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 09:30:55 +00:00
Miss Islington (bot)
cfe461944d
[3.15] gh-151678: Add tests for tkinter.Menu (GH-151685) (GH-151709)
Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.
(cherry picked from commit ef5c32a40b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 09:28:03 +00:00
Miss Islington (bot)
2c09c0ed29
[3.15] gh-141510 Add frozendict fast paths to abstract.c (GH-150692) (#151704)
gh-141510 Add frozendict fast paths to abstract.c (GH-150692)

Add frozendict to the fast paths of PyMapping_GetOptionalItem(),
PyMapping_Keys(), PyMapping_Values(), and PyMapping_Items().
(cherry picked from commit a5568d0eb7)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-06-19 09:08:08 +00:00
Miss Islington (bot)
022a018b5b
[3.15] gh-151695: Fix use-after-free of the curses screen encoding (GH-151696) (GH-151703)
The module-global curses_screen_encoding stored a borrowed pointer to the
encoding owned by the window returned by the first initscr() call.  That
window can be deallocated while unctrl() and ungetch(), which have no window
of their own, still use the pointer to encode non-ASCII characters.

Keep a private copy of the encoding instead.
(cherry picked from commit 551f8e16f8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 09:07:51 +00:00
Miss Islington (bot)
7e368380f8
[3.15] gh-141510 Document and test frozendict class matching behaviour (GH-150799) (#151701)
gh-141510 Document and test frozendict class matching behaviour (GH-150799)

Frozendict has `_Py_TPFLAGS_MATCH_SELF` set so works correctly
with the single-arg class matching. However it isn't documented
in the list of classes this works with and it isn't tested.

The test is some way below the other similar tests but anything
else would need a large renumbering.
(cherry picked from commit fd53ae1139)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2026-06-19 08:45:02 +00:00
Miss Islington (bot)
40fa04e6cc
[3.15] gh-151229: Add CI to prevent JIT stress test regression (GH-151647) (gh-151670) 2026-06-19 08:37:50 +00:00
Miss Islington (bot)
3135ab811d
[3.15] gh-151436: Fix missing tstate->last_profiled_frame updates (GH-151437) (#151612)
gh-151436: Fix missing `tstate->last_profiled_frame` updates (GH-151437)
(cherry picked from commit a8d74c062f)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
2026-06-19 10:24:53 +02:00
Miss Islington (bot)
7a5f5f5b6e
[3.15] gh-151427: add 'not macOS' and 'not iOS' restrictions on availability state of some functions in os module. (GH-151537) (#151699)
(cherry picked from commit da69fcf98d)
Co-authored-by: Duprat <yduprat@gmail.com>
2026-06-19 08:18:49 +00:00
Miss Islington (bot)
3b38caf2fe
[3.15] gh-101100: Document os.uname_result and os.statvfs_result with related constants (GH-151301) (GH-151692)
(cherry picked from commit 9688d252d3)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-06-19 10:34:16 +03:00
Miss Islington (bot)
fd3c510827
[3.15] gh-146353: Document PyBytesWriter_GetData pointer validity (GH-151418) (GH-151664)
gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418)
(cherry picked from commit e99b319682)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2026-06-18 17:39:20 +00:00
Miss Islington (bot)
cafe39f78a
[3.15] gh-86726: Add few missing versionadded directives (GH-151662) (GH-151663)
Pack.pack_content, Place.place_content and Grid.grid_content were
added in 3.15.
(cherry picked from commit bfecfcc2a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 15:56:14 +00:00
Miss Islington (bot)
821e97b999
[3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH-151655) (GH-151658)
It returns a sys.version_info-like named tuple, not a string.
(cherry picked from commit 3cd02a1c2d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 14:44:51 +00:00
Miss Islington (bot)
0125168a81
[3.15] gh-86726: Fix "deprecated" directive for wm_attributes (GH-151652) (GH-151654)
(cherry picked from commit d47c27e47a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 13:44:12 +00:00
Miss Islington (bot)
82b757071e
[3.15] gh-86726: Document the full public API of tkinter (GH-151579) (GH-151649)
Replace the previously sparse reference documentation with full coverage of
the public API of the tkinter package, written from the Tcl/Tk manual pages,
the existing documentation and the module docstrings.

* Doc/library/tkinter.rst gains a "Reference" section documenting every public
  class, method, function and constant of the core module -- the widgets, the
  Misc, Wm, Pack, Place, Grid, XView and YView mix-ins, the Variable and image
  classes, the module-level functions and the symbolic constants.
* Doc/library/tkinter.ttk.rst, dialog.rst, tkinter.font.rst and the other
  module pages document their remaining classes, methods and functions.

The descriptions are Python-oriented (correct return types -- tuples rather
than Tcl lists, booleans, integers, None on cancellation, and so on) and were
checked against the Tcl/Tk 9.1 manual pages and the implementation.

versionadded, versionchanged and deprecated directives are added for the
public API, determined from the git history relative to Python 3.0: the
tkinter.ttk module (3.1); the Text, Wm, Menu and Misc methods exposing Tk 8.5
features (3.3); and the many later additions and behavior changes up to 3.15.
The Tk version required by features added after Tk 8.6 is noted as well.  The
bundled Tcl/Tk version is updated to 9.0 and the manual-page links point at
the tcl9.0 reference.

--------
(cherry picked from commit 8b270b72a2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-06-18 12:47:36 +00:00
Miss Islington (bot)
c0582dbe7f
[3.15] gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609) (gh-151648)
gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609)
(cherry picked from commit 3fa92e7c55)

Co-authored-by: Donghee Na <donghee.na@python.org>
2026-06-18 12:45:25 +00:00
Miss Islington (bot)
d9a1bff40b
[3.15] gh-151623: Add missing curses docstrings and document intrflush() (GH-151632) (GH-151641)
(cherry picked from commit 12add3822f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 14:23:06 +03:00
Miss Islington (bot)
7170c951a1
[3.15] gh-151623: Improve curses documentation style (GH-151635) (#151636)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-06-18 12:57:03 +03:00
Miss Islington (bot)
7aa41c406b
[3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)
Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
(cherry picked from commit 65afcdd8df)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-06-18 08:48:56 +00:00
Miss Islington (bot)
e9c7cc1f0b
[3.15] gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252) (GH-151606)
gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252)

The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.

Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
(cherry picked from commit 16185e9fe2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-06-18 10:17:15 +02:00
Miss Islington (bot)
8fe5897853
[3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610)
gh-151510: Fix __lazy_import__ without frame (GH-151511)
(cherry picked from commit eff805b7a7)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-06-17 18:40:33 +00:00
Miss Islington (bot)
6d29a08d15
[3.15] gh-120665: make unittest loaders avoid loading test cases that are abstract base classes (GH-120666) (#151601)
gh-120665: make unittest loaders avoid loading test cases that are abstract base classes (GH-120666)
(cherry picked from commit 5ad3c6dfbf)

Co-authored-by: blhsing <blhsing@gmail.com>
2026-06-17 11:47:27 -04:00
Miss Islington (bot)
a86de0bc23
[3.15] gh-151544: Fixes CVE-2026-12003 by removing the fallback to %VPATH%/Modules/Setup.local for discovering sources in getpath.py (GH-151545)
(cherry picked from commit 9e863fab28)

Co-authored-by: Steve Dower <steve.dower@python.org>
2026-06-17 16:42:35 +01:00
Miss Islington (bot)
1e7fb93df7
[3.15] gh-150966: Fix live profiling error tests (GH-151020) (#151604)
gh-150966: Fix live profiling error tests (GH-151020)
(cherry picked from commit 6b142ab9a0)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2026-06-17 16:58:42 +02:00
Miss Islington (bot)
821e5d79fa
[3.15] gh-151584: Remove PyUnstable_Module_SetGIL call in _remote_debugging (GH-151585) (#151603)
gh-151584: Remove `PyUnstable_Module_SetGIL` call in `_remote_debugging` (GH-151585)
(cherry picked from commit a173a6d65b)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-06-17 14:10:31 +00:00
Miss Islington (bot)
2a5ed22923
[3.15] gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594) (#151597)
gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594)

Use a timeout of 15 minutes for --tsan command and a timeout of 10
minutes for --tsan-parallel command. Display also the slowest tests
to help adjusting these timeouts later if needed.
(cherry picked from commit 460dec2651)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-17 11:28:42 +00:00
Miss Islington (bot)
d7e7d85609
[3.15] gh-151496: Use process groups in test_dtrace (GH-151512) (#151589)
gh-151496: Use process groups in test_dtrace (GH-151512)

Create a new process group to run bpftrace commands, so it's possible
to kill also child processes on timeout.
(cherry picked from commit a064b323f4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-17 09:28:34 +00:00
Victor Stinner
a5c5edddbc
[3.15] gh-151546: Fix stack limits on musl (#151548) (#151583)
gh-151546: Fix stack limits on musl (#151548)

If the thread stack size is set by linker flags, pass the stack size
to Python/ceval.c via the new _Py_LINKER_THREAD_STACK_SIZE variable
to set Py_C_STACK_SIZE macro.

(cherry picked from commit 9a61d1c0c8)
2026-06-17 11:13:40 +02:00
Miss Islington (bot)
ff6e973c3b
[3.15] gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402) (#151552)
gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402)

PyConfig_Set() and sys.set_int_max_str_digits() now replace
sys.flags (create a new object), instead of modifying sys.flags in-place.

Modifying sys.flags in-place can lead to data races when multiple
threads are reading or writing sys.flags in parallel.

Use _Py_atomic functions to get and set max_str_digits members.
(cherry picked from commit b16d23fc9f)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-06-16 16:48:56 +00:00
Miss Islington (bot)
19bf6a3fa1
[3.15] gh-151519: Check effective gid in _test_all_chown_common group-0 guard (GH-151521) (#151549)
gh-151519: Check effective gid in `_test_all_chown_common` group-0 guard (GH-151521)

The guard that skips the "chown to gid 0 should fail" assertion used
only `os.getgroups()` (supplementary groups). The kernel also accepts
the effective/filesystem gid for chown, so when a process runs with
egid 0 and a non-zero uid (common in containers and user namespaces),
chown(-1, 0) succeeds and the assertion spuriously fails.

Add an `os.getegid() != 0` check alongside the existing
`0 not in os.getgroups()` guard.
(cherry picked from commit 2ce260033b)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2026-06-16 09:42:24 -07:00