[Zope-CMF] cmf-tests -
Hanno Schlichting
hanno at hannosch.eu
Mon Mar 4 23:02:00 UTC 2013
Tres Seaver <tseaver at ...> writes:
> On 03/04/2013 06:46 AM, Maurits van Rees wrote:
>
> > If that commit helps, then some test errors will show up in
> > Products.CMFDefault, mostly this:
> >
> > TypeError: Object has default comparison
>
> New BTrees expects objects used as keys to have "real" comparison
> semantics: Python's default (based on id()) is not suitable for
> persistent objects.
The most common source of this warning is trying to store `None`:
>>> from BTrees.OOBTree import OOBTree
>>> tree = OOBTree()
>>> tree[1] = 1
>>> tree[None] = 2
Traceback (most recent call last):
File "<console>", line 1, in <module>
TypeError: Object has default comparison
Unfortunately the ZCatalog has advertised support for storing None for
some time, so there's likely some code out there which uses this.
Hanno
More information about the Zope-CMF
mailing list