Public bug reported:
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):
self.my_attribute = "froon"
print "Making empty database"
storage = FileStorage.FileStorage('db.fs')
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].my_attribute == 'froon':
print "object still works..."
else:
print "object is broken!"
print "\ncommitting transaction..."
transaction.commit()
print "\ninspecting object..."
if hasattr(root[1], 'my_attribute') and root[1].my_attribute == 'froon':
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.FileStorage('db.fs')
db = DB(storage)
conn = db.open()
root = conn.root()
print "\ninspecting object..."
if hasattr(root[1], 'my_attribute') and root[1].my_attribute == 'froon':
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.
** Affects: zodb (Ubuntu)
Importance: Undecided
Status: New
--
ZODB doesn't record attribute changes on Gutsy x64
https://bugs.launchpad.net/bugs/165287
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs