[Python-bugs-list] [Bug #110841] idle dosnt recompile modules changed externally (PR#308)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 23 Aug 2000 10:25:11 -0700


Bug #110841, was updated on 2000-Aug-01 21:15
Here is a current snapshot of the bug.

Project: Python
Category: IDLE
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 3
Summary: idle dosnt recompile modules changed externally (PR#308)

Details: Jitterbug-Id: 308
Submitted-By: jnc@ecs.soton.ac.uk
Date: Fri, 28 Apr 2000 13:41:55 -0400 (EDT)
Version: 1.5.2
OS: windows 98


Consider two scripts

showbug.py
=====

import bug1

bug1.bug()
=====
and bug1.py
=====
def bug():
    print 'Bug 5'
=====

both in the same directory.

load showbug.py into idle (0.5) and runit with F5,

the bug function prints Bug 5

Now change bug1.py outside or even with idle, save it. 
dates on disk now show bug1.py is newer than bug1.pyc

rerun showbug.py pressing F5 or ctrl-F5

it still prints Bug 5.

I dont think this behaviour is what is required.Certainly it cost me most
of the afternoon tracking down non-existant problems in my code.

John Carter



====================================================================
Audit trail:
Mon May 22 17:23:04 2000	guido	changed notes
Mon May 22 17:23:04 2000	guido	moved from incoming to request

Follow-Ups:

Date: 2000-Aug-01 21:15
By: none

Comment:
From: Guido van Rossum <guido@python.org>
Subject: Re: [Python-bugs-list] idle dosnt recompile modules changed externally (PR#308)
Date: Fri, 28 Apr 2000 14:45:30 -0400

> Consider two scripts
> 
> showbug.py
> =====
> 
> import bug1
> 
> bug1.bug()
> =====
> and bug1.py
> =====
> def bug():
>     print 'Bug 5'
> =====
> 
> both in the same directory.
> 
> load showbug.py into idle (0.5) and runit with F5,
> 
> the bug function prints Bug 5
> 
> Now change bug1.py outside or even with idle, save it. 
> dates on disk now show bug1.py is newer than bug1.pyc
> 
> rerun showbug.py pressing F5 or ctrl-F5
> 
> it still prints Bug 5.
> 
> I dont think this behaviour is what is required.Certainly it cost me most
> of the afternoon tracking down non-existant problems in my code.

I appreciate the bug report.  The current definitions of running a
script and importing a module all conspire to get this behavior.
We're working on a major change where IDLE executes your script in a
separate process that is created from scratch each time you use
[ctrl-]F5, and then it will go away.

--Guido van Rossum (home page: http://www.python.org/~guido/)


-------------------------------------------------------

Date: 2000-Aug-01 21:15
By: none

Comment:
This is all explainable, but I agree it's bad for the user.
We'll fix it by running scripts in a new process.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110841&group_id=5470