]> 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 02:58:04 +0000 (19:58 -0700)
committerNed Deily <nad@acm.org>
Mon, 31 Oct 2011 02:58:04 +0000 (19:58 -0700)
(Patch by Roger Serwy)

Lib/idlelib/PyShell.py
Misc/NEWS

index 9dd43cfa912f39e3c6622be7d71326b20c38e62b..ce83f190158922bd267c91004d2ed434f7f7b5e2 100644 (file)
@@ -344,6 +344,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
         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 @@ 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 09f9e32ac32ae930732dfb60cf6c5d5fad53839c..9407874f587e27f992f600903e11ff1705de4277 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,9 @@ Core and Builtins
 Library
 -------
 
+- Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
+  (Patch by Roger Serwy)
+
 - Issue #7334: close source files on ElementTree.parse and iterparse.
 
 - Issue #13232: logging: Improved logging of exceptions in the presence of