https://github.com/python/cpython/commit/7223ff9733da4059b1ef1731734818086aa97339 commit: 7223ff9733da4059b1ef1731734818086aa97339 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2026-09-17T18:11:35+03:00 summary:
[3.15] gh-69004: Disable the IDLE Debugger menu item while user code runs (GH-157599) (#157602) 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 51d2accfe48a1c7..c884256a99eaaa7 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 ef3d014d936ce85..a93b5cca7e1c834 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 000000000000000..05d42efd451458e --- /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]
