[Zope3-checkins] CVS: Zope3/lib/python/Zope/Event - IEventService.py:1.7 ISubscribable.py:1.6 __init__.py:1.6 GlobalEventService.py:NONE IObjectEvent.py:NONE Logger.py:NONE ObjectEvent.py:NONE
Gary Poster
gary@zope.com
Sat, 21 Dec 2002 10:33:30 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Event
In directory cvs.zope.org:/tmp/cvs-serv30423/lib/python/Zope/Event
Modified Files:
IEventService.py ISubscribable.py __init__.py
Removed Files:
GlobalEventService.py IObjectEvent.py Logger.py ObjectEvent.py
Log Message:
Moves ObjectEvent, GlobalEventService, and Logger from the Zope.Event package to the Zope.App.Event package.
Does *not* redesign/refactor LocalEventService to accept paths and hubids and reject non-wrapped objects. Maybe later.
This checkin may require you to hose your Data.fs.
For quadruple checking, I'll send a note to zope3-dev when I've confirmed that a fresh checkout works.
=== Zope3/lib/python/Zope/Event/IEventService.py 1.6 => 1.7 ===
--- Zope3/lib/python/Zope/Event/IEventService.py:1.6 Thu Dec 5 12:20:29 2002
+++ Zope3/lib/python/Zope/Event/IEventService.py Sat Dec 21 10:32:59 2002
@@ -36,18 +36,3 @@
This is a policy decision for the IEventService.
"""
-class IGlobalEventService(IEventService):
- """The global event-service does not allow normal subscriptions.
-
- Subscriptions to the global event-service are not persistent.
- If you want to subscribe to the global event-service, you need
- to use the 'globalSubscribe' method instead of the 'subscribe'
- method.
- """
-
- def subscribe(subscriber, event_type=IEvent, filter=None):
- """Raises NotImplementedError."""
-
- def globalSubscribe(subscriber, event_type=IEvent, filter=None):
- """Add subscriber to the list of subscribers for the channel."""
-
=== Zope3/lib/python/Zope/Event/ISubscribable.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/Event/ISubscribable.py:1.5 Mon Nov 11 03:33:45 2002
+++ Zope3/lib/python/Zope/Event/ISubscribable.py Sat Dec 21 10:32:59 2002
@@ -27,31 +27,6 @@
"""Add subscriber to the list of subscribers for the channel.
subscriber must implement ISubscriber.
- Probable subscriber types include the following:
-
- o Hard Reference (for placeless, global objects and event service)
-
- Simply register the subscriber directly, in which
- case, the subscription, and possibly the subscriber,
- is as persistent as the subscribable. The subscriber
- will not be wrapped for context or security when
- called.
-
- o Soft reference (for placeful, local objects and event service)
-
- Register an object with a notify method and a path that
- dereferences the path and delegates notifications.
-
- o Location-independent reference (for placeful)
-
- Register an object with a notify method and an
- ObjectHub ruid that dereferences the ruid via the hub
- and delegates notifications.
-
- o Abstract reference (for both)
-
- Register an object with a notify method and an IReference that
- dereferences the IReference and delegates notifications.
event_type, if supplied, is the event interface
about which subscriber should be notified, and must implement
@@ -75,8 +50,6 @@
def unsubscribe(subscriber, event_type=None, filter=None):
"""Unsubscribe subscriber from receiving event types from this
subscribable.
-
- The subscriber is matched via equality (not identity).
If event_type is None, the default value, the subscriber is
unsubscribed completely for all event types from this
=== Zope3/lib/python/Zope/Event/__init__.py 1.5 => 1.6 ===
--- Zope3/lib/python/Zope/Event/__init__.py:1.5 Thu Dec 5 12:20:29 2002
+++ Zope3/lib/python/Zope/Event/__init__.py Sat Dec 21 10:32:59 2002
@@ -41,19 +41,6 @@
for event_type in event_types:
subscribe(subscriber, event_type, filter)
-def globalSubscribe(subscriber, event_type=IEvent, filter=None, context=None):
- if context is None:
- context = subscriber
- return getEventService(None).globalSubscribe(
- subscriber, event_type, filter)
-
-def globalSubscribeMany(subscriber, event_types=(IEvent,),
- filter=None, context=None):
- if context is None: context=subscriber
- subscribe_func = getEventService(None).globalSubscribe
- for event_type in event_types:
- subscribe_func(subscriber, event_type, filter)
-
def unsubscribe(subscriber, event_type=None, filter=None, context=None):
if context is None: context=subscriber
return getEventService(context).unsubscribe(
@@ -64,7 +51,3 @@
return getEventService(context).listSubscriptions(
subscriber, event_type)
-
-
-def _clear():
- from EventService import _clear; _clear()
=== Removed File Zope3/lib/python/Zope/Event/GlobalEventService.py ===
=== Removed File Zope3/lib/python/Zope/Event/IObjectEvent.py ===
=== Removed File Zope3/lib/python/Zope/Event/Logger.py ===
=== Removed File Zope3/lib/python/Zope/Event/ObjectEvent.py ===