Re: ZCatalog regression: indexing None values

Patrick Gerken <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <20150205122854.GD8019@boss>
Hi,

it should be said that the commit you mention clearly states the change
you describe, updates the version number to make sure this won't be
a patch and explains why he changed the behavior. namely to stay
compatible with BTrees 4.

Without looking into this more I'd say this is a required update to work
With Python 3.

On 05.02 12:36, yuppie wrote:
> Hi!
> 
> 
> Indexes shipped with ZCatalog 3 no longer work with None values:
> 
> https://github.com/zopefoundation/Products.ZCatalog/commit/c378cdab2fb8997af1a17261458a1528e7131243
> 
> I'm not sure if the old behavior did follow a well defined policy, I
> just found this explanation:
> 
> http://stackoverflow.com/a/11224076
> 
> I think in general the policy was to ignore None values if the index
> can't handle them. And AFAICS that's a much better policy than raising
> errors as ZCatalog 3 does.
> 
> There is nothing wrong about None values returned by content attributes.
> Often they have a special meaning like not initialized, not selected,
> not specified. In most cases it wouldn't cause trouble if None is not
> indexed, but it causes trouble if indexing raises errors.
> 
> Adjusting code that implements special behavior for None, adjusting
> persistent attributes that contain None or adding wrappers that modify
> indexed attributes is a lot of work.
> 
> I propose to ignore None values instead of raising errors.
> 
> 
> Cheers,
> 
> 	Yuppie
> _______________________________________________
> 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 )
>

_______________________________________________
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 )
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJU02IGAAoJENZ7kJH0+P18fhoP/05BIXaWoKVZy7jSFee24wK9
cXd2xMZGciB0I1PSv9Wg7L6v8hoQZ80caVSRvULV0XZ0ThQfa6gqyTZsbj3y8Pt4
5ZRt8jwox1ADUs0/CFFbXIIcWOOS2bqXPVYQipY189NZNovd4sLY/2xc9+qDPDCH
nOU5LisAdPJNgrrR4n6/XYyzeYBX1AFWeF3QJfm7D460pV7zSI9gHyb9MDgtE3Xb
rhQijncjoEPunLIBCTnVp1JmE1Na7oG7E5MTivb+0H15jacVcBiSkSha+8BCIsO1
iEtFli5FHARMqca/obnskYczL6LH7u+hK5+QAwcuK0xR4h/FLZBkpWuLS4DXI6Z7
aigkSoLFmPiJ4gdXJOlfdxFxKcubNQ8uwZHU4HeHH5syZQRkDM4F3RZr13bJlJK7
uBQfivFNSkNyXAAbYjrjpChli89ElDJxz+27C57+PTLJ/b7EnF7kOdy0hki0yrre
GMTaVi7JJJWvftHVUF4fen8lQLCQBFK6f6983D5K4kj62nJ3SA25tDi2h7K1WG03
P2CGFPkzHLrxEWYzx6PI6ulX/J7qs1QnnN0aS11M02ybyRwSXzVHJy17J4MhhEUX
nvdm8IdUWXxoT7oiPzPm9DMfFCyltyApLlaC2eCkIWakg+w9NwFROOHASuTjRlEw
NHmslv6FCWu1g5jfhVa1
=KQJZ
-----END PGP SIGNATURE-----
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.