]> granicus.if.org Git - python/commitdiff
Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
authorNed Deily <nad@acm.org>
Mon, 31 Oct 2011 03:01:35 +0000 (20:01 -0700)
committerNed Deily <nad@acm.org>
Mon, 31 Oct 2011 03:01:35 +0000 (20:01 -0700)
(Patch by Roger Serwy)

Lib/idlelib/PyShell.py
Misc/NEWS

index 43e08f2c78d4598783b27097bea8ce543eaa1ef6..33deb457a4b92f16159f2eaa8f2ed634a3c69e84 100644 (file)
@@ -340,6 +340,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
         self.restarting = False
         self.subprocess_arglist = None
         self.port = PORT
+        self.original_compiler_flags = self.compile.compiler.flags
 
     rpcclt = None
     rpcsubproc = None
@@ -447,6 +448,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
             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
 
index 50a9a3d648b2d77049f147f77e3e1e73dbb92c54..13e79b2a242d7b09315553850a25710b635e9178 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,9 @@ Core and Builtins
 Library
 -------
 
+- Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
+  (Patch by Roger Serwy)
+
 - Issue #13293: Better error message when trying to marshal bytes using
   xmlrpc.client.