From 2f04bdab54abebc95b18c70665177e74eb0e0ce5 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 16 Sep 2026 04:41:04 +0300 Subject: [PATCH 1/2] gh-69004: Disable the IDLE Debugger menu item while user code runs (#157599) Like Stack Viewer since GH-17163, instead of a "Don't debug now" box. Co-authored-by: Claude Opus 5 (1M context) --- Lib/idlelib/idle_test/test_mainmenu.py | 1 + Lib/idlelib/pyshell.py | 1 + .../next/IDLE/2026-09-15-23-27-38.gh-issue-69004.Z7Ym9G.rst | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/IDLE/2026-09-15-23-27-38.gh-issue-69004.Z7Ym9G.rst diff --git a/Lib/idlelib/idle_test/test_mainmenu.py b/Lib/idlelib/idle_test/test_mainmenu.py index 51d2accfe48a1c..c884256a99eaaa 100644 --- a/Lib/idlelib/idle_test/test_mainmenu.py +++ b/Lib/idlelib/idle_test/test_mainmenu.py @@ -22,6 +22,7 @@ def test_tcl_indexes(self): # On failure, change pattern here and in function(s). # Patterns here have '.*' for re instead of '*' for tcl. for menu, pattern in ( + ('debug', '.*ebugger'), # PyShell.debug_menu_postcommand ('debug', '.*tack.*iewer'), # PyShell.debug_menu_postcommand ('options', '.*ode.*ontext'), # EW.__init__, CodeContext.toggle... ('options', '.*ine.*umbers'), # EW.__init__, EW.toggle...event. diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 6e57e306a3678d..51568d2a9e950e 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -1099,6 +1099,7 @@ def open_debugger(self): def debug_menu_postcommand(self): state = 'disabled' if self.executing else 'normal' + self.update_menu_state('debug', '*ebugger', state) self.update_menu_state('debug', '*tack*iewer', state) def beginexecuting(self): diff --git a/Misc/NEWS.d/next/IDLE/2026-09-15-23-27-38.gh-issue-69004.Z7Ym9G.rst b/Misc/NEWS.d/next/IDLE/2026-09-15-23-27-38.gh-issue-69004.Z7Ym9G.rst new file mode 100644 index 00000000000000..05d42efd451458 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2026-09-15-23-27-38.gh-issue-69004.Z7Ym9G.rst @@ -0,0 +1,2 @@ +The Debugger item of the IDLE Debug menu is now disabled while user code +runs, like Stack Viewer. From e682b4478c2ad09de0bbe821127f451f02f6e5ca Mon Sep 17 00:00:00 2001 From: Cooper Roper Date: Tue, 15 Sep 2026 21:13:11 -0500 Subject: [PATCH 2/2] Fix comment formatting in dictobject.c (#157597) --- Objects/dictobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 357e714de9a6c0..f0feea4b717ec9 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -99,7 +99,7 @@ dk_nentries to achieve amortized O(1). Since there are DKIX_DUMMY remains in dk_indices, we can't increment dk_usable even though dk_nentries is decremented. -To preserve the order in a split table, a bit vector is used to record the +To preserve the order in a split table, a bit vector is used to record the insertion order. When a key is inserted the bit vector is shifted up by 4 bits and the index of the key is stored in the low 4 bits. As a consequence of this, split keys have a maximum size of 16.