[zope2-tracker] [Bug 735999] Re: Zope 2.12 PythonScript manage_change_history_page functionalities broken for old objects

Vincent Pelletier 735999 at bugs.launchpad.net
Fri May 6 10:48:38 EDT 2011


Attached patch fixes the problem for me.

I applied the same order here as what happens when calling
ZODB.Connection.load: first __setstate__, then put _p_serial, and
finally prevent any change by setting a different jar.

Notes (unrelated to this fix, but related to modified code):
- This function breaks if object class changed between observed and current revision
  Reason: rev=self.__class__.__basicnew__()
  Possible solution: ZODB should probably offer a way to load an old instance into a usable object, rather than exposing a bare state.
- HystoryJar is not strictly required to raise in commit actually. It's anyway probably better to keep it here, in case ZODB stops checking jar (...not that I think it will really happen).

** Patch added: "History.py.patch"
   https://bugs.launchpad.net/zope2/+bug/735999/+attachment/2116669/+files/History.py.patch

-- 
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
https://bugs.launchpad.net/bugs/735999

Title:
  Zope 2.12 PythonScript manage_change_history_page functionalities
  broken for old objects


More information about the zope2-tracker mailing list