Commit adbd86c9 authored by 's avatar

partially reverted r30994 to avoid infinite import loops

parent ae607650
...@@ -172,9 +172,9 @@ class DI_Tests(unittest.TestCase): ...@@ -172,9 +172,9 @@ class DI_Tests(unittest.TestCase):
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IDateIndex, DateIndex) verifyClass(IDateIndex, DateIndex)
verifyClass(IPluggableIndex, DateIndex) verifyClass(IPluggableIndex, DateIndex, 1)
verifyClass(ISortIndex, DateIndex) verifyClass(ISortIndex, DateIndex, 1)
verifyClass(IUniqueValueIndex, DateIndex) verifyClass(IUniqueValueIndex, DateIndex, 1)
def test_empty(self): def test_empty(self):
empty = self._index empty = self._index
......
...@@ -88,9 +88,9 @@ class DRI_Tests( unittest.TestCase ): ...@@ -88,9 +88,9 @@ class DRI_Tests( unittest.TestCase ):
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IDateRangeIndex, DateRangeIndex) verifyClass(IDateRangeIndex, DateRangeIndex)
verifyClass(IPluggableIndex, DateRangeIndex) verifyClass(IPluggableIndex, DateRangeIndex, 1)
verifyClass(ISortIndex, DateRangeIndex) verifyClass(ISortIndex, DateRangeIndex, 1)
verifyClass(IUniqueValueIndex, DateRangeIndex) verifyClass(IUniqueValueIndex, DateRangeIndex, 1)
def test_empty( self ): def test_empty( self ):
......
...@@ -100,9 +100,9 @@ class FieldIndexTests(unittest.TestCase): ...@@ -100,9 +100,9 @@ class FieldIndexTests(unittest.TestCase):
from Products.PluginIndexes.interfaces import IUniqueValueIndex from Products.PluginIndexes.interfaces import IUniqueValueIndex
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, FieldIndex) verifyClass(IPluggableIndex, FieldIndex, 1)
verifyClass(ISortIndex, FieldIndex) verifyClass(ISortIndex, FieldIndex, 1)
verifyClass(IUniqueValueIndex, FieldIndex) verifyClass(IUniqueValueIndex, FieldIndex, 1)
def testEmpty( self ): def testEmpty( self ):
"Test an empty FieldIndex." "Test an empty FieldIndex."
......
...@@ -120,9 +120,9 @@ class TestKeywordIndex( unittest.TestCase ): ...@@ -120,9 +120,9 @@ class TestKeywordIndex( unittest.TestCase ):
from Products.PluginIndexes.interfaces import IUniqueValueIndex from Products.PluginIndexes.interfaces import IUniqueValueIndex
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, KeywordIndex) verifyClass(IPluggableIndex, KeywordIndex, 1)
verifyClass(ISortIndex, KeywordIndex) verifyClass(ISortIndex, KeywordIndex, 1)
verifyClass(IUniqueValueIndex, KeywordIndex) verifyClass(IUniqueValueIndex, KeywordIndex, 1)
def testAddObjectWOKeywords(self): def testAddObjectWOKeywords(self):
......
...@@ -30,7 +30,6 @@ from Products.PluginIndexes import PluggableIndex ...@@ -30,7 +30,6 @@ from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common import safe_callable from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.common.util import parseIndexRequest from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPathIndex from Products.PluginIndexes.interfaces import IPathIndex
from Products.PluginIndexes.interfaces import IUniqueValueIndex
_marker = [] _marker = []
LOG = getLogger('Zope.PathIndex') LOG = getLogger('Zope.PathIndex')
...@@ -53,7 +52,7 @@ class PathIndex(Persistent, SimpleItem): ...@@ -53,7 +52,7 @@ class PathIndex(Persistent, SimpleItem):
""" """
__implements__ = (PluggableIndex.UniqueValueIndex,) __implements__ = (PluggableIndex.UniqueValueIndex,)
implements(IPathIndex, IUniqueValueIndex) implements(IPathIndex)
meta_type="PathIndex" meta_type="PathIndex"
......
...@@ -75,7 +75,7 @@ class PathIndexTests(unittest.TestCase): ...@@ -75,7 +75,7 @@ class PathIndexTests(unittest.TestCase):
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IPathIndex, PathIndex) verifyClass(IPathIndex, PathIndex)
verifyClass(IUniqueValueIndex, PathIndex) verifyClass(IUniqueValueIndex, PathIndex, 1)
def testEmpty(self): def testEmpty(self):
self.assertEqual(self._index.numObjects() ,0) self.assertEqual(self._index.numObjects() ,0)
......
...@@ -34,7 +34,6 @@ from Products.PluginIndexes import PluggableIndex ...@@ -34,7 +34,6 @@ from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common import safe_callable from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.common.ResultList import ResultList from Products.PluginIndexes.common.ResultList import ResultList
from Products.PluginIndexes.common.util import parseIndexRequest from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.PluginIndexes.interfaces import ITextIndex from Products.PluginIndexes.interfaces import ITextIndex
from Lexicon import Lexicon from Lexicon import Lexicon
...@@ -78,7 +77,7 @@ class TextIndex(Persistent, Implicit, SimpleItem): ...@@ -78,7 +77,7 @@ class TextIndex(Persistent, Implicit, SimpleItem):
""" """
__implements__ = (PluggableIndex.PluggableIndexInterface,) __implements__ = (PluggableIndex.PluggableIndexInterface,)
implements(ITextIndex, IPluggableIndex) implements(ITextIndex)
meta_type='TextIndex' meta_type='TextIndex'
......
...@@ -92,7 +92,7 @@ class Tests(unittest.TestCase): ...@@ -92,7 +92,7 @@ class Tests(unittest.TestCase):
from Products.PluginIndexes.TextIndex.TextIndex import TextIndex from Products.PluginIndexes.TextIndex.TextIndex import TextIndex
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, TextIndex) verifyClass(IPluggableIndex, TextIndex, 1)
verifyClass(ITextIndex, TextIndex) verifyClass(ITextIndex, TextIndex)
def test_SimpleAddDelete(self): def test_SimpleAddDelete(self):
......
...@@ -25,7 +25,6 @@ from zope.interface import implements ...@@ -25,7 +25,6 @@ from zope.interface import implements
from Products.PluginIndexes import PluggableIndex from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common.util import parseIndexRequest from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.PluginIndexes.interfaces import ITopicIndex from Products.PluginIndexes.interfaces import ITopicIndex
import FilteredSet import FilteredSet
...@@ -43,7 +42,7 @@ class TopicIndex(Persistent, SimpleItem): ...@@ -43,7 +42,7 @@ class TopicIndex(Persistent, SimpleItem):
""" """
__implements__ = (PluggableIndex.PluggableIndexInterface,) __implements__ = (PluggableIndex.PluggableIndexInterface,)
implements(ITopicIndex, IPluggableIndex) implements(ITopicIndex)
meta_type="TopicIndex" meta_type="TopicIndex"
query_options = ('query','operator') query_options = ('query','operator')
......
...@@ -71,7 +71,7 @@ class TestTopicIndex(TestBase): ...@@ -71,7 +71,7 @@ class TestTopicIndex(TestBase):
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(ITopicIndex, TopicIndex) verifyClass(ITopicIndex, TopicIndex)
verifyClass(IPluggableIndex, TopicIndex) verifyClass(IPluggableIndex, TopicIndex, 1)
def testOr(self): def testOr(self):
self._searchOr('doc1',[1,2]) self._searchOr('doc1',[1,2])
......
...@@ -24,14 +24,10 @@ from BTrees.IOBTree import IOBTree ...@@ -24,14 +24,10 @@ from BTrees.IOBTree import IOBTree
import BTrees.Length import BTrees.Length
from BTrees.OOBTree import OOBTree from BTrees.OOBTree import OOBTree
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
from zope.interface import implements
from Products.PluginIndexes import PluggableIndex from Products.PluginIndexes import PluggableIndex
from Products.PluginIndexes.common import safe_callable from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.common.util import parseIndexRequest from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.PluginIndexes.interfaces import ISortIndex
from Products.PluginIndexes.interfaces import IUniqueValueIndex
_marker = [] _marker = []
LOG = getLogger('Zope.UnIndex') LOG = getLogger('Zope.UnIndex')
...@@ -44,7 +40,6 @@ class UnIndex(SimpleItem): ...@@ -44,7 +40,6 @@ class UnIndex(SimpleItem):
__implements__ = (PluggableIndex.UniqueValueIndex, __implements__ = (PluggableIndex.UniqueValueIndex,
PluggableIndex.SortIndex) PluggableIndex.SortIndex)
implements(IPluggableIndex, IUniqueValueIndex, ISortIndex)
def __init__( def __init__(
self, id, ignore_ex=None, call_methods=None, extra=None, caller=None): self, id, ignore_ex=None, call_methods=None, extra=None, caller=None):
......
...@@ -31,7 +31,6 @@ from Products.PluginIndexes.common.PluggableIndex import \ ...@@ -31,7 +31,6 @@ from Products.PluginIndexes.common.PluggableIndex import \
PluggableIndexInterface PluggableIndexInterface
from Products.PluginIndexes.common.util import parseIndexRequest from Products.PluginIndexes.common.util import parseIndexRequest
from Products.PluginIndexes.common import safe_callable from Products.PluginIndexes.common import safe_callable
from Products.PluginIndexes.interfaces import IPluggableIndex
from Products.ZCTextIndex.ILexicon import ILexicon from Products.ZCTextIndex.ILexicon import ILexicon
from Products.ZCTextIndex.Lexicon import \ from Products.ZCTextIndex.Lexicon import \
...@@ -55,7 +54,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem): ...@@ -55,7 +54,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
""" """
__implements__ = PluggableIndexInterface __implements__ = PluggableIndexInterface
implements(IZCTextIndex, IPluggableIndex) implements(IZCTextIndex)
## Magic class attributes ## ## Magic class attributes ##
......
...@@ -267,7 +267,7 @@ class CosineIndexTests(ZCIndexTestsBase, testIndex.CosineIndexTest): ...@@ -267,7 +267,7 @@ class CosineIndexTests(ZCIndexTestsBase, testIndex.CosineIndexTest):
from Products.ZCTextIndex.interfaces import IZCTextIndex from Products.ZCTextIndex.interfaces import IZCTextIndex
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IPluggableIndex, ZCTextIndex) verifyClass(IPluggableIndex, ZCTextIndex, 1)
verifyClass(IZCTextIndex, ZCTextIndex) verifyClass(IZCTextIndex, ZCTextIndex)
def testRanking(self): def testRanking(self):
......
...@@ -37,10 +37,8 @@ from Products.PluginIndexes.common.PluggableIndex \ ...@@ -37,10 +37,8 @@ from Products.PluginIndexes.common.PluggableIndex \
import PluggableIndexInterface import PluggableIndexInterface
from Products.PluginIndexes.TextIndex import Splitter from Products.PluginIndexes.TextIndex import Splitter
from zLOG import LOG from zLOG import LOG
from zope.interface import implements
from Catalog import Catalog, CatalogError from Catalog import Catalog, CatalogError
from interfaces import IZCatalog as z3IZCatalog
from IZCatalog import IZCatalog as z2IZCatalog from IZCatalog import IZCatalog as z2IZCatalog
from ProgressHandler import ZLogHandler from ProgressHandler import ZLogHandler
from ZCatalogIndexes import ZCatalogIndexes from ZCatalogIndexes import ZCatalogIndexes
...@@ -83,7 +81,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -83,7 +81,6 @@ class ZCatalog(Folder, Persistent, Implicit):
""" """
__implements__ = z2IZCatalog __implements__ = z2IZCatalog
implements(z3IZCatalog)
meta_type = "ZCatalog" meta_type = "ZCatalog"
icon='misc_/ZCatalog/ZCatalog.gif' icon='misc_/ZCatalog/ZCatalog.gif'
......
...@@ -193,7 +193,7 @@ class TestZCatalog(unittest.TestCase): ...@@ -193,7 +193,7 @@ class TestZCatalog(unittest.TestCase):
from Products.ZCatalog.ZCatalog import ZCatalog from Products.ZCatalog.ZCatalog import ZCatalog
from zope.interface.verify import verifyClass from zope.interface.verify import verifyClass
verifyClass(IZCatalog, ZCatalog) verifyClass(IZCatalog, ZCatalog, 1)
def testGetMetadataForUID(self): def testGetMetadataForUID(self):
testNum = str(self.upper - 3) # as good as any.. testNum = str(self.upper - 3) # as good as any..
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment