[ZODB-Dev] Changing namespace - best strategy

Marius Gedminas marius at gedmin.as
Wed Jul 17 10:16:57 CEST 2013


On Tue, Jul 16, 2013 at 08:54:55PM +0200, Pedro Ferreira wrote:
> Hello,
> 
> Thanks for your answer.
> 
> > 1. Make sure all the classes are still importable from the old location
> >    ('from newmodule import MyPersistentSomething # BBB')
> 
> So, I assume this is based on the classFactory hook/dictionary solution?
> Or am I misunderstanding it?

No, this is based on ZODB's use of pickles.  The database stores the
fully-qualified name of the module and class of each object, so if you
make the classes importable using the old module and class name, the
objects can still be loaded.

Marius Gedminas
-- 
Moore's Law, I need hardly remind a top-notch industry professional like you,
states that as the density of silicon circuitry doubles, the probability of you
not being able to find some sensibly-priced extra memory to fit your old lappy
approaches 1.0.
        -- Verity Stob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.zope.org/pipermail/zodb-dev/attachments/20130717/ed5c531e/attachment.sig>


More information about the ZODB-Dev mailing list