On Mon, Jul 22, 2013 at 9:06 PM, Christian Tismer <tis...@stackless.com> wrote:
>>> Actually, I would like to add a callable-check instead, to allow for more
>>> flexible derivatives.
>> I don't understand this.
> Simple: I am writing BTree forests for versioned, read-only databases.
> For that, I need a way to create a version of Bucket that allows to
> override the _next field by maybe a callable.
> Otherwise all the buckets are chained together and I have no way
> to let frozen BTrees share buckets.
In retrospect, it might make more sense to do the chaining a level up.
Buckets themselves don't care about chaining. The tree wants buckets
to be chained to support iteration. I'm not really sure if that helps your
> When I played with the structure, I was happy/astonished to see the _next
> being writable and thought it was intended to be so.
> It was not, in the end ;-)
It's clearly a bug. The code has a comment right above the attribute definition
stating that it's (supposed to be) read only, but the implementation makes
There doesn't seem to be anything that depends on writing this attribute.
I verified this by adding a fix and running the tests (in 3.10).
For what you're trying to do, I suspect you want to fork BTrees, or start
For more information about ZODB, see http://zodb.org/
ZODB-Dev mailing list - ZODB-Dev@zope.org