[Checkins] SVN: lovely.tag/trunk/ returning an empty IFTreeSet instead of None. for details see CHANGES.txt

Manfred Schwendinger manfred.schwendiger at lovelysystems.com
Wed Jul 18 12:58:39 EDT 2007


Log message for revision 78118:
  returning an empty IFTreeSet instead of None. for details see CHANGES.txt

Changed:
  U   lovely.tag/trunk/CHANGES.txt
  U   lovely.tag/trunk/setup.py
  U   lovely.tag/trunk/src/lovely/tag/index.py
  U   lovely.tag/trunk/src/lovely/tag/index.txt

-=-
Modified: lovely.tag/trunk/CHANGES.txt
===================================================================
--- lovely.tag/trunk/CHANGES.txt	2007-07-18 15:41:48 UTC (rev 78117)
+++ lovely.tag/trunk/CHANGES.txt	2007-07-18 16:58:38 UTC (rev 78118)
@@ -2,6 +2,15 @@
 Changes for lovely.tag
 ======================
 
+
+2007/07/18 0.3.0b2:
+===================
+
+- in case of a not matching query lovely.tag will not longer return
+  None but an empty IFTreeSet. (this is caused because zope.app.catalog
+  will ignore None which results in a boolean or operation)
+
+
 2007/06/13 0.3.0b1:
 ===================
 

Modified: lovely.tag/trunk/setup.py
===================================================================
--- lovely.tag/trunk/setup.py	2007-07-18 15:41:48 UTC (rev 78117)
+++ lovely.tag/trunk/setup.py	2007-07-18 16:58:38 UTC (rev 78118)
@@ -3,7 +3,7 @@
 
 setup (
     name='lovely.tag',
-    version='0.3.0b1',
+    version='0.3.0b2',
     author = "Lovely Systems",
     author_email = "office at lovelysystems.com",
     description = "A tagging engine for zope 3",
@@ -43,6 +43,6 @@
         'zope.schema',
         'zope.security'
         ],
-    dependency_links = ['http://download.zope.org/distribution'],
-    zip_safe = False,
+    dependency_links = ['http://download.zope.org/distribution']
     )
+

Modified: lovely.tag/trunk/src/lovely/tag/index.py
===================================================================
--- lovely.tag/trunk/src/lovely/tag/index.py	2007-07-18 15:41:48 UTC (rev 78117)
+++ lovely.tag/trunk/src/lovely/tag/index.py	2007-07-18 16:58:38 UTC (rev 78118)
@@ -67,7 +67,7 @@
         if items:
             items = [id for id in items]
             return IFTreeSet(items)
-        return None
+        return IFTreeSet()
 
     def clear(self):
         pass

Modified: lovely.tag/trunk/src/lovely/tag/index.txt
===================================================================
--- lovely.tag/trunk/src/lovely/tag/index.txt	2007-07-18 15:41:48 UTC (rev 78117)
+++ lovely.tag/trunk/src/lovely/tag/index.txt	2007-07-18 16:58:38 UTC (rev 78118)
@@ -21,9 +21,10 @@
   >>> from lovely.tag.interfaces import ITaggingEngine
   >>> engine = TaggingEngine()
   >>> component.provideUtility(engine, ITaggingEngine)
-  >>> index.apply({'any_of':['lovely']}) is None
-  True
+  >>> sorted(index.apply({'any_of':['lovely']}))
+  []
 
+
   >>> import zope.component
   >>> from zope.app.keyreference import testing
   >>> zope.component.provideAdapter(testing.SimpleKeyReference)



More information about the Checkins mailing list