https://github.com/python/cpython/commit/36dbdc236e575cec782aa7e96d9a07f503d685cc commit: 36dbdc236e575cec782aa7e96d9a07f503d685cc branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-09-16T08:21:20Z summary:
[3.13] gh-69004: Disable the IDLE Debugger menu item while user code runs (GH-157599) (GH-157604) Like Stack Viewer since GH-17163, instead of a "Don't debug now" box. (cherry picked from commit 2f04bdab54abebc95b18c70665177e74eb0e0ce5) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> files: A Misc/NEWS.d/next/IDLE/2026-09-15-23-27-38.gh-issue-69004.Z7Ym9G.rst M Lib/idlelib/idle_test/test_mainmenu.py M Lib/idlelib/pyshell.py 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 2d1e20beafef29..e42ea3838f4c7c 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. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
