This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roger.serwy
Recipients ezio.melotti, roger.serwy
Date 2011-10-30.17:24:50
SpamBayes Score 0.0010000883
Marked as misclassified No
Message-id <1319995491.95.0.0388029066665.issue13296@psf.upfronthosting.co.za>
In-reply-to
Content
The interactive interpreter in IDLE does not reset its compiler __future__ flags when you restart the shell. 

To verify this, type into the shell:
    
    >>> from __future__ import barry_as_FLUFL
    >>> 1 != 2

You'll get a syntax error. Restart the shell and type

    >>> 1 != 2

A syntax error still occurs.

The ModifiedInterpreter class in PyShell.py ultimately relies on codeop to mimic the interactive prompt. The codeop module was created specifically for remembering __future__ flags for subsequent commands. 

The provided patch stores the flags of the interpreter when it first initializes, and then restores them in "restart_subprocess". It's a patch against 3.2.2.
History
Date User Action Args
2011-10-30 17:24:52roger.serwysetrecipients: + roger.serwy, ezio.melotti
2011-10-30 17:24:51roger.serwysetmessageid: <1319995491.95.0.0388029066665.issue13296@psf.upfronthosting.co.za>
2011-10-30 17:24:51roger.serwylinkissue13296 messages
2011-10-30 17:24:50roger.serwycreate