]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
9 days ago[3.15] RTD Previews: Get correct base branch for backports (GH-150690) (#151867)
Miss Islington (bot) [Sun, 21 Jun 2026 18:14:04 +0000 (20:14 +0200)] 
[3.15] RTD Previews: Get correct base branch for backports (GH-150690) (#151867)

Co-authored-by: Stan Ulbrych <stan@python.org>
9 days ago[3.15] gh-151845: Fix formatfloat() return-value contract in unicode_format.c (GH...
Miss Islington (bot) [Sun, 21 Jun 2026 17:43:01 +0000 (19:43 +0200)] 
[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 c2661e6189ab2833bf32fa723cc427e64c026839)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
9 days ago[3.15] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) (GH...
Miss Islington (bot) [Sun, 21 Jun 2026 16:54:36 +0000 (18:54 +0200)] 
[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 706238e764169dd36f918a0541adf9687cc3f296)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
9 days ago[3.15] gh-86726: Document tkinter.simpledialog query options and Dialog.result (GH...
Miss Islington (bot) [Sun, 21 Jun 2026 15:10:43 +0000 (17:10 +0200)] 
[3.15] gh-86726: Document tkinter.simpledialog query options and Dialog.result (GH-151851) (GH-151852)

(cherry picked from commit 8270ae560c632f2ee88ab6c6b33562227d0deaae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
9 days ago[3.15] gh-150831: docs: clarify generator, generator function, and generator iterator...
Miss Islington (bot) [Sun, 21 Jun 2026 11:35:52 +0000 (13:35 +0200)] 
[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 1de86e1492af92f4b18aad94390bcd4336e579ab)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
10 days ago[3.15] gh-151770: Fix `datetime.fromisoformat()` on an out-of-range month w/ a 24...
Miss Islington (bot) [Sat, 20 Jun 2026 17:01:40 +0000 (19:01 +0200)] 
[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 1fb874cc076e771c39a7bbc650dce386e3c5b7a0)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
10 days ago[3.15] gh-151678: Add tests for tkinter widget virtual events (GH-151793) (GH-151805)
Miss Islington (bot) [Sat, 20 Jun 2026 15:00:38 +0000 (17:00 +0200)] 
[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 e51b616efff845ea2a7d312aa43d5f5100064d88)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
10 days ago[3.15] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods ...
Miss Islington (bot) [Sat, 20 Jun 2026 14:12:08 +0000 (16:12 +0200)] 
[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 aa71eb287f6d812e5270109acb9119c2ad0baef9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
10 days ago[3.15] gh-151678: Add tests for tkinter.filedialog (GH-151781) (GH-151795)
Miss Islington (bot) [Sat, 20 Jun 2026 13:49:16 +0000 (15:49 +0200)] 
[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 58fd9ec3cfe0d588db97eb98c0dc7fdb0256be76)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
10 days ago[3.15] gh-151678: Add tests for tkinter.dnd (GH-151780) (GH-151790)
Miss Islington (bot) [Sat, 20 Jun 2026 13:37:55 +0000 (15:37 +0200)] 
[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 2a126a534b0253cf65fb6d06da0cce72eb2eaa23)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
10 days ago[3.15] gh-151678: Add tests for tkinter.scrolledtext (GH-151753) (GH-151759)
Miss Islington (bot) [Sat, 20 Jun 2026 06:17:52 +0000 (08:17 +0200)] 
[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 a9db5cb52fefffc8fcdddc8e1c5f23222970825a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
10 days ago[3.15] gh-150836: Mount embedded Tk ZIP in _tkinter on Windows (GH-151735)
Miss Islington (bot) [Fri, 19 Jun 2026 23:31:12 +0000 (01:31 +0200)] 
[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 c4eb3adbb42d781e2ad35bee5621f1c621c6767b)

Co-authored-by: Jonathan J. Helmus <jjhelmus@gmail.com>
10 days ago[3.15] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods...
Miss Islington (bot) [Fri, 19 Jun 2026 23:12:25 +0000 (01:12 +0200)] 
[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 66cc04855100c3865bd01adfe92a3a02dbc3a914)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter.ttk methods (GH-151736) (GH-151741)
Miss Islington (bot) [Fri, 19 Jun 2026 16:12:13 +0000 (18:12 +0200)] 
[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 7d4a0aad7be3cfb367b8977a03a64e754577d5f0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH...
Miss Islington (bot) [Fri, 19 Jun 2026 15:06:42 +0000 (17:06 +0200)] 
[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 23793ac211371415eaf9491fef031f121969dfb3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-150902: Optimize PyCriticalSection2 to skip locking the same locks held...
Miss Islington (bot) [Fri, 19 Jun 2026 13:52:07 +0000 (15:52 +0200)] 
[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 c2ca7724af94df6e078a4b2e86d1be8c410d9940)

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
11 days ago[3.15] gh-151693: Make the curses tests portable to other curses implementations...
Miss Islington (bot) [Fri, 19 Jun 2026 12:37:43 +0000 (14:37 +0200)] 
[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 64fab74bd7288bfa67cd7727452febdaafed4270)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151693: Add curses tests for panels, textpad, and window behavior (GH-15169...
Miss Islington (bot) [Fri, 19 Jun 2026 12:01:54 +0000 (14:01 +0200)] 
[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 b4cfb992ed3a28b8cd626f70e3550ac8dbec1758)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for the remaining tkinter widgets (GH-151687) (GH-151725)
Miss Islington (bot) [Fri, 19 Jun 2026 11:52:05 +0000 (13:52 +0200)] 
[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 93b9e7666f4337e3cacfed6993568e4bec575e9b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter.Canvas (GH-151683) (GH-151716)
Miss Islington (bot) [Fri, 19 Jun 2026 10:47:36 +0000 (12:47 +0200)] 
[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 bb127c5a96a285f1f6b11261c1f0dc2b3c7f70ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter.Text (GH-151681) (GH-151702)
Miss Islington (bot) [Fri, 19 Jun 2026 10:41:03 +0000 (12:41 +0200)] 
[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 4ac809e10bdb413d7dd8c7bab7e365b2b618ad91)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter.Listbox (GH-151686) (GH-151712)
Miss Islington (bot) [Fri, 19 Jun 2026 09:30:55 +0000 (11:30 +0200)] 
[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 cf3b3c11485a870d8e8c02579bed27a316838eb1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter.Menu (GH-151685) (GH-151709)
Miss Islington (bot) [Fri, 19 Jun 2026 09:28:03 +0000 (11:28 +0200)] 
[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 ef5c32a40be50a33a9b7ac39ee64e6893bc22f60)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-141510 Add frozendict fast paths to abstract.c (GH-150692) (#151704)
Miss Islington (bot) [Fri, 19 Jun 2026 09:08:08 +0000 (11:08 +0200)] 
[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 a5568d0eb70f8ffbfc7815b58e24170787615931)

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>
11 days ago[3.15] gh-151695: Fix use-after-free of the curses screen encoding (GH-151696) (GH...
Miss Islington (bot) [Fri, 19 Jun 2026 09:07:51 +0000 (11:07 +0200)] 
[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 551f8e16f8bb38a1e9c6df259a2a0969493de070)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-141510 Document and test frozendict class matching behaviour (GH-150799...
Miss Islington (bot) [Fri, 19 Jun 2026 08:45:02 +0000 (10:45 +0200)] 
[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 fd53ae113911e5a7d83c04b08623df824f9d5d70)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
11 days ago[3.15] gh-151229: Add CI to prevent JIT stress test regression (GH-151647) (gh-151670)
Miss Islington (bot) [Fri, 19 Jun 2026 08:37:50 +0000 (10:37 +0200)] 
[3.15] gh-151229: Add CI to prevent JIT stress test regression (GH-151647) (gh-151670)

11 days ago[3.15] gh-151436: Fix missing `tstate->last_profiled_frame` updates (GH-151437) ...
Miss Islington (bot) [Fri, 19 Jun 2026 08:24:53 +0000 (10:24 +0200)] 
[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 a8d74c062fe3c5cb2962dde8bee83704fcfa1bc9)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
11 days ago[3.15] gh-151427: add 'not macOS' and 'not iOS' restrictions on availability state...
Miss Islington (bot) [Fri, 19 Jun 2026 08:18:49 +0000 (10:18 +0200)] 
[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 da69fcf98de500b1e10bdce41a05c904e345d89f)
Co-authored-by: Duprat <yduprat@gmail.com>
11 days ago[3.15] gh-101100: Document os.uname_result and os.statvfs_result with related constan...
Miss Islington (bot) [Fri, 19 Jun 2026 07:34:16 +0000 (09:34 +0200)] 
[3.15] gh-101100: Document os.uname_result and os.statvfs_result with related constants (GH-151301) (GH-151692)

(cherry picked from commit 9688d252d330b0b586760a121ee8c8f7215176e8)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
12 days ago[3.15] gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418) ...
Miss Islington (bot) [Thu, 18 Jun 2026 17:39:20 +0000 (19:39 +0200)] 
[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 e99b319682fe984074e32f52354dbec23ded4d0a)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
12 days ago[3.15] gh-86726: Add few missing versionadded directives (GH-151662) (GH-151663)
Miss Islington (bot) [Thu, 18 Jun 2026 15:56:14 +0000 (17:56 +0200)] 
[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 bfecfcc2a860071c8e5022ac512bde94e0fb5f76)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH...
Miss Islington (bot) [Thu, 18 Jun 2026 14:44:51 +0000 (16:44 +0200)] 
[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 3cd02a1c2da023974464fd1155982a16474f331b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 days ago[3.15] gh-86726: Fix "deprecated" directive for wm_attributes (GH-151652) (GH-151654)
Miss Islington (bot) [Thu, 18 Jun 2026 13:44:12 +0000 (15:44 +0200)] 
[3.15] gh-86726: Fix "deprecated" directive for wm_attributes (GH-151652) (GH-151654)

(cherry picked from commit d47c27e47a6c6969737616f2f58036a5f536e60a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-86726: Document the full public API of tkinter (GH-151579) (GH-151649)
Miss Islington (bot) [Thu, 18 Jun 2026 12:47:36 +0000 (14:47 +0200)] 
[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 8b270b72a2d20bf4b7fb457141cd68a38808f7d9)

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>
12 days ago[3.15] gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609) (gh-151648)
Miss Islington (bot) [Thu, 18 Jun 2026 12:45:25 +0000 (14:45 +0200)] 
[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 3fa92e7c55d74aea062c4b32d895e84d7aaa3bce)

Co-authored-by: Donghee Na <donghee.na@python.org>
12 days ago[3.15] gh-151623: Add missing curses docstrings and document intrflush() (GH-151632...
Miss Islington (bot) [Thu, 18 Jun 2026 11:23:06 +0000 (13:23 +0200)] 
[3.15] gh-151623: Add missing curses docstrings and document intrflush() (GH-151632) (GH-151641)

(cherry picked from commit 12add3822f458a3e107dff4176b4c4b991764ea7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-151623: Improve curses documentation style (GH-151635) (#151636)
Miss Islington (bot) [Thu, 18 Jun 2026 09:57:03 +0000 (11:57 +0200)] 
[3.15] gh-151623: Improve curses documentation style (GH-151635) (#151636)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 days ago[3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)
Miss Islington (bot) [Thu, 18 Jun 2026 08:48:56 +0000 (10:48 +0200)] 
[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 65afcdd8dfb3621ac696fce076e6282c76a04b2b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases ...
Miss Islington (bot) [Thu, 18 Jun 2026 08:17:15 +0000 (10:17 +0200)] 
[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 16185e9fe2037d2171626f79c3d099bd7772b53e)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
13 days ago[3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610)
Miss Islington (bot) [Wed, 17 Jun 2026 18:40:33 +0000 (20:40 +0200)] 
[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 eff805b7a7a9678639bbcebe804864406cc4eab2)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
13 days ago[3.15] gh-120665: make unittest loaders avoid loading test cases that are abstract...
Miss Islington (bot) [Wed, 17 Jun 2026 15:47:27 +0000 (17:47 +0200)] 
[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 5ad3c6dfbfe60a7f232e9604866c77ced24c4bfe)

Co-authored-by: blhsing <blhsing@gmail.com>
13 days ago[3.15] gh-151544: Fixes CVE-2026-12003 by removing the fallback to %VPATH%/Modules...
Miss Islington (bot) [Wed, 17 Jun 2026 15:42:35 +0000 (17:42 +0200)] 
[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 9e863fab283eddca9c2a8f9d1ee30f4dc243e314)

Co-authored-by: Steve Dower <steve.dower@python.org>
13 days ago[3.15] gh-150966: Fix live profiling error tests (GH-151020) (#151604)
Miss Islington (bot) [Wed, 17 Jun 2026 14:58:42 +0000 (16:58 +0200)] 
[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 6b142ab9a0007d37c68c74f81e2c8638330003e2)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
13 days ago[3.15] gh-151584: Remove `PyUnstable_Module_SetGIL` call in `_remote_debugging` ...
Miss Islington (bot) [Wed, 17 Jun 2026 14:10:31 +0000 (16:10 +0200)] 
[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 a173a6d65ba0eb77776ca4f7f1cb277877a43f9b)

Co-authored-by: sobolevn <mail@sobolevn.me>
13 days ago[3.15] gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594) (#151597)
Miss Islington (bot) [Wed, 17 Jun 2026 11:28:42 +0000 (13:28 +0200)] 
[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 460dec26518df5aa262ded5a2ee4e94b8854b569)

Co-authored-by: Victor Stinner <vstinner@python.org>
13 days ago[3.15] gh-151496: Use process groups in test_dtrace (GH-151512) (#151589)
Miss Islington (bot) [Wed, 17 Jun 2026 09:28:34 +0000 (11:28 +0200)] 
[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 a064b323f4350305e7486c7b1090cf12b19e7738)

Co-authored-by: Victor Stinner <vstinner@python.org>
13 days ago[3.15] gh-151546: Fix stack limits on musl (#151548) (#151583)
Victor Stinner [Wed, 17 Jun 2026 09:13:40 +0000 (11:13 +0200)] 
[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 9a61d1c0c8ebe21277c0a84abf6000049540464f)

2 weeks ago[3.15] gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402) (#151552)
Miss Islington (bot) [Tue, 16 Jun 2026 16:48:56 +0000 (18:48 +0200)] 
[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 b16d23fc9fe9cb72fa15c8a3036753e5437b5b8c)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks ago[3.15] gh-151519: Check effective gid in `_test_all_chown_common` group-0 guard ...
Miss Islington (bot) [Tue, 16 Jun 2026 16:42:24 +0000 (18:42 +0200)] 
[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 2ce260033b457a0ad2c9767a1d9902bef5a30b0e)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2 weeks ago[3.15] gh-150771: Fix email serialization for shift_jis and euc-jp (GH-151120) (GH...
Miss Islington (bot) [Tue, 16 Jun 2026 12:18:56 +0000 (14:18 +0200)] 
[3.15] gh-150771: Fix email serialization for shift_jis and euc-jp (GH-151120) (GH-151541)

Encode the payload with output_charset instead of input_charset.
(cherry picked from commit 0777a58d8012bbdd0d72654b56f9112686ae6ff0)

Co-authored-by: dev <b.chouksey27@gmail.com>
2 weeks ago[3.15] gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreter...
Miss Islington (bot) [Tue, 16 Jun 2026 11:52:39 +0000 (13:52 +0200)] 
[3.15] gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreters (GH-150053) (#151322)

Co-authored-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
2 weeks ago[3.15] gh-151522: Guard against None transport in slow-socket SSL test (GH-151523...
Miss Islington (bot) [Tue, 16 Jun 2026 05:54:42 +0000 (07:54 +0200)] 
[3.15] gh-151522: Guard against None transport in slow-socket SSL test (GH-151523) (#151528)

gh-151522: Guard against None transport in slow-socket SSL test (GH-151523)
(cherry picked from commit 11f032f904c8019b332a3c367f335e05cde63628)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2 weeks ago[3.15] gh-151422: Don't link libffi into _ctypes_test.so (GH-151423) (#151516)
Miss Islington (bot) [Mon, 15 Jun 2026 22:45:45 +0000 (00:45 +0200)] 
[3.15] gh-151422: Don't link libffi into _ctypes_test.so (GH-151423) (#151516)

_ctypes_test doesn't use libffi directly, and linking it into the module
causes emscripten tests to fail.
(cherry picked from commit 8646385076ea4f6ef08682d8ef07a544d3b4ef30)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2 weeks ago[3.15] gh-151223: fix tsan data races in load global specializations (GH-151393)...
Miss Islington (bot) [Mon, 15 Jun 2026 17:22:52 +0000 (19:22 +0200)] 
[3.15] gh-151223: fix tsan data races in load global specializations (GH-151393) (#151513)

gh-151223: fix tsan data races in load global specializations (GH-151393)
(cherry picked from commit e9d5280f6c040f859907eb3c04ec308f4918db9f)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] gh-148853: Catch PermissionError in test in_systemd_nspawn_sync_suppressed...
Miss Islington (bot) [Mon, 15 Jun 2026 14:55:27 +0000 (16:55 +0200)] 
[3.15] gh-148853: Catch PermissionError in test in_systemd_nspawn_sync_suppressed() (GH-148854) (#151506)

gh-148853: Catch PermissionError in test in_systemd_nspawn_sync_suppressed() (GH-148854)

/run/ on my FreeBSD install is not readable causing failing test.
(cherry picked from commit 35ce2e5f98c04cb8d1e442de5439d3151362e21b)

Co-authored-by: Nick Begg <nick@stunttruck.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks ago[3.15] Add `.toml` to `.editorconfig` (GH-151481) (#151491)
Miss Islington (bot) [Mon, 15 Jun 2026 09:42:09 +0000 (11:42 +0200)] 
[3.15] Add `.toml` to `.editorconfig` (GH-151481) (#151491)

Add `.toml` to `.editorconfig` (GH-151481)
(cherry picked from commit 7a70afa199a9bdd5bf65b2b396b9fa76c8842ac2)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-149671: Restore compatibility with setuptools -nspkg.pth files in site...
Miss Islington (bot) [Mon, 15 Jun 2026 09:01:30 +0000 (11:01 +0200)] 
[3.15] gh-149671: Restore compatibility with setuptools -nspkg.pth files in site module (GH-151319) (#151489)

gh-149671: Restore compatibility with setuptools -nspkg.pth files in site module (GH-151319)

Inject the "sitedir" variable in the frame which executes ".pth" code.
(cherry picked from commit 18f3ffec43b98db34c6d378cfc012814a901bb41)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH...
Miss Islington (bot) [Sun, 14 Jun 2026 18:37:23 +0000 (20:37 +0200)] 
[3.15] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460) (#151468)

Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460)

Since the recursion guard tracks real C-stack bounds (gh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (gh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
(cherry picked from commit e91f68ab40e25dc964afb872eb75873c8b1838d6)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 weeks ago[3.15] gh-151390: Colorize `match +` and `match -` in the REPL (GH-151391) (#151476)
Bartosz Sławecki [Sun, 14 Jun 2026 16:38:07 +0000 (18:38 +0200)] 
[3.15] gh-151390: Colorize `match +` and `match -` in the REPL (GH-151391) (#151476)

(cherry picked from commit a7007322c2a70b01e7c2a9e6b3f8f222d241c7d7)

2 weeks ago[3.15] gh-151461: Fix encoding-related exception handling in file tokenizer (GH-15146...
Miss Islington (bot) [Sun, 14 Jun 2026 12:58:37 +0000 (14:58 +0200)] 
[3.15] gh-151461: Fix encoding-related exception handling in file tokenizer (GH-151462) (GH-151470)

(cherry picked from commit f1a5f68e3761e010ccd4dda1342500c5ae40bbc4)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.15] gh-139837: Document attributes of objects recorded by warnings.catch_warnings...
Miss Islington (bot) [Sun, 14 Jun 2026 12:47:39 +0000 (14:47 +0200)] 
[3.15] gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893) (GH-151472)

(cherry picked from commit 47b7dc788c9bcf3d5ea69a2ea0aed3d5883647a8)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151424: Fix impossible stack traces in `RemoteUnwinder(..., cache_frames...
Miss Islington (bot) [Sat, 13 Jun 2026 23:40:19 +0000 (01:40 +0200)] 
[3.15] gh-151424: Fix impossible stack traces in `RemoteUnwinder(..., cache_frames=True)` by copying chunks on cache miss (GH-151426) (#151459)

gh-151424: Fix impossible stack traces in `RemoteUnwinder(..., cache_frames=True)` by copying chunks on cache miss (GH-151426)
(cherry picked from commit 6ce088e20a13ac25320d94c5775bb1a4edc75ba4)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
2 weeks ago[3.15] gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args...
Miss Islington (bot) [Sat, 13 Jun 2026 21:32:48 +0000 (23:32 +0200)] 
[3.15] gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args (GH-151404) (#151445)

gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args (GH-151404)

---------
(cherry picked from commit 6679ac07d881f6e0ce30b7cc28b5671eafa20d9d)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: tonghuaroot <23011166+tonghuaroot@users.noreply.github.com>
2 weeks ago[3.15] gh-151443: Fix documented default of `unittest.mock.mock_open`'s `read_data...
Miss Islington (bot) [Sat, 13 Jun 2026 18:39:44 +0000 (20:39 +0200)] 
[3.15] gh-151443: Fix documented default of  `unittest.mock.mock_open`'s `read_data` parameter (GH-151444) (#151450)

(cherry picked from commit 9ad6ba0324a71ae5b51ded6e59b1ea3b653814a5)

Co-authored-by: Shardul Deshpande <iamsharduld@users.noreply.github.com>
2 weeks ago[3.15] gh-77328: Update `base64` module RFC references to RFC 4648 (GH-151275) (...
Miss Islington (bot) [Sat, 13 Jun 2026 13:00:54 +0000 (15:00 +0200)] 
[3.15] gh-77328: Update `base64` module RFC references to RFC 4648 (GH-151275) (#151438)

(cherry picked from commit e9339876883f96af2e406a92a05be647b7fbe5d5)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception...
Miss Islington (bot) [Sat, 13 Jun 2026 09:06:55 +0000 (11:06 +0200)] 
[3.15] gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception among all failed futures (GH-101268) (#151430)

gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception among all failed futures (GH-101268)
(cherry picked from commit 3c00ebc2bbd902495b163def850bc931420209fc)

Co-authored-by: Daniel Shields <daniel.shields@twosigma.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 weeks ago[3.15] Docs: Fix method directive signatures in `enum` docs (GH-151429) (#151434)
Miss Islington (bot) [Sat, 13 Jun 2026 08:55:30 +0000 (10:55 +0200)] 
[3.15] Docs: Fix method directive signatures in `enum` docs (GH-151429) (#151434)

(cherry picked from commit 5b385197625e669473859c63bee6f14c983d2be6)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2 weeks ago[3.15] Fix typos in the `curses.ascii` module documentation (GH-129300) (#151413)
Miss Islington (bot) [Fri, 12 Jun 2026 16:11:06 +0000 (18:11 +0200)] 
[3.15] Fix typos in the `curses.ascii` module documentation (GH-129300) (#151413)

(cherry picked from commit f4f102027a9b0edc72a048f17b696aa92d2e6893)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] Docs: avoid repetitions of class references in functions.rst (GH-150891) ...
Miss Islington (bot) [Fri, 12 Jun 2026 15:01:30 +0000 (17:01 +0200)] 
[3.15] Docs: avoid repetitions of class references in functions.rst (GH-150891) (#151405)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2 weeks ago[3.15] gh-151284: Fix test_capi on UBSan (GH-151286) (#151323)
Miss Islington (bot) [Fri, 12 Jun 2026 13:10:41 +0000 (15:10 +0200)] 
[3.15] gh-151284: Fix test_capi on UBSan (GH-151286) (#151323)

gh-151284: Fix test_capi on UBSan (GH-151286)

Comment two checks relying on undefined behavior in
test_fromwidechar() of test_capi.

Enable test_capi in GitHub Action "Reusable Sanitizer".
(cherry picked from commit d87d77287392b78d36a06660228f6a5ca88888d7)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (GH-151382...
Miss Islington (bot) [Fri, 12 Jun 2026 11:31:51 +0000 (13:31 +0200)] 
[3.15] gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (GH-151382) (#151398)

gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (GH-151382)
(cherry picked from commit 6b217ea90b9cd694fded6308bc796e324bbacd19)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-151297: Fix undefined behavior in `_PyObject_MiRealloc` (GH-151358) (GH...
Miss Islington (bot) [Fri, 12 Jun 2026 01:47:01 +0000 (03:47 +0200)] 
[3.15] gh-151297: Fix undefined behavior in `_PyObject_MiRealloc` (GH-151358) (GH-151388)

The standard says that a call to `memcpy` must pass a valid source and
destination pointer even if the size is 0, so we must avoid calling
`memcpy` when our source pointer is NULL. If we don't, an optimizing
compiler can decide that the pointer must be non-NULL based on the
presence of UB, and optimize out checks for null pointers.

Specifically, note that the standard says:

    Where an argument declared as size_t n specifies the length of the
    array for a function, n can have the value zero on a call to that
    function. Unless explicitly stated otherwise in the description of
    a particular function in this subclause, pointer arguments on such
    a call shall still have valid values, as described in 7.1.4.

And section 7.1.4 says:

    If an argument to a function has an invalid value (such as a value
    outside the domain of the function, or a pointer outside the address
    space of the program, or a null pointer, or a pointer to
    non-modifiable storage when the corresponding parameter is not
    const-qualified) or a type (after default argument promotion) not
    expected by a function with a variable number of arguments, the
    behavior is undefined.

The specification for `memcpy` doesn't state that it's allowed to be
called with null pointers, and Linux's `/usr/include/string.h` declares
`memcpy` as `__nonnull ((1, 2))`.
(cherry picked from commit c37599200f688538efa34a49f262a9a4a899a953)

Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
2 weeks ago[3.15] gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066) (GH...
Miss Islington (bot) [Thu, 11 Jun 2026 22:39:37 +0000 (00:39 +0200)] 
[3.15] gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066) (GH-151383)

Applies https://github.com/microsoft/mimalloc/commit/d7a72c4912943e8aaf135e465ca5ea229ea96646 to our copy of mimalloc.
(cherry picked from commit 80f9467434cecbc4e97b853b3876de13e75aec38)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 weeks ago[3.15] gh-151337: Avoid possible memory leak in `_tkinter.c` on Windows. (GH-151340...
Miss Islington (bot) [Thu, 11 Jun 2026 20:25:05 +0000 (22:25 +0200)] 
[3.15] gh-151337: Avoid possible memory leak in `_tkinter.c` on Windows. (GH-151340) (GH-151379)

(cherry picked from commit 71805db4294de9495954571c82a835d94ba67594)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
2 weeks ago[3.15] gh-138991: Update dataclass documentation for new eq behavior in Python 3...
Miss Islington (bot) [Thu, 11 Jun 2026 17:45:30 +0000 (19:45 +0200)] 
[3.15] gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007) (#151372)

gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007)

And add tests.
(cherry picked from commit 402668b2b1a63a2b3cfd7a2ede07f6786f9beb8e)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-150285: Fix too long docstrings in GenericAlias and __class_getitem__ ...
Miss Islington (bot) [Thu, 11 Jun 2026 17:22:52 +0000 (19:22 +0200)] 
[3.15] gh-150285: Fix too long docstrings in GenericAlias and __class_getitem__ (GH-151354) (GH-151367)

(cherry picked from commit 65047f2e2fb80e4ad36df56a343d75963a20c110)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-151126: Fix missing memory error in `os._path_splitroot` (GH-151339) (...
Miss Islington (bot) [Thu, 11 Jun 2026 16:55:19 +0000 (18:55 +0200)] 
[3.15] gh-151126: Fix missing memory error in `os._path_splitroot` (GH-151339) (#151360)

gh-151126: Fix missing memory error in `os._path_splitroot` (GH-151339)
(cherry picked from commit 10595b1cb7ac04ba9a3ef3f7da4fa31c9966300d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-151228: fix data race on clearing embedded dict values (GH-151330) (#151359)
Miss Islington (bot) [Thu, 11 Jun 2026 16:34:26 +0000 (18:34 +0200)] 
[3.15] gh-151228: fix data race on clearing embedded dict values (GH-151330) (#151359)

gh-151228: fix data race on clearing embedded dict values (GH-151330)
(cherry picked from commit 6112d70abee2455bfa44a76a49a5a80472e21134)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] gh-101100: Fix Sphinx nitpick in `unittest.mock.rst` (GH-151302) (#151355)
Miss Islington (bot) [Thu, 11 Jun 2026 15:42:23 +0000 (17:42 +0200)] 
[3.15] gh-101100: Fix Sphinx nitpick in `unittest.mock.rst` (GH-151302) (#151355)

(cherry picked from commit b18168cb32d545ed976b760983478cbd5dde5bdf)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2 weeks ago[3.15] gh-151112: Fix crash in `compiler_mod()` when entering the current compilation...
Miss Islington (bot) [Thu, 11 Jun 2026 15:22:31 +0000 (17:22 +0200)] 
[3.15] gh-151112: Fix crash in `compiler_mod()` when entering the current compilation unit fails (GH-151234) (#151350)

(cherry picked from commit 937d89c4d9b7c5fda6730a1127db118d881d13cb)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-139588: Fix nondeterministic `make latex` doc build under parallel make...
Miss Islington (bot) [Thu, 11 Jun 2026 15:21:26 +0000 (17:21 +0200)] 
[3.15] gh-139588: Fix nondeterministic `make latex` doc build under parallel make (GH-151343) (#151352)

(cherry picked from commit b9bffc09a6e47959cb5c306040fd0bfd77ae2786)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2 weeks ago[3.15] gh-150397: Fix pyexpat bigmem test (GH-151329) (#151348)
Miss Islington (bot) [Thu, 11 Jun 2026 15:15:10 +0000 (17:15 +0200)] 
[3.15] gh-150397: Fix pyexpat bigmem test (GH-151329) (#151348)

gh-150397: Fix pyexpat bigmem test (GH-151329)

Add missing parameter (size).
(cherry picked from commit 0bbde07a0bbad3c79073fd133d6df70837e4cfee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-150285: Suppress showing the __getstate__() comment in the help for datacla...
Miss Islington (bot) [Thu, 11 Jun 2026 15:01:11 +0000 (17:01 +0200)] 
[3.15] gh-150285: Suppress showing the __getstate__() comment in the help for dataclasses (GH-151328) (GH-151331)

(cherry picked from commit 0066fd73a20950dc790d219f4e3cfb07e816df47)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-151238: Check for `_get_resized_exprs` failure in `_PyPegen_{joined,templat...
Miss Islington (bot) [Thu, 11 Jun 2026 14:58:13 +0000 (16:58 +0200)] 
[3.15] gh-151238: Check for `_get_resized_exprs` failure in `_PyPegen_{joined,template}_str` (GH-151259) (#151344)

(cherry picked from commit 4b44b1e1fd654f3a3fefb02ae7fb26456fe33dc3)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (GH-151260) (#151326)
Miss Islington (bot) [Thu, 11 Jun 2026 11:21:26 +0000 (13:21 +0200)] 
[3.15] gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (GH-151260) (#151326)

gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (GH-151260)

Return 0 if the object is not tracked by the GC.
(cherry picked from commit 72e7eddce6c7137cef06b6eba15641597919e3d4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151177: Fix race condition in `_testembed` (GH-151293) (GH-151312)
Miss Islington (bot) [Thu, 11 Jun 2026 10:10:55 +0000 (12:10 +0200)] 
[3.15] gh-151177: Fix race condition in `_testembed` (GH-151293) (GH-151312)

gh-151177: Fix race condition in `_testembed` (GH-151293)
(cherry picked from commit f9ffca39351b77197e4dc2775a0d1e4ad64bf0e5)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 weeks ago[3.15] gh-151112: Move an `assert` that may fail in `cfg_builder_check` (GH-151153...
Miss Islington (bot) [Thu, 11 Jun 2026 09:46:04 +0000 (11:46 +0200)] 
[3.15] gh-151112: Move an `assert` that may fail in `cfg_builder_check` (GH-151153) (#151313)

(cherry picked from commit 2d3381035df24fbf512d897daa19a1040f7af3fd)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] Drop historical `:author:`s from HOWTOs (GH-151091) (#151310)
Miss Islington (bot) [Thu, 11 Jun 2026 08:55:01 +0000 (10:55 +0200)] 
[3.15] Drop historical `:author:`s from HOWTOs (GH-151091) (#151310)

(cherry picked from commit 9620f69cd4cd0b3691bc9feb279ddf45f71a9e7d)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant...
Miss Islington (bot) [Thu, 11 Jun 2026 08:30:24 +0000 (10:30 +0200)] 
[3.15] gh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant __buffer__ (GH-151296) (GH-151304)

(cherry picked from commit 84a322aa1555df745a2c115df03bfb7a4ed8c594)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2 weeks ago[3.15] gh-136880: Add warning about PYTHONPATH (GH-151098) (GH-151299)
Miss Islington (bot) [Thu, 11 Jun 2026 06:38:03 +0000 (08:38 +0200)] 
[3.15] gh-136880: Add warning about PYTHONPATH (GH-151098) (GH-151299)

(cherry picked from commit 84630e2cb90ef334e41eb9bccd860b3b0a7ff51b)

2 weeks ago[3.15] gh-151278: Fix test_faulthandler on UBSan (GH-151279) (#151281)
Miss Islington (bot) [Wed, 10 Jun 2026 20:07:07 +0000 (22:07 +0200)] 
[3.15] gh-151278: Fix test_faulthandler on UBSan (GH-151279) (#151281)

gh-151278: Fix test_faulthandler on UBSan (GH-151279)

* Py_FatalError() no longer calls _PyFaulthandler_Fini() if it
  doesn't hold the GIL.
* Skip test_faulthandler tests raising signals if run with UBSan.
* Enable test_faulthandler in GitHub Action "Reusable Sanitizer".
(cherry picked from commit e60c42dc3f5a8dd9b10bc9a8a028ef2765469650)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failu...
Victor Stinner [Wed, 10 Jun 2026 20:03:27 +0000 (22:03 +0200)] 
[3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) (#151269)

gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250)

If "import encodings" fails at Python startup, dump the Python path
configuration to help users debugging their configuration. The
encodings module is the first module imported during Python startup.

(cherry picked from commit 7b6e98911e1485be13817f2aedbbfadb1c4ea876)

2 weeks ago[3.15] GHA: Display output when a sanitizer test fails (GH-151268) (#151272)
Miss Islington (bot) [Wed, 10 Jun 2026 17:37:52 +0000 (19:37 +0200)] 
[3.15] GHA: Display output when a sanitizer test fails (GH-151268) (#151272)

GHA: Display output when a sanitizer test fails (GH-151268)

Modify GitHub Action "Reusable Sanitizer" to display output when a
test fails: pass -W option.
(cherry picked from commit 3a8bebd86f36be05442fa2f3adcc83c2a4b00ef2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215)...
Miss Islington (bot) [Wed, 10 Jun 2026 16:48:10 +0000 (18:48 +0200)] 
[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215) (GH-151225)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2 weeks ago[3.15] gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239...
Miss Islington (bot) [Wed, 10 Jun 2026 16:26:38 +0000 (18:26 +0200)] 
[3.15] gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239) (#151265)

gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239)
(cherry picked from commit 9fd1a125bc0ebdc26eae684da6e48ef24ee23b34)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)
Miss Islington (bot) [Wed, 10 Jun 2026 16:04:48 +0000 (18:04 +0200)] 
[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)

(cherry picked from commit 7bbb9607a2e7d1f8a7de11ce02f0a2402d6e7262)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into...
Miss Islington (bot) [Wed, 10 Jun 2026 14:25:33 +0000 (16:25 +0200)] 
[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (GH-143987) (#151246)

gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (GH-143987)

Fix crashes in socket.sendmsg() and socket.recvmsg_into() that could
occur if buffer sequences are mutated re-entrantly during argument
parsing via __buffer__ protocol callbacks.

The bug occurs because:

1. PySequence_Fast() returns the original list object when the input
   is already a list (not a copy).
2. During iteration, PyObject_GetBuffer() triggers __buffer__
   callbacks which may clear the list.
3. Subsequent iterations access invalid memory (heap OOB read).

The fix replaces PySequence_Fast() with PySequence_Tuple() which
always creates a new tuple, ensuring the sequence cannot be mutated
during iteration.
(cherry picked from commit 896f7fdc7d0ba6d4ace06935b9d67c4da0f9ecbe)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: tonghuaroot <23011166+tonghuaroot@users.noreply.github.com>
2 weeks ago[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)
Miss Islington (bot) [Wed, 10 Jun 2026 14:11:26 +0000 (16:11 +0200)] 
[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)

add asyncio guide for Free-Threaded Python (GH-150456)
(cherry picked from commit e2bd50d2e1cfe474f3b1f88a3d2b7e26cfda1295)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] Add yet one assertion in test_set_text_charset_cp949 (GH-151224) (GH-151237)
Miss Islington (bot) [Wed, 10 Jun 2026 13:36:58 +0000 (15:36 +0200)] 
[3.15] Add yet one assertion in test_set_text_charset_cp949 (GH-151224) (GH-151237)

Add yet one assertion in test_set_text_charset_cp949 (GH-151224)

Check bytes(m), not only str(m).
(cherry picked from commit 3ca93ab198497da9451101019b67c52e7873377d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>