classification
Title: IDLE Code Caching Windows
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: IDLE/Win Installer: drop -n switch for 2.7/3.1; install 3.1 as idle3
View: 5847
Assigned To: Nosy List: amaury.forgeotdarc, brandon.dixon, gpolo, roger.serwy
Priority: normal Keywords:

Created on 2008-12-18 02:37 by brandon.dixon, last changed 2011-12-21 06:57 by ned.deily. This issue is now closed.

Files
File name Uploaded Description Edit
bug-test.py brandon.dixon, 2008-12-18 02:37 Test code used to replicate the bug
unnamed brandon.dixon, 2009-08-03 05:52
Messages (8)
msg78010 - (view) Author: Brandon Dixon (brandon.dixon) Date: 2008-12-18 02:37
I made changes to my code and hit F5 to run it through IDLE. The code
appeared to run without any errors, but when I closed everything out and
ran it again it turned out to be full of errors.

I am able to replicate this problem with my code and have seen others
have the same problem, but its unclear when and what causes the caching
to take place. I created a test file that only contained "print hello".
I ran this, made changes and then ran it again. The changes were
reflected, but after testing my code, it still cached. 

Attached is a simple python file I used to test everything out. Run the
test, then comment out the Struct class and run it again. No errors
should appear, but if you close the code, reopen it and then run it
again it will error.
msg78020 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-18 10:34
You are using IDLE with the "-n" option, so the same interpreter session
is reused each time you hit F5.

The second run works because the Struct from the first run is still
present - but disappears of course when you restart IDLE.

It's not really caching, but normal manipulation of variables, just like
"a = 5" followed by "print a" works because 'a' is saved in-between.

I suggest to remove this "-n" option, a fresh interpreter is started
each time you press F5, and errors appear sooner...
msg78078 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-19 23:58
Reopening: the user did not choose the "-n" option; this option is 
always set when using "edit with IDLE" Windows shell command.
msg78079 - (view) Author: Brandon Dixon (brandon.dixon) Date: 2008-12-20 00:02
I tested this issue in Linux using the IDLE package (packed separately)
from Python. I was not able to reproduce this error, so it appears to be
with the Windows version of Python.
msg91215 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-08-03 03:27
Amaury, from what I remember your suggestion has been applied some time
ago. Can you check if the newest Windows installer still adds an '-n' by
default ?
msg91216 - (view) Author: Brandon Dixon (brandon.dixon) Date: 2009-08-03 05:53
Can you guys let me know when this is fixed or thought to be fixed. I would
like to test from my end just to ensure.

On Sun, Aug 2, 2009 at 11:27 PM, Guilherme Polo <report@bugs.python.org>wrote:

>
> Guilherme Polo <ggpolo@gmail.com> added the comment:
>
> Amaury, from what I remember your suggestion has been applied some time
> ago. Can you check if the newest Windows installer still adds an '-n' by
> default ?
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4691>
> _______________________________________
>
msg91264 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-08-04 18:48
Yes, the -n switch was removed from the Windows installer with r72335
(issue5847)
msg149067 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2011-12-09 00:59
Given Amaury's last message, should this issue be closed as being resolved?
History
Date User Action Args
2011-12-21 06:57:35ned.deilysetstatus: open -> closed
resolution: duplicate
stage: needs patch -> resolved
superseder: IDLE/Win Installer: drop -n switch for 2.7/3.1; install 3.1 as idle3
versions: + Python 3.1, Python 2.7, - Python 2.6
2011-12-09 00:59:49roger.serwysetnosy: + roger.serwy
messages: + msg149067
2009-08-04 18:48:10amaury.forgeotdarcsetmessages: + msg91264
2009-08-03 05:53:01brandon.dixonsetfiles: + unnamed

messages: + msg91216
2009-08-03 03:27:50gpolosetmessages: + msg91215
2009-04-26 22:16:13ajaksu2setpriority: normal
nosy: + gpolo
versions: - Python 2.5

stage: needs patch
2008-12-20 00:02:17brandon.dixonsetmessages: + msg78079
2008-12-19 23:58:08amaury.forgeotdarcsetstatus: closed -> open
resolution: not a bug -> (no value)
messages: + msg78078
2008-12-18 10:34:05amaury.forgeotdarcsetstatus: open -> closed
resolution: not a bug
messages: + msg78020
nosy: + amaury.forgeotdarc
2008-12-18 02:37:54brandon.dixoncreate