[ZODB-Dev] _p_invalidate

Nitro nitro at dr-code.org
Mon Jun 21 05:55:40 EDT 2010


Hello,

The simple code below gives me a POSKeyError. Is this to be expected?

-Matthias


class MyObj(Persistent):
     def __init__(self, settings):
         Persistent.__init__(self)
         self.settings = settings

     def _p_invalidate(self):
         print 'INVALIDATE', self.settings
         Persistent._p_invalidate(self)
         print self.settings   # POSKeyError here

transaction.begin()
dbroot['obj'] = obj = MyObj( {'a' : 1} )
sp = transaction.savepoint()
transaction.abort()


More information about the ZODB-Dev mailing list