[Zope3-dev] renaming MementoBags..conclusions?

Jim Fulton jim@zope.com
Wed, 15 May 2002 15:50:58 -0400


Shane Hathaway wrote:
> 
...

> > That's true of any object. Why does it matter more in the context of annotation?
> > I think it doesn't.
> 
> Because annotations can appear anywhere, and the user isn't always aware
> of them.  Say you add an annotation to the root object that later can't
> be loaded because the class disappears.  In the worst case, if the
> annotations are stored as part of the root object, you can no longer
> load the root object.  In the best case, assuming each annotation is
> stored as a separate persistent object and maybe even located away from
> the root object, the machinery that loads and stores annotations has to
> avoid tripping over broken annotations.
> 
> I'm just trying to avoid a Zope 2 pitfall.

I appreciate that, but I don't want to introduce this sort of limitation.

One thing we do need to do is to think about plumbing something into cPickle
so that failure to unpickle a class doesn't take the entire pickle with it.
It would be nice if cPickle had a hook that would allow someone to take over
class unpickling *only* when the class can't be found.

Jim

--
Jim Fulton           mailto:jim@zope.com       Python Powered!        
CTO                  (888) 344-4332            http://www.python.org  
Zope Corporation     http://www.zope.com       http://www.zope.org