[Zope3-checkins] CVS: Zope3/src/zope/app/event - globalservice.py:1.10 subs.py:1.16
Steve Alexander
steve@cat-box.net
Sat, 7 Jun 2003 02:37:55 -0400
Update of /cvs-repository/Zope3/src/zope/app/event
In directory cvs.zope.org:/tmp/cvs-serv4294/src/zope/app/event
Modified Files:
globalservice.py subs.py
Log Message:
updated to use new-style interface declarations
=== Zope3/src/zope/app/event/globalservice.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/event/globalservice.py:1.9 Wed May 28 11:46:07 2003
+++ Zope3/src/zope/app/event/globalservice.py Sat Jun 7 02:37:24 2003
@@ -20,6 +20,7 @@
__metaclass__ = type
from zope.interface.type import TypeRegistry
+from zope.interface import implements
from zope.component import queryAdapter
from zope.exceptions import NotFoundError
from zope.proxy import removeAllProxies
@@ -55,7 +56,7 @@
if filter is not None:
filter = _context.resolve(filter)
-
+
return [
Action(
# subscriptions can never conflict
@@ -72,7 +73,7 @@
events sent out by Zope.
"""
- __implements__ = ISubscriber
+ implements(ISubscriber)
def __init__(self, severity=logging.INFO):
self.severity = severity
@@ -95,7 +96,7 @@
class GlobalSubscribable:
"""A global mix-in"""
- __implements__ = IGlobalSubscribable
+ implements(IGlobalSubscribable)
def __init__(self):
self._registry = TypeRegistry()
@@ -239,14 +240,14 @@
class GlobalEventChannel(GlobalSubscribable):
- __implements__ = IGlobalSubscribable, ISubscriber
+ implements(IGlobalSubscribable, ISubscriber)
notify = globalNotifyOrPublish
class GlobalEventPublisher(GlobalSubscribable):
- __implements__ = IGlobalSubscribable, IPublisher
+ implements(IGlobalSubscribable, IPublisher)
publish = globalNotifyOrPublish
=== Zope3/src/zope/app/event/subs.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/event/subs.py:1.15 Wed May 28 11:46:07 2003
+++ Zope3/src/zope/app/event/subs.py Sat Jun 7 02:37:24 2003
@@ -37,6 +37,7 @@
from zope.app.services.type import PersistentTypeRegistry
from cPickle import dumps, PicklingError
import logging
+from zope.interface import implements
__metaclass__ = type
@@ -53,7 +54,7 @@
class Subscribable(Persistent):
"""A local mix-in"""
- __implements__ = ISubscribable
+ implements(ISubscribable)
def __init__(self):
# the type registry
@@ -435,7 +436,7 @@
class SubscriptionTracker:
"Mix-in for subscribers that want to know to whom they are subscribed"
- __implements__ = ISubscribingAware
+ implements(ISubscribingAware)
def __init__(self):
self._subscriptions = ()