[PYTHONMAC-SIG] MacPython 1.4 bug!

jeffrey P. Shell jeff@cynapses.com
Tue, 29 Oct 1996 09:32:20 -0700


eep!  found a nasty nasty nasty li'l bug in MacPython 1.4 (CFM68k):  
.pyc files are messed up.

here's the story:  I got MacPython 1.4 yesterday, and noticed a way cool 
speed improvement in SIOUX.  I was wanting to profile some code i was 
working on (the Pummel project) and wrote a small test function in the 
source file so i could Profile it.  But the test function wasn't showing 
up in the interpreter at all, wether i quit and restarted and imported 
the module, or wether i did reload(module).  So, i scrapped all my .pyc 
files in the directory i was working in and lo!  it showed up.  "No 
biggie," i thought, "just a change in releases changed the .pyc format".  
But now, all the new .pyc files were of type/creator TEXT/ttxt 
(Simpletext).  (But, the new .pyc files being generated in the lib 
directory were of the correct type/creator).  I ran all the profiler 
stuff, and went back to working on the source.  I decided to test 
something:  i changed a __version__ reference in one of my modules.  
Then i reloaded the interpreter and imported that module.  when i tried 
to print the __version__, i got "0.6b1", the old value (in the .pyc 
file).  i kept the interpreter open and trashed the .pyc file and did a 
reload(module), and printed the __version__ and got "0.6b2".

Is anyone else having problems with this?  of course, Jack would have to 
run to Athens for a few days..
-- 
.jPS || jeff@cynapses.com || http://www.cynapses.com/ry/

=================
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
=================