[Zope-dev] ZCatalog regression: indexing None values

Hanno Schlichting hanno at hannosch.eu
Sun Mar 1 11:25:04 CET 2015


yuppie <y.2015 <at> wcm-solutions.de> writes:
> I'd say it is no longer possible to store None values in the index, but
> it's a different question if the attempt to index them is silently
> ignored or if an error is raised.
> 
> AFAICS migrating existing code and persistent objects is much easier and
> in most cases unnecessary if None values are silently ignored.

As the one who wrote that patch: My idea was only to raise a more meaningful
TypeError from the catalog code, instead of a the very general "object has
default comparision" TypeError raised by BTrees.

Silently ignoring None values would also be a good approach. Or maybe one
could change the 3.1.x releases to log a deprecation warning when None is
indexed, and create a 4.0 release series where None is silently ignored.

That way people have a chance to find the places where None is indexed
and review whether or not this makes a difference in each specific case.

Hanno

P.S. Please cc' me on replies, I only read this mailing list every couple of
weeks through the web interface.




More information about the Zope-Dev mailing list