Florent Guillaume wrote:
  base._p_activate()       # make sure we're not a ghost
  base.__setstate__(state) # change the state
  base._p_changed = True   # marke object as dirty

OK, this is the code I went with.

Well the C code is pretty clear, it does a PyDict_Clear before doing PyDict_Update on the __dict__. Dunno how it was at the time Evan made his comment.

Well, there's tests now, so we should find out if this changes in the future...

OFS.tests.testCopySupport was a good starting place, but it used DemoStorage which doesn't support history, so I had to swap in a real, live filestorage ;-)



Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to