[Checkins] SVN: zope.component/branches/jinty-optional-event/src/zope/component/ Work around circular import issues by moving zope.event duplicate implementation to a private _event.py

Brian Sutherland jinty at web.de
Thu Mar 4 10:53:29 EST 2010


Log message for revision 109651:
  Work around circular import issues by moving zope.event duplicate implementation to a private _event.py

Changed:
  A   zope.component/branches/jinty-optional-event/src/zope/component/_event.py
  U   zope.component/branches/jinty-optional-event/src/zope/component/event.py

-=-
Added: zope.component/branches/jinty-optional-event/src/zope/component/_event.py
===================================================================
--- zope.component/branches/jinty-optional-event/src/zope/component/_event.py	                        (rev 0)
+++ zope.component/branches/jinty-optional-event/src/zope/component/_event.py	2010-03-04 15:53:28 UTC (rev 109651)
@@ -0,0 +1,10 @@
+try:
+    # use zope.event if it's around
+    from zope.event import subscribers, notify
+except ImportError:
+    # if not, provide our own implementation
+    subscribers = []
+
+    def notify(event):
+        for subscriber in subscribers:
+            subscriber(event)


Property changes on: zope.component/branches/jinty-optional-event/src/zope/component/_event.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: zope.component/branches/jinty-optional-event/src/zope/component/event.py
===================================================================
--- zope.component/branches/jinty-optional-event/src/zope/component/event.py	2010-03-04 15:41:36 UTC (rev 109650)
+++ zope.component/branches/jinty-optional-event/src/zope/component/event.py	2010-03-04 15:53:28 UTC (rev 109651)
@@ -19,18 +19,8 @@
 __docformat__ = 'restructuredtext'
 
 import zope.component.interfaces
+from zope.component._event import subscribers, notify
 
-try:
-    # use zope.event if it's around
-    from zope.event import subscribers, notify
-except ImportError:
-    # if not, provide our own implementation
-    subscribers = []
-
-    def notify(event):
-        for subscriber in subscribers:
-            subscriber(event)
-
 def dispatch(*event):
     zope.component.subscribers(event, None)
 



More information about the checkins mailing list