[ZODB-Dev] ZODB migration to Zope 2.8

Christian Heimes christian at cheimes.de
Fri Feb 11 19:16:25 EST 2005


Jim Fulton wrote:
 > Note, however, that it won't help with the uses of the ancient
 > obsolete BTrees.  They aren't the same as the new BTrees but in a 
different
 > location. They are actually totally differeent types with different
 > state formats.  The new BTree classes cannot deal with their state.

ack

 > We'll have to look at creating aliases for ZODB.PersistentMapping
 > and ZODB.PersistentList.
 >
 > I fear we'll have to write some sort of conversion script
 > to deal with converting old-style BTrees to new-style BTrees.

There is BTress.convert.convert which looks like a convert script to me.

 > Another idea might be to define some sort of protocol
 > for dealing with unrecognized classes.  When the database
 > encounters a class it doesn't recognize, it could look in a table for
 > a handler.  That handler would be responsible for creating a new object.
 > Perhaps this could be combined with some sort of database conversion
 > process.

That sounds like a great idea! A dict like registry would be sufficant:

   { 'full.dotted.path.to.class' : callable, }

where callable is a callable like:

   newObject = callable('full.dotted.path.to.class', state)

Christian


More information about the ZODB-Dev mailing list