From: Ned Deily Date: Mon, 31 Oct 2011 03:01:35 +0000 (-0700) Subject: Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. X-Git-Tag: v3.3.0a1~993^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7aff4517289e2a748b238f282a777e577c9e3d3f;p=python Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. (Patch by Roger Serwy) --- 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 50a9a3d648..13e79b2a24 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.