Re[2]: [ZODB-Dev] Migrating classes in ZODB 3.5.1
Hello Tim Peters, Tuesday, November 8, 2005, 8:26:00 PM, you wrote: TP> I'm not familiar with "broken objects" in newer ZODBs, and didn't find any TP> docs apart from the docstrings in broken.py. Brief overviews of new TP> features often appear in NEWS.txt, but the news for ZODB 3.3a3 just says TP> "New broken object support.", so no luck there either. But "New broken object support." is not supported by Zope, it uses in DBTab.ClassFactories.zopeClassFactory (removed in the trunk) and Zope2.App.ClassFactory.ClassFactory the old `OFS.Uninstalled.Broken` broken implementation. But OFS.Uninstalled module doesn`t know about ZODB.broken module. and for example i don`t get the broken object state in simple way ( unghostifing the broken object ) http://mail.zope.org/pipermail/zope-dev/2005-September/025387.html http://www.zope.org/Collectors/Zope/1911 -- Best regards, Victor Safronovich NauMen.NauDoc.SoftwareDeveloper http://www.naumen.ru ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
RE: [ZODB-Dev] misleading exception
[Dieter Maurer] >>> You should file a bug report: "http://www.zope.org/Collectors/Zope";, >>> category "database". This way, Tim can fix the hole in the >>> "ConnectionStateError" check. [Jim Fulton] >> It's a mistake to rely on Tim alone to fix bugs. [Dieter] > Maybe, it is a mistake but most ZODB bugs seem to get fixed by him ;-) It's hard to know what Jim didn't say . It's generally true that customer work takes priority over ZODB work for me. That's always been true. What's different today is that I'm booked on customer work for months to come, and doubt I can keep giving ZODB even the reduced level of attention I've given it this last week. So, if it was a mistake to rely on me to fix ZODB bugs, I'm not really sure _whose_ mistake it was -- but it's OK by me if everyone decides to call it my mistake ;-) ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] misleading exception
Jim Fulton wrote at 2005-11-6 11:22 -0500: >Dieter Maurer wrote: >> >> You should file a bug report: "http://www.zope.org/Collectors/Zope";, >> category "database". This way, Tim can fix the hole in the >> "ConnectionStateError" check. > >It's a mistake to rely on Tim alone to fix bugs. Maybe, it is a mistake but most ZODB bugs seem to get fixed by him ;-) -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1
Syver Enstad wrote at 2005-11-7 11:51 +0100: >In ZODB 3.2 I can replace the _classFactory method on DB and locate the >renamed/moved class by other means (a lookup table that maps old module >classname pairs to another class in another module). If I change >attributes of the persistent instance it will be saved with the new >class name instead of the old. > >I can't get this strategy to work under 3.5.1. It seems to work okay as >long as I use the custom classFactory method (not _classFactory as in >3.2) but 3.5.1 doesn't seem to update the modulename, classname when I >save the instance. > >What I want to do is just update the persistent instance so that it will >load from the new module/ new class after I have done a one time update >of the database. I fear this will not work. For efficiency reasons, the class designator (usually a module, classname tuple) is stored both in the object itself and in persistent references. While you will be able to modify the object's class the persistent references will only change when the containers are stored into the ZODB. -- Dieter ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev
RE: [ZODB-Dev] Migrating classes in ZODB 3.5.1
[Syver Enstad] > In ZODB 3.2 I can replace the _classFactory method on DB and locate the > renamed/moved class by other means (a lookup table that maps old module > classname pairs to another class in another module). If I change > attributes of the persistent instance it will be saved with the new class > name instead of the old. > > I can't get this strategy to work under 3.5.1. It seems to work okay as > long as I use the custom classFactory method (not _classFactory as in > 3.2) but 3.5.1 doesn't seem to update the modulename, classname when I > save the instance. > > What I want to do is just update the persistent instance so that it will > load from the new module/ new class after I have done a one time update > of the database. > > The ZODB.broken module has a rebuild function that might be the answer > but I didn't understand how to use it to help me. > > If anybody on the list knows of any documentation regarding these issues > please refer me to that. I'm not familiar with "broken objects" in newer ZODBs, and didn't find any docs apart from the docstrings in broken.py. Brief overviews of new features often appear in NEWS.txt, but the news for ZODB 3.3a3 just says "New broken object support.", so no luck there either. I don't have time now to try to figure it out, so I hope someone else can help. From the docstrings, it looks like the intent may be that you repair a broken object by poking old->new maps into sys.modules, effectively using that dict as your lookup table. But I haven't used them, and I'm not sure. Sorry! ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev