Le mardi 19 juin 2012 20:50:55, Marius Gedminas a écrit :
> Yes, you can override __setstate__:
> It's also best to avoid write-on-read semantics, because those tend to
> cause database growth and increase the chances of getting ConflictErrors.
This is also a problem with __setstate__, and I've been bitten by it when
moving from Zope 2.8 to 2.12 (maybe 2.11 too ?) as 2.8 PythonScript objects
were modified on load on the new version (adding a trailing \n IIRC), which
broke "History" ZMI tab: one cannot alter a non-current object revision.
For more information about ZODB, see http://zodb.org/
ZODB-Dev mailing list - ZODB-Dev@zope.org