ZODB doesn't record attribute changes on Gutsy x64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ZODB |
Fix Released
|
Undecided
|
Unassigned | ||
3.7 |
Won't Fix
|
Undecided
|
Unassigned | ||
zodb (Debian) |
Fix Released
|
Unknown
|
|||
zodb (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-zodb
This is a show-stopper: ZODB no longer records attribute changes. I have another system running Gutsy on i386, and have no problems there.
I'm attaching a code sample that gives the following output for me:
CODE:
====
from ZODB import FileStorage, DB
from BTrees.IOBTree import IOBTree
import transaction
from persistent import Persistent
class MyObj(Persistent):
def __init__(self):
print "Making empty database"
storage = FileStorage.
db = DB(storage)
conn = db.open()
root = conn.root()
print "\nstoring an object..."
root[1] = MyObj()
print "\ninspecting object..."
if hasattr(root[1], 'my_attribute') and root[1]
print "object still works..."
else:
print "object is broken!"
print "\ncommitting transaction..."
transaction.
print "\ninspecting object..."
if hasattr(root[1], 'my_attribute') and root[1]
print "object still works..."
else:
print "object is broken!"
print "\nclosing up zodb...",
del root
conn.close()
del conn
db.close()
del db
storage.close()
del storage
print "done"
print "\nopening for another look..."
storage = FileStorage.
db = DB(storage)
conn = db.open()
root = conn.root()
print "\ninspecting object..."
if hasattr(root[1], 'my_attribute') and root[1]
print "object still works..."
else:
print "object is broken!"
transaction.abort()
del root
conn.close()
del conn
db.close()
del db
storage.close()
del storage
print "done"
#######
OUTPUT:
=====
~$ python test_zodb.py
Making empty database
storing an object...
inspecting object...
object still works...
committing transaction...
inspecting object...
object still works...
closing up zodb... done
opening for another look...
inspecting object...
object is broken!
I'm running an up-to-date Gutsy with "no funny stuff" on x86_64.
Changed in zodb: | |
status: | Unknown → New |
Changed in zodb: | |
status: | New → Fix Released |
This is a bug in the Persistent module, see ZODB bug #153316 (https:/ /bugs.launchpad .net/zodb/ +bug/153316) I've attached a patch to solve this issue, please apply against version 3.6.0-6 version of the python-zodb package.