diff Lib/idlelib/PyShell.py @ 73232:87251608cb64 2.7

Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. (Patch by Roger Serwy)
author Ned Deily <nad@acm.org>
date Sun, 30 Oct 2011 19:58:04 -0700
parents c9f69b28c4d1
children 7857d1f4ce79
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py	Mon Oct 31 02:40:26 2011 +0100
+++ b/Lib/idlelib/PyShell.py	Sun Oct 30 19:58:04 2011 -0700
@@ -344,6 +344,7 @@
         self.restarting = False
         self.subprocess_arglist = None
         self.port = PORT
+        self.original_compiler_flags = self.compile.compiler.flags
 
     rpcclt = None
     rpcpid = None
@@ -459,6 +460,7 @@
             gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
             # reload remote debugger breakpoints for all PyShellEditWindows
             debug.load_breakpoints()
+        self.compile.compiler.flags = self.original_compiler_flags
         self.restarting = False
         return self.rpcclt