[ZODB-Dev] Broken instances after refactoring in ZODB

Leonardo Santagada santagada at gmail.com
Sat Oct 4 15:42:05 EDT 2008


On Oct 4, 2008, at 12:36 PM, Wichert Akkerman wrote:

> Adam wrote:
>>
>>
>> Thanks for that, guys, I've not used a mailing list like this  
>> before so
>> unsure how to respond.
>>
>> If ZODB stores the Package.Module.Class name in the pickle would it  
>> be
>> possible for me to simply rename them in the binary file?
Possible it is, but probably harder than just doing what they said

>>
>> My confusion here is that I've globally imported everything from the
>> packages into the current namespace of my main module. ZODB  
>> shouldn't be
>> aware I've moved the modules since for all intents and purposes to
>> Python, they are still there.
>>
>
> It doesn't matter where you import it from or to - python uses the  
> location of the actual implementation and ZODB uses that. If you  
> move your implementation to another place you have to either update  
> all objects in the ZODB or add module aliases.
>
> Wichert.


I would like to know from where does it get that info? I would guess  
from "__module__".

Why doesn't zodb has a table of some form for this info? I heard that  
sometimes for very small objects the string containing this  
information can use up to 30% of the whole space of the file (using  
FileStorage). How does RelStorage store this?

ps: I should probably look around on code to find this, but I'm asking  
so that I know why it was made the way it is.

--
Leonardo Santagada
santagada at gmail.com





More information about the ZODB-Dev mailing list