[Zope-dev] small catalog cleanup

yuppie y.2007- at wcm-solutions.de
Thu Jan 18 07:02:31 EST 2007


Hi!


Just want to make sure I'm not missing something:


1. IPluggableIndex
------------------

Products.PluginIndexes.interfaces.IPluggableIndex has this method:

     def _apply_index(request, cid=''):
         """Apply the index to query parameters given in 'request'.

         [...]
         """

Some implementations have an additional 'type' argument. Neither 'cid' 
nor 'type' are used anywhere in Zope core.

The Catalog calls '_apply_index' just with the 'request' argument. 
That's the only place where '_apply_index' is used.

Looks like 'cid' and 'type' can be safely removed from interface and 
implementations.


2. parseIndexRequest
--------------------

The 'get' method of Products.PluginIndexes.common.util.parseIndexRequest 
returns the default value if the value is not true. This changes values 
like 0 or False to the default value.

Looks like a bug to me. But fixing this changes the behavior.


If there are no objections, I'll resolve these two issues on the Zope trunk.


Cheers,

	Yuppie




More information about the Zope-Dev mailing list