Issue1088

classification
Title: Existing .py$class files from Jy2.2 cause error for Jy2.5a
Type: Severity: normal
Components: Core Versions: 2.5alpha1
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: baoilleach, fwierzbicki, pjenvey
Priority: Keywords:

Created on 2008-07-30.15:24:13 by baoilleach, last changed 2008-07-31.20:19:36 by pjenvey.

Files
File name Uploaded Description Edit Remove
myClass.py baoilleach, 2008-07-30.15:24:13 Simple class to demonstrate the bug
Messages
msg3368 (view) Author: Noel O'Boyle (baoilleach) Date: 2008-07-30.15:24:13
(On Windows)

If I run test_third.py (below) with Jython2.5a, it runs fine. However,
if beforehand I run the script with Jython 2.2, it will subsequently
fail with Jython2.5a as follows:
>"D:\Tools\jython2.5a1+\jython.bat" test_third.py
0
Traceback (most recent call last):
  File "test_third.py", line 6, in <module>
    print instance.total
AttributeError: 'Example' object has no attribute 'total'

=========

test_third.py is:
"""
import myClass

instance = myClass.Example()
print instance.total
instance.inctotal()
print instance.tota
"""
where myClass.py is the attached file
msg3369 (view) Author: Noel O'Boyle (baoilleach) Date: 2008-07-30.15:26:05
Error copying + pasting test_third.py:
"""
import myClass

instance = myClass.Example()
print instance.total
instance.inctotal()
print instance.total
"""
msg3380 (view) Author: Philip Jenvey (pjenvey) Date: 2008-07-31.20:19:35
This is fixed as of r4999. The problem was the new compiler wasn't 
comparing the MAGIC of the bytecode, so it was using the old, incompatible 
bytecode
History
Date User Action Args
2008-07-31 20:19:36pjenveysetstatus: open -> closed
nosy: + pjenvey
resolution: fixed
messages: + msg3380
2008-07-31 15:24:13fwierzbickisetnosy: + fwierzbicki
2008-07-30 15:26:05baoilleachsetmessages: + msg3369
2008-07-30 15:24:13baoilleachcreate