[Zope3-checkins] CVS: Zope3/src/zope/app/index - processors.py:1.10 queries.py:1.5 subscribers.py:1.16
Steve Alexander
steve@cat-box.net
Sat, 7 Jun 2003 02:37:56 -0400
Update of /cvs-repository/Zope3/src/zope/app/index
In directory cvs.zope.org:/tmp/cvs-serv4294/src/zope/app/index
Modified Files:
processors.py queries.py subscribers.py
Log Message:
updated to use new-style interface declarations
=== Zope3/src/zope/app/index/processors.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/index/processors.py:1.9 Tue May 27 10:18:16 2003
+++ Zope3/src/zope/app/index/processors.py Sat Jun 7 02:37:26 2003
@@ -26,6 +26,7 @@
from zope.component import getAdapter, getService
from zope.app.services.servicenames import HubIds
from zope.context import ContextMethod
+from zope.interface import implements
class ObjectRetrievingProcessor:
"""Converts a RankedHubIdList into an iteratable
@@ -33,7 +34,7 @@
from the ObjectHub.
"""
- __implements__ = IQueryProcessor
+ implements(IQueryProcessor)
inputInterfaces = (IRankedHubIdList, IBatchedResult)
outputInterfaces = (IRankedObjectIterator,)
@@ -56,7 +57,7 @@
class RankedObjectIterator:
"""Iterates over a given list of IRankedObjectRecord."""
- __implements__ = IRankedObjectIterator, IBatchedResult
+ implements(IRankedObjectIterator, IBatchedResult)
def __init__(self, recordlist, objectfetcher, startposition,
batchsize, totalsize):
@@ -81,7 +82,7 @@
__slots__ = ["rank", "object"]
- __implements__ = IRankedObjectRecord
+ implements(IRankedObjectRecord)
def __init__(self, object, rank):
self.rank = rank
=== Zope3/src/zope/app/index/queries.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/index/queries.py:1.4 Thu May 1 15:35:18 2003
+++ Zope3/src/zope/app/index/queries.py Sat Jun 7 02:37:26 2003
@@ -16,12 +16,13 @@
$Id$
"""
-from zope.app.interfaces.index.interfaces\
- import IBatchedResult, IRankedHubIdList
+from zope.app.interfaces.index.interfaces import IBatchedResult
+from zope.app.interfaces.index.interfaces import IRankedHubIdList
+from zope.interface import implements
class BatchedRankedResult:
- __implements__ = IBatchedResult, IRankedHubIdList
+ implements(IBatchedResult, IRankedHubIdList)
def __init__(self, hubidlist, startposition, batchsize, totalsize):
self.__hubidlist = hubidlist
=== Zope3/src/zope/app/index/subscribers.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/index/subscribers.py:1.15 Tue May 27 10:18:16 2003
+++ Zope3/src/zope/app/index/subscribers.py Sat Jun 7 02:37:26 2003
@@ -29,7 +29,7 @@
"""
__metaclass__ = type
-from zope.interface import Interface
+from zope.interface import Interface, implements
from persistence import Persistent
from zope.app.interfaces.event import ISubscriber
@@ -58,7 +58,7 @@
class Registration(Persistent):
- __implements__ = ISubscriptionControl, ISubscriber
+ implements(ISubscriptionControl, ISubscriber)
def notify(wrapped_self, event):
"""An event occured. Perhaps register this object with the hub."""