[Zope] Warning: don't refresh MonkeyPatches
Paul Winkler
pw_lists@slinkp.com
Fri, 21 Mar 2003 12:47:45 -0500
Posting this on the off chance that it saves someone the week
of hair-tearing that I've just experienced...
I sometimes find MonkeyPatches a convenient way to globally change
behavior of zope or 3rd-party products. But I just discovered
something very important:
it's apparently NOT safe to "refresh" a MonkeyPatch-style product.
I have a monkeypatch that works fine until I refresh it, then I get
mysterious errors like "Object of type 'None' is not callable" with no
indication in the traceback of what object is None or even what's
trying to call it!
In a debugging session, I explored everything near the end of the
traceback and could not find any variables that are None. I know
it's in there somewhere...
If I restart zope, everything works fine.
--
Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE BAT-FLAGELLA!
(random hero from isometric.spaceninja.com)