Re: ZCatalog regression: indexing None values

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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.


_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
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.