summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-10-30 20:05:30 -0700
committerNed Deily <nad@acm.org>2011-10-30 20:05:30 -0700
commitd1029c4853e7e4858cb2928abaad472717c6aa5d (patch)
treeeac8caea2bd4a1934df0e985692c191babacd77a
parent9bf59aa103074ee0e926ef74743bb1eaa8229128 (diff)
parent7aff4517289e2a748b238f282a777e577c9e3d3f (diff)
downloadcpython-git-d1029c4853e7e4858cb2928abaad472717c6aa5d.tar.gz
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 43e08f2c78..33deb457a4 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 381ceae8f4..67bb6e6049 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -347,6 +347,9 @@ Core and Builtins
Library
-------
+- Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
+ (Patch by Roger Serwy)
+
- Fix the xmlrpc.client user agent to return something similar to
urllib.request user agent: "Python-xmlrpc/3.3".