summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Serwy <roger.serwy@gmail.com>2013-04-12 00:16:44 (GMT)
committerRoger Serwy <roger.serwy@gmail.com>2013-04-12 00:16:44 (GMT)
commit1eafd1076eca6b63337a2d8bb1eecae5b57e7792 (patch)
treeb0af393497b95bda3a1bdc0efe33be5d20132e02
parent36b045f4db128a308f311058330c81995acf68fe (diff)
downloadcpython-1eafd1076eca6b63337a2d8bb1eecae5b57e7792.zip
cpython-1eafd1076eca6b63337a2d8bb1eecae5b57e7792.tar.gz
cpython-1eafd1076eca6b63337a2d8bb1eecae5b57e7792.tar.bz2
#17585: Fixed IDLE regression. Now closes when using exit() or quit().
-rw-r--r--Lib/idlelib/PyShell.py3
-rw-r--r--Lib/site.py7
-rw-r--r--Misc/NEWS2
3 files changed, 6 insertions, 6 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index c381f23..177e49e 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1365,6 +1365,9 @@ class PseudoInputFile(PseudoFile):
self._line_buffer = line[size:]
return line[:size]
+ def close(self):
+ self.shell.close()
+
usage_msg = """\
diff --git a/Lib/site.py b/Lib/site.py
index b751006..87687e7 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -369,12 +369,7 @@ def setquit():
# Shells like IDLE catch the SystemExit, but listen when their
# stdin wrapper is closed.
try:
- fd = -1
- if hasattr(sys.stdin, "fileno"):
- fd = sys.stdin.fileno()
- if fd != 0:
- # Don't close stdin if it wraps fd 0
- sys.stdin.close()
+ sys.stdin.close()
except:
pass
raise SystemExit(code)
diff --git a/Misc/NEWS b/Misc/NEWS
index b8f687b..ddfc701 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -46,6 +46,8 @@ Library
IDLE
----
+- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
+
- Issue #17657: Show full Tk version in IDLE's about dialog.
Patch by Todd Rovito.