[Zope-dev] new BTreeContainer implementation, please review

Benji York benji at zope.com
Fri Jun 13 15:49:55 EDT 2008


On Fri, Jun 13, 2008 at 3:40 PM, Christophe Combelles <ccomb at free.fr> wrote:

> While fixing some bugs in zope.app.container,
> I've also modified the implementation of the BTreeContainer,
> by not inheriting from the SampleContainer, and directly accessing the
> btree. This had remained as a TODO in the btree.py file, so I did it, but...
>
> The result is all previous persisted BTreeContainers (such as
> PrincipalFolder) are broken because the btree used to be stored in
> self._SampleContainer__data, while the new implementation stores it in
> self._BTreeContainer__data.
>
> So I've added a property to offer a transparent backward compatibility:

[snip]

> Do you think it is safe? Is there any better solution for this? Should I
> rather write an evolution script? Or should I revert all this back to
> inheriting from SampleContainer?

Another option would be to leave the attribute with the "wrong" name and
just add a note that it's for backward compatible.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope-Dev mailing list