summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-10-31 03:01:35 (GMT)
committerNed Deily <nad@acm.org>2011-10-31 03:01:35 (GMT)
commit7aff4517289e2a748b238f282a777e577c9e3d3f (patch)
tree347c224c1e2392a6b747b29fe2cab5022dbb41b2
parent567493fe263e4e4ee50fcb0648ce3f2bbfc84db7 (diff)
downloadcpython-7aff4517289e2a748b238f282a777e577c9e3d3f.zip
cpython-7aff4517289e2a748b238f282a777e577c9e3d3f.tar.gz
cpython-7aff4517289e2a748b238f282a777e577c9e3d3f.tar.bz2
Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
(Patch by Roger Serwy)
-rw-r--r--Lib/idlelib/PyShell.py2
-rw-r--r--Misc/NEWS3
2 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 43e08f2..33deb45 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -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
diff --git a/Misc/NEWS b/Misc/NEWS
index 50a9a3d..13e79b2 100644
--- 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.