[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - Catalog.py:1.105

Chris McDonough chrism@zope.com
19 Jan 2003 03:27:00 -0500


I know it may be a case of "who cares, it's all f*ed up anyway", but the
Catalog module is supposed to be usable outside of Zope.  We shouldn't
add dependencies like this when this is the intent..

On Sun, 2003-01-19 at 03:01, Andreas Jung wrote:
> What is the problem with the dependancy of cDcoumentTemplate?
> 
> Andreas
> 
> --On Samstag, 18. Januar 2003 20:38 -0500 Chris McDonough <chrism@zope.com> 
> wrote:
> 
> > I don't think Catalog should depend on cDocumentTemplate.  Can we
> > instead create a safe_callable function that does the same thing as
> > cDocumentTemplate's safe_callable in the Catalog package somewhere?
> >
> >
> > On Fri, 2003-01-17 at 12:03, Andreas Jung wrote:
> >> Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
> >> In directory cvs.zope.org:/tmp/cvs-serv19868/lib/python/Products/ZCatalog
> >>
> >> Modified Files:
> >> 	Catalog.py
> >> Log Message:
> >> Collector #771: ZCatalog failed to index DTML Document if the name
> >> of a catalog metadata was identical with the name of an acquired
> >> object.
> >> ~
> >>
> >>
> >> === Zope/lib/python/Products/ZCatalog/Catalog.py 1.104 => 1.105 ===
> >> --- Zope/lib/python/Products/ZCatalog/Catalog.py:1.104	Wed Dec 11
> >> 13:56:58 2002 +++ Zope/lib/python/Products/ZCatalog/Catalog.py	Fri Jan
> >> 17 12:03:15 2003 @@ -22,7 +22,7 @@
> >>
> >>  from Lazy import LazyMap, LazyFilter, LazyCat, LazyValues
> >>  from CatalogBrains import AbstractCatalogBrain, NoBrainer
> >> -
> >> +from DocumentTemplate import cDocumentTemplate
> >>  from BTrees.IIBTree import intersection, weightedIntersection, IISet
> >>  from BTrees.OIBTree import OIBTree
> >>  from BTrees.IOBTree import IOBTree
> >> @@ -401,7 +401,7 @@
> >>          # the unique id is allways the first element
> >>          for x in self.names:
> >>              attr=getattr(object, x, MV)
> >> -            if(attr is not MV and callable(attr)): attr=attr()
> >> +            if(attr is not MV and
> >> cDocumentTemplate.safe_callable(attr)): attr=attr() record.append(attr)
> >>          return tuple(record)
> >>
> >>
> >>
> >> _______________________________________________
> >> Zope-Checkins maillist  -  Zope-Checkins@zope.org
> >> http://lists.zope.org/mailman/listinfo/zope-checkins
> > --
> > Chris McDonough <chrism@zope.com>
> > Zope Corporation
> >
> >
> > _______________________________________________
> > Zope-Checkins maillist  -  Zope-Checkins@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-checkins
> 
> 
> 
> 
>     ---------------------------------------------------------------------
>    -    Andreas Jung                     http://www.andreas-jung.com   -
>   -   EMail: andreas at andreas-jung.com                              -
>    -            "Life is too short to (re)write parsers"               -
>     ---------------------------------------------------------------------
-- 
Chris McDonough <chrism@zope.com>
Zope Corporation