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

Jim Fulton jim at zope.com
Fri Dec 12 07:29:05 EST 2003


Sidnei da Silva wrote:
> | >Is there any special trick to such script? Provided some pointers of
> | >what the script should do, I wouldn't mind writing and testing it.
> | 
> | There are lots of special tricks to such a script. Otherwise, I would
> | have written it already. :)
> 
> Obviously.
> 
> /me slaps his forehead
> 
> | OK, here's how I think it needs to happen, with some, hopefuly helpful 
> | notes.
> | 
> | 1. The script needs to be run under Zope 2.6 or 2.7.  There should
> |    be a product that people can install that installs some method to
> |    be run.  People should be able to run this method in a running zope.
> |    They should not need to shut down their site to do the conversion.
> | 
> | 2. The method should walk the object tree, converting:
> | 
> |    - old-style BTrees to modern BTrees
> |    - old-style buckets to modern buckets
> |    - intSets to IITreeSets.
> 
> Just to check:
> 
> +----------+-----------+
> |   Old    |    New    |
> +----------+-----------+
> |  BTree   |  OOBTree  |
> +----------+-----------+
> | IIBTree  |  IIBtree  |
> +----------+-----------+
> | OIBTree  |  OIBTree  |
> +----------+-----------+
> | IOBTree  |  IOBTree  |
> +----------+-----------+
> |  intSet  | IITreeSet |
> +----------+-----------+
> | bucket?  |  bucket?  |
> +----------+-----------+

No, this isn't quite right. I don't remember the details off hand.

Think of it in terms of modules:

objects from BTree -> objects from BTrees.OOBTree
objects from IOBTree -> objects from BTrees.IOBTree
objects from OIBTree -> objects from BTrees.OIBTree
objects from IIBTree -> objects from BTrees.IIBTree
objects from intSet -> objects from BTrees.IIBTree

> 
> |    The individual conversions should be pretty simple. At worst involving
> |    a for loop, but, in many cases, the constructors for the new types will
> |    be able to accept the old types.
> | 
> | 3. The hard part is walking the object tree.  You will need a function that,
> |    given an object, will return the oids of the objects it references.
> |    Perhaps Jeremy can help you with that.
> 
> I hope so *wink*.

Me too. He's pretty busy. If he can't, I'll try to help.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope-Dev mailing list