[Checkins] SVN: zope.app.undo/trunk/ - Import hooks functionality from zope.component after it was moved there from

Thomas Lotze tl at gocept.com
Thu Nov 19 16:43:17 EST 2009


Log message for revision 105890:
  - Import hooks functionality from zope.component after it was moved there from
    zope.site.
  - Import ISite from zope.component after it was moved there from
    zope.location.
  

Changed:
  U   zope.app.undo/trunk/CHANGES.txt
  U   zope.app.undo/trunk/src/zope/app/undo/tests/test_zodbundomanager.py

-=-
Modified: zope.app.undo/trunk/CHANGES.txt
===================================================================
--- zope.app.undo/trunk/CHANGES.txt	2009-11-19 21:12:04 UTC (rev 105889)
+++ zope.app.undo/trunk/CHANGES.txt	2009-11-19 21:43:17 UTC (rev 105890)
@@ -9,6 +9,13 @@
 
 - Remove zcml slug file and zpkg stuff.
 
+- Import hooks functionality from zope.component after it was moved there from
+  zope.site.
+
+- Import ISite from zope.component after it was moved there from
+  zope.location.
+
+
 3.5.0 (2009-02-01)
 ------------------
 

Modified: zope.app.undo/trunk/src/zope/app/undo/tests/test_zodbundomanager.py
===================================================================
--- zope.app.undo/trunk/src/zope/app/undo/tests/test_zodbundomanager.py	2009-11-19 21:12:04 UTC (rev 105889)
+++ zope.app.undo/trunk/src/zope/app/undo/tests/test_zodbundomanager.py	2009-11-19 21:43:17 UTC (rev 105890)
@@ -20,6 +20,8 @@
 import transaction
 
 import zope.component
+import zope.component.hooks
+import zope.component.interfaces
 from zope.interface import implements
 from zope.testing.cleanup import CleanUp
 from zope.component import getUtility
@@ -31,14 +33,13 @@
 from zope.security.interfaces import IPrincipal
 
 from zope.authentication.interfaces import IAuthentication, PrincipalLookupError
-from zope.location.interfaces import ISite
 from zope.site import queryNextUtility
-from zope.site.hooks import setSite, setHooks
 from zope.site.site import SiteManagerAdapter
 
 from zope.app.undo import ZODBUndoManager
 from zope.app.undo.interfaces import UndoError
 
+
 testdata = [
     dict(id='1', user_name='/ jim', time=time(), description='des 1',
          location=u'/spam\N{CYRILLIC CAPITAL LETTER A}/1'),
@@ -94,7 +95,7 @@
 
 
 class StubSite(Location):
-    implements(ISite)
+    implements(zope.component.interfaces.ISite)
 
     def __init__(self):
         self._sm = Components(bases=(zope.component.getGlobalSiteManager(),))
@@ -137,8 +138,8 @@
 
         # make a local authentication utility in an active site
         site = StubSite()
-        setSite(site)
-        setHooks()
+        zope.component.hooks.setSite(site)
+        zope.component.hooks.setHooks()
         localPrincipalRegistry = LocalPrincipalRegistry()
         localPrincipalRegistry.definePrincipal('local.marco', 'Marco Mariani',
                                                login=u'marco')



More information about the checkins mailing list