Issue 4691: IDLE Code Caching Windows (original) (raw)

Created on 2008-12-18 02:37 by brandon.dixon, last changed 2022-04-11 14:56 by admin. 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 ()
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
2022-04-11 14:56:42 admin set github: 48941
2011-12-21 06:57:35 ned.deily set status: open -> closedresolution: duplicatestage: needs patch -> resolvedsuperseder: IDLE/Win Installer: drop -n switch for 2.7/3.1; install 3.1 as idle3versions: + Python 3.1, Python 2.7, - Python 2.6
2011-12-09 00:59:49 roger.serwy set nosy: + roger.serwymessages: +
2009-08-04 18:48:10 amaury.forgeotdarc set messages: +
2009-08-03 05:53:01 brandon.dixon set files: + unnamedmessages: +
2009-08-03 03:27:50 gpolo set messages: +
2009-04-26 22:16:13 ajaksu2 set priority: normalnosy: + gpoloversions: - Python 2.5stage: needs patch
2008-12-20 00:02:17 brandon.dixon set messages: +
2008-12-19 23:58:08 amaury.forgeotdarc set status: closed -> openresolution: not a bug -> (no value)messages: +
2008-12-18 10:34:05 amaury.forgeotdarc set status: open -> closedresolution: not a bugmessages: + nosy: + amaury.forgeotdarc
2008-12-18 02:37:54 brandon.dixon create