[ZODB-Dev] Delete an object in a IOBTree

Adam GROSZER agroszer at gmail.com
Fri Aug 5 06:17:06 EDT 2011


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
-- 
Best regards,
  Adam GROSZER
--
Quote of the day:
A ship on the beach is a lighthouse to the sea.  -  Dutch proverb


More information about the ZODB-Dev mailing list