[Python-checkins] cpython (merge 3.3 -> default): Issue #17838: merge with 3.3

georg.brandl python-checkins at python.org
Sun May 12 11:24:20 CEST 2013


http://hg.python.org/cpython/rev/bc322854c336
changeset:   83729:bc322854c336
parent:      83722:3fe80a481dd9
parent:      83728:5f62c848f713
user:        Georg Brandl <georg at python.org>
date:        Sun May 12 11:21:27 2013 +0200
summary:
  Issue #17838: merge with 3.3

files:
  Lib/idlelib/run.py |  5 +++++
  Misc/NEWS          |  2 ++
  2 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -297,6 +297,11 @@
         # page help() text to shell.
         import pydoc # import must be done here to capture i/o binding
         pydoc.pager = pydoc.plainpager
+
+        # Keep a reference to stdin so that it won't try to exit IDLE if
+        # sys.stdin gets changed from within IDLE's shell. See issue17838.
+        self._keep_stdin = sys.stdin
+
         self.interp = self.get_remote_proxy("interp")
         rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -294,6 +294,8 @@
 IDLE
 ----
 
+- Issue #17838: Allow sys.stdin to be reassigned.
+
 - Issue #13495: Avoid loading the color delegator twice in IDLE.
 
 - Issue #17798: Allow IDLE to edit new files when specified on command line.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list