[ZODB-Dev] Delete an object in a IOBTree

Martronic SA martronic at martronic.ch
Fri Aug 5 08:57:16 EDT 2011


Thank you Adam!

Great! Your procudre works perfectly!! :)

Thank you very much!

Fabien Moret
Martronic SA

Le 05.08.2011 12:17, Adam GROSZER a écrit :
> Hello,
>
> On Fri, 05 Aug 2011 11:56:40 +0200 you wrote:
>>
>> Hello!
>>
>> I'm having a KeyReferenceToPersistent object in  IOBTree.__getstate__()
>> that I don't see in IOBTree.items().
>>
>> Is there a way to remove it?
>>
>> In that KeyReferenceToPersistent I think there is an instance of a no
>> longer existing class (broken).
>>
>
> BTrees had a bug earlier that kept some already deleted key-values 
> referenced.
>
> Worst case I'd build a new BTree:
>
> old = some.object.attribute
> new = old.__class__()
> for k,v in old.items():
>     new[k] = v
> some.object.attribute = new


More information about the ZODB-Dev mailing list