[Zope-dev] Re: compiling intSet.c on Zope 2.8.8

Laurence Rowe l at lrowe.co.uk
Fri Aug 10 10:34:00 EDT 2007


Chris Withers wrote:
> Laurence Rowe wrote:
>> This is just an idea, but zeo is backwards compatible right? So 
>> perhaps you could connect a 2.7 client to a 2.8 zeo server and as long 
>> as you know the oids of the intSets you should be able to load them 
>> and do your conversion.
> 
> An interesting idea, assuming it works, how would I load the objects, 
> change them to the correct (new) type and then save them?
> 
> cheers,
> 
> Chris
> 

Assuming that the 2.7 client won't be able to read 2.8 BTrees, then in a 
2.8 client iterate over everything in the db and save a list of oids 
(obj._p_oid) of everything of that class. This might be easier iterating 
over the filestorage directly.

To avoid having to update the references to these classes (which hold 
the referenced class as well as the oid) you will need to make the new 
class available in the old location through monkey patching.

Then in the 2.7 client for each oid in the list:

  * load the object (through the storage api)

  * create an object of your new python implementation

  * save new object as that oid through the storage api

Laurence



More information about the Zope-Dev mailing list