[Zope] A persistent problem -- monkey patch related?

Dennis Allison allison at sumeru.stanford.EDU
Thu Jan 22 17:06:42 EST 2004



I asked this question to the list a while back, but the responses I got
were a bit off-point.  Sad to say, the issue remains unresolved.

I have made some extensive mods to UserFolder and installed them with a
monkey patch.  The monkey patch lives in the Products folder.  The
__init__().py associated with the folder imports User.py, defines the
methods to be changed (e.g., foo(self) defined outside a class, then
imports AccssControl and InitializeClass from Globals, assigns the new
method to the associated old method name in UserFolder, and then calls
InitializeClass.

I chose this approach because it looked to have the least impact on the
existing system, but now I am not so sure.  I've been getting _p_oid 
errors when the OODB is backing out of a transaction.  Dieter has opined 
that it's a Zope bug, but I am not so sure.  I suspect that something I
have done in the monkeypatch has triggered the problem.  My patch code
uses PersistentMapping() and expects that the system does the right thing
with respect to persistence in the new methods even though they are
patched in.

Can anyone shed light on the issue:  Is persistence inherited by monkey
patched methods?






More information about the Zope mailing list