[Zope-dev] To the brave folks trying Zope HEAD...

Tim Peters tim at zope.com
Thu Dec 11 14:42:58 EST 2003


[Jeremy Hylton]
> I don't know if there is any documentation for BTree,

I don't know of any dcos for (the old) BTree either.

> so the code will need to be your guide.  I checked the code and each of
> the BTree types does support items().  So walk over the database, find
> each top-level BTree object, extract its items, put them in a new
> BTrees-style BTree, then save that in place of the old object.

Then it may not be necessary to extract the items -- a constructor for a
BTrees-style BTree object:

/**
 ** Accepts a sequence of 2-tuples, or any object with an items()
 ** method that returns an iterable object producing 2-tuples.
 */

IOW, the constructor should invoke .items() for you -- just pass it the
old-style BTree.  Of course this has to be done under a version of ZODB that
still *has* old-style BTree support!

I don't know whether the old-style BTree comes in different type-dependent
flavors, either.  If not, an old BTree should probably become a new OOBTree,
and an old IntSet a new IISet.




More information about the Zope-Dev mailing list