[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/LocalEventService - LocalEventService.py:1.8 LocalSubscribable.py:1.6
Gary Poster
gary@zope.com
Wed, 27 Nov 2002 21:45:47 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/LocalEventService
In directory cvs.zope.org:/tmp/cvs-serv11447
Modified Files:
LocalEventService.py LocalSubscribable.py
Log Message:
Some extra comments and a mildly paranoid reordering of superclasses. (I'm preparing for a branch and just wanted to get my general little small edits checked in before I did so; one more to go)
=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalEventService.py 1.7 => 1.8 ===
--- Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalEventService.py:1.7 Mon Nov 11 03:38:36 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalEventService.py Wed Nov 27 21:45:47 2002
@@ -106,15 +106,20 @@
def unbound(wrapped_self, name):
"see IBindingAware"
clean_self = removeAllProxies(wrapped_self)
- clean_self._v_unbinding = 1
+ clean_self._v_unbinding = True # [XXX not thread-safe; ok? it
+ # seems unlikely to cause problems in real-life usage]
# this flag is used by the unsubscribedFrom method (below) to
# determine that it doesn't need to further unsubscribe beyond
# what we're already doing.
- # wrapped_self._unbound(name) # or, instead, ...
- # ... this seems fine also, even though it's a ContextMethod:
- # ProtoServiceEventChannel.unbound(wrapped_self, name)
- # but in actuality we're doing a copy and paste because of
- # various wrapper/security problems:
+
+ # Both of the following approaches have wrapper/security
+ # problems:
+ #
+ # wrapped_self._unbound(name) # using _unbound above
+ # and
+ # ProtoServiceEventChannel.unbound(wrapped_self, name)
+ #
+ # so we're doing a copy and paste from ProtoServiceEventChannel:
# start copy/paste
subscriber = PathSubscriber(wrapped_self)
for subscription in clean_self._subscriptions:
=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalSubscribable.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalSubscribable.py:1.5 Mon Oct 21 02:14:46 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/LocalSubscribable.py Wed Nov 27 21:45:47 2002
@@ -26,7 +26,7 @@
from Zope.Event.Subscribable import Subscribable
from Persistence import Persistent
-class LocalSubscribable(Subscribable, Persistent):
+class LocalSubscribable(Persistent, Subscribable):
"""a local mix-in"""
__implements__ = (