[Zope3-checkins] CVS: Zope3/src/zope/app/event - subs.py:1.19

Jim Fulton jim at zope.com
Sun Sep 21 13:32:24 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/event
In directory cvs.zope.org:/tmp/cvs-serv13558/src/zope/app/event

Modified Files:
	subs.py 
Log Message:
No-longer use context wrappers.


=== Zope3/src/zope/app/event/subs.py 1.18 => 1.19 ===
--- Zope3/src/zope/app/event/subs.py:1.18	Mon Jun 30 15:52:31 2003
+++ Zope3/src/zope/app/event/subs.py	Sun Sep 21 13:31:53 2003
@@ -24,7 +24,6 @@
 
 from types import StringTypes
 
-from zope.context import ContextMethod
 from zope.proxy import removeAllProxies
 
 from zope.app.traversing import getPath
@@ -38,6 +37,7 @@
 from cPickle import dumps, PicklingError
 import logging
 from zope.interface import implements
+from zope.app.container.contained import Contained
 
 __metaclass__ = type
 
@@ -51,7 +51,7 @@
             yield count, item
             count += 1
 
-class Subscribable(Persistent):
+class Subscribable(Persistent, Contained):
     """A local mix-in"""
 
     implements(ISubscribable)
@@ -128,7 +128,6 @@
             subscribingaware.subscribedTo(wrapped_self, event_type, filter)
 
         return token
-    subscribe = ContextMethod(subscribe)
 
     def unsubscribe(wrapped_self, reference, event_type, filter=None):
         'See ISubscribable. Remove just one subscription.'
@@ -218,7 +217,6 @@
         subscribingaware = queryAdapter(wrappedobj, ISubscribingAware)
         if subscribingaware is not None:
             subscribingaware.unsubscribedFrom(wrapped_self, event_type, filter)
-    unsubscribe = ContextMethod(unsubscribe)
 
     def unsubscribeAll(wrapped_self, reference, event_type=IEvent):
         'See ISubscribable. Remove all matching subscriptions.'
@@ -283,7 +281,6 @@
 
         assert num_registrations_removed == num_subscriptions_removed
         return num_registrations_removed
-    unsubscribeAll = ContextMethod(unsubscribeAll)
 
     def resubscribeByHubId(wrapped_self, reference):
         'Where a subscriber has a hubId, resubscribe it by that hubid'
@@ -305,8 +302,6 @@
 
         self._resubscribe(path, clean_self._paths, hubId, clean_self._hubIds)
         
-    resubscribeByHubId = ContextMethod(resubscribeByHubId)
-
     def resubscribeByPath(wrapped_self, reference):
         clean_self = removeAllProxies(wrapped_self)
         cleanobj, wrappedobj, path, hubId, reftype = getWaysToSubscribe(
@@ -326,7 +321,6 @@
 
         num_converted = self._resubscribe(hubId, clean_self._hubIds,
                                           path, clean_self._paths)
-    resubscribeByPath = ContextMethod(resubscribeByPath)
 
     def iterSubscriptions(wrapped_self, reference=None, event_type=IEvent):
         '''See ISubscribable'''
@@ -336,7 +330,6 @@
             return wrapped_self._iterSomeSubscriptions(wrapped_self,
                                                        reference,
                                                        event_type)
-    iterSubscriptions = ContextMethod(iterSubscriptions)
 
     def _iterAllSubscriptions(self, wrapped_self, event_type):
         clean_self = removeAllProxies(wrapped_self)




More information about the Zope3-Checkins mailing list