Re: Migrating to BTrees 4.x

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPDm-FjiHnvvtmRCL39GLSpfPFBD5Va8Xx08zCoxMYaXmD7PzQ@mail.gmail.com>
On Sun, Nov 27, 2016 at 4:43 PM, David Glick (Glick Software) <
[email protected]> wrote:

> On 11/27/16 9:43 AM, Jim Fulton wrote:
>
>
>
> On Sat, Nov 26, 2016 at 8:55 PM, David Glick <[email protected]> wrote:
>
>> On 11/20/16 9:31 AM, Jim Fulton wrote:
>>
>>
>>
>> On Sun, Nov 20, 2016 at 12:11 PM, Jason Madden <
>> [email protected]> wrote:
>>
>> ...

> It looks like David was going to try a fix. David, did this discussion
>> help?
>>
>>
>> I finally had time to look at this again today. I've got a branch
>> (check-obj-cmp-on-insert-only) that makes the CPython implementation only
>> do the check on insertion so it's more like the Python implementation.
>> However, trying to delete None as a key still raises "TypeError:
>> unorderable types: NoneType() < NoneType()" in Python 3 (both
>> implementations; we weren't testing the pure-Python implementation on
>> Python 3 except for PyPy3). This is presumably Python itself complaining
>> when trying to search for the bucket. I suppose the workaround is: for the
>> search during delete only, if the keys use default comparison, compare them
>> using a function that mimics Python 2 comparison and thus skips the check
>> for unorderable types. Gaaa...
>>
>
> Well
>
> a) We don't have a way to use databases created in Python 2 in Python 3
> (do we?).
>
> b) It's impossible to insert None as a key in Python 3.
>
> If a & b, then this seems to be a non-issue and the tests should be Python
> version dependent.
>
> I was thinking the same thing, and I've opened a pull request:
> https://github.com/zopefoundation/BTrees/pull/54
>

This got merged a couple of weeks ago.

I just made a release with this fix.  Thanks!

Jim

-- 
Jim Fulton
http://jimfulton.info

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.