Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Lib/idlelib/NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ What's New in IDLE 3.8.0 (since 3.7.0)
Released on 2019-10-20?
======================================

bpo-35379: When exiting IDLE, catch any AttributeError. One happens
when EditorWindow.close is called twice. Printing a traceback, when
IDLE is run from a terminal, is useless and annoying.

bpo-38183: To avoid test issues, test_idle ignores the user config
directory. It no longer tries to create or access .idlerc or any files
within. Users must run IDLE to discover problems with saving settings.

bpo-38077: IDLE no longer adds 'argv' to the user namespace when
initializing it. This bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
Expand Down
11 changes: 7 additions & 4 deletions Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,10 +1061,13 @@ def maybesave(self):
return self.io.maybesave()

def close(self):
reply = self.maybesave()
if str(reply) != "cancel":
self._close()
return reply
try:
reply = self.maybesave()
if str(reply) != "cancel":
self._close()
return reply
except AttributeError: # bpo-35379: close called twice
pass

def _close(self):
if self.io.filename:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
When exiting IDLE, catch any AttributeError. One happens when
EditorWindow.close is called twice. Printing a traceback, when IDLE is run
from a terminal, is useless and annoying.