[Zope-dev] Re: Converting from old-style BTreess

Jim Fulton jim at zope.com
Mon Dec 15 02:39:21 EST 2003


Chris McDonough wrote:
> On Sun, 2003-12-14 at 23:02, Chris McDonough wrote:
> 
>>Here's an idea: create a simple script that manufactured a module which
>>set up the Zope configuration, "filled in" for BTree in sys.modules, and
>>got a hold of Zope.app(), causing ZGlobals to be replaced by a new-style
>>BTree due to the above magic.  People upgrading to 2.8 with databases
>>created by Zope versions older than 2.3 would still need to run
>>convertBTrees inside a different Zope version, but people upgrading
>>databases created in versions equalling or later than 2.3 wouldn't
>>because we stopped using the old BTree module for anything except
>>ZGlobals after 2.3 AFAICT.
> 
> 
> Actually, given my findings later in this email, this isn't even
> necessary.  

Right. Whew.

I checked in the necessary fix for PersistentMapping.  There was a
change in the data structure and I had to add some logic to convert
some old state.

I also had to check in a %$#@ travesty because Data.fs.in still has
references to BoboPOS.

With these changes, I can create a database with 2.6 and open it with the
head.

Thanks Chris for helping us figure out that this was easier than we
thought. :)

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