[Zope-Checkins] SVN: Zope/trunk/src/ - updated imports

Yvo Schubbe cvs-admin at zope.org
Wed Jul 18 07:06:17 UTC 2012


Log message for revision 127347:
  - updated imports

Changed:
  U   Zope/trunk/src/OFS/ObjectManager.py
  UU  Zope/trunk/src/OFS/event.py
  UU  Zope/trunk/src/OFS/interfaces.py
  U   Zope/trunk/src/OFS/tests/event.txt
  U   Zope/trunk/src/OFS/tests/testCopySupportEvents.py
  UU  Zope/trunk/src/Products/Five/browser/tests/test_pagetemplatefile.py
  U   Zope/trunk/src/Products/Five/component/__init__.py
  U   Zope/trunk/src/Products/Five/component/component.txt
  U   Zope/trunk/src/Products/Five/component/makesite.txt
  UU  Zope/trunk/src/Products/Five/viewlet/manager.py

-=-
Modified: Zope/trunk/src/OFS/ObjectManager.py
===================================================================
--- Zope/trunk/src/OFS/ObjectManager.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/OFS/ObjectManager.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -50,12 +50,12 @@
 from webdav.Lockable import ResourceLockedError
 from webdav.NullResource import NullResource
 from zExceptions import BadRequest
+from zope.container.contained import notifyContainerModified
+from zope.event import notify
 from zope.interface import implements
-from zope.component.interfaces import ComponentLookupError
-from zope.event import notify
+from zope.interface.interfaces import ComponentLookupError
 from zope.lifecycleevent import ObjectAddedEvent
 from zope.lifecycleevent import ObjectRemovedEvent
-from zope.container.contained import notifyContainerModified
 
 from OFS.CopySupport import CopyContainer
 from OFS.interfaces import IObjectManager

Modified: Zope/trunk/src/OFS/event.py
===================================================================
--- Zope/trunk/src/OFS/event.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/OFS/event.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -16,11 +16,12 @@
 """
 
 from zope.interface import implements
-from zope.component.interfaces import ObjectEvent
+from zope.interface.interfaces import ObjectEvent
 import OFS.interfaces
 
 
 class ObjectWillBeMovedEvent(ObjectEvent):
+
     """An object will be moved."""
     implements(OFS.interfaces.IObjectWillBeMovedEvent)
 
@@ -31,7 +32,9 @@
         self.newParent = newParent
         self.newName = newName
 
+
 class ObjectWillBeAddedEvent(ObjectWillBeMovedEvent):
+
     """An object will be added to a container."""
     implements(OFS.interfaces.IObjectWillBeAddedEvent)
 
@@ -43,7 +46,9 @@
         ObjectWillBeMovedEvent.__init__(self, object, None, None,
                                         newParent, newName)
 
+
 class ObjectWillBeRemovedEvent(ObjectWillBeMovedEvent):
+
     """An object will be removed from a container."""
     implements(OFS.interfaces.IObjectWillBeRemovedEvent)
 
@@ -55,6 +60,8 @@
         ObjectWillBeMovedEvent.__init__(self, object, oldParent, oldName,
                                         None, None)
 
+
 class ObjectClonedEvent(ObjectEvent):
+
     """An object has been cloned into a container."""
     implements(OFS.interfaces.IObjectClonedEvent)


Property changes on: Zope/trunk/src/OFS/event.py
___________________________________________________________________
Deleted: svn:keywords
   - Id

Modified: Zope/trunk/src/OFS/interfaces.py
===================================================================
--- Zope/trunk/src/OFS/interfaces.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/OFS/interfaces.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -17,6 +17,7 @@
 from zope.container.interfaces import IContainer
 from zope.interface import Attribute
 from zope.interface import Interface
+from zope.interface.interfaces import IObjectEvent
 from zope.location.interfaces import IRoot
 from zope.schema import Bool, BytesLine, Tuple
 
@@ -871,8 +872,6 @@
 ##################################################
 # Event interfaces
 
-from zope.component.interfaces import IObjectEvent
-
 class IObjectWillBeMovedEvent(IObjectEvent):
     """An object will be moved."""
     oldParent = Attribute("The old location parent for the object.")
@@ -880,12 +879,15 @@
     newParent = Attribute("The new location parent for the object.")
     newName = Attribute("The new location name for the object.")
 
+
 class IObjectWillBeAddedEvent(IObjectWillBeMovedEvent):
     """An object will be added to a container."""
 
+
 class IObjectWillBeRemovedEvent(IObjectWillBeMovedEvent):
     """An object will be removed from a container"""
 
+
 class IObjectClonedEvent(IObjectEvent):
     """An object has been cloned (a la Zope 2).
 


Property changes on: Zope/trunk/src/OFS/interfaces.py
___________________________________________________________________
Deleted: svn:keywords
   - Id

Modified: Zope/trunk/src/OFS/tests/event.txt
===================================================================
--- Zope/trunk/src/OFS/tests/event.txt	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/OFS/tests/event.txt	2012-07-18 07:06:13 UTC (rev 127347)
@@ -51,12 +51,13 @@
 framework's ones, so ours will be called first. This has the effect that
 printed events will be in their "natural" order::
 
-  >>> from zope.component.interfaces import IObjectEvent, IRegistrationEvent
+  >>> from zope.interface.interfaces import IObjectEvent
+  >>> from zope.interface.interfaces import IRegistrationEvent
+  >>> from zope.lifecycleevent.interfaces import IObjectCopiedEvent
   >>> from zope.lifecycleevent.interfaces import IObjectMovedEvent
-  >>> from zope.lifecycleevent.interfaces import IObjectCopiedEvent
+  >>> from OFS.interfaces import IItem
+  >>> from OFS.interfaces import IObjectClonedEvent
   >>> from OFS.interfaces import IObjectWillBeMovedEvent
-  >>> from OFS.interfaces import IObjectClonedEvent
-  >>> from OFS.interfaces import IItem
   >>> def printObjectEvent(object, event):
   ...     print event.__class__.__name__, object.getId()
   >>> def printObjectEventExceptSome(object, event):

Modified: Zope/trunk/src/OFS/tests/testCopySupportEvents.py
===================================================================
--- Zope/trunk/src/OFS/tests/testCopySupportEvents.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/OFS/tests/testCopySupportEvents.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -5,23 +5,19 @@
 
 import transaction
 
-from Testing.makerequest import makerequest
+from zope import component
+from zope import interface
+from zope.interface.interfaces import IObjectEvent
+from zope.testing import cleanup
 
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
-
-from OFS.SimpleItem import SimpleItem
 from OFS.Folder import Folder
-
+from OFS.SimpleItem import SimpleItem
+from Testing.makerequest import makerequest
 from Zope2.App import zcml
 
-from zope import interface
-from zope import component
-from zope.component.interfaces import IObjectEvent
 
-from zope.testing import cleanup
-
-
 class EventLogger(object):
     def __init__(self):
         self.reset()
@@ -38,6 +34,7 @@
 class ITestItem(interface.Interface):
     pass
 
+
 class TestItem(SimpleItem):
     interface.implements(ITestItem)
     def __init__(self, id):
@@ -47,6 +44,7 @@
 class ITestFolder(interface.Interface):
     pass
 
+
 class TestFolder(Folder):
     interface.implements(ITestFolder)
     def __init__(self, id):
@@ -330,4 +328,3 @@
     suite.addTest(makeSuite(TestCopySupport))
     suite.addTest(makeSuite(TestCopySupportSublocation))
     return suite
-

Modified: Zope/trunk/src/Products/Five/browser/tests/test_pagetemplatefile.py
===================================================================
--- Zope/trunk/src/Products/Five/browser/tests/test_pagetemplatefile.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/Products/Five/browser/tests/test_pagetemplatefile.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -1,5 +1,6 @@
 import unittest
 
+
 class ViewPageTemplateFileTests(unittest.TestCase):
 
     def setUp(self):
@@ -192,7 +193,7 @@
         return self._getTargetClass()(ob, request)
 
     def test___getitem___miss(self):
-        from zope.component import ComponentLookupError
+        from zope.interface.interfaces import ComponentLookupError
         mapper = self._makeOne()
         self.assertRaises(ComponentLookupError, mapper.__getitem__, 'nonesuch')
 


Property changes on: Zope/trunk/src/Products/Five/browser/tests/test_pagetemplatefile.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: Zope/trunk/src/Products/Five/component/__init__.py
===================================================================
--- Zope/trunk/src/Products/Five/component/__init__.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/Products/Five/component/__init__.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -17,9 +17,9 @@
 import zope.component
 import zope.event
 import zope.interface
-from zope.component.interfaces import IComponentLookup
 from zope.component.interfaces import IPossibleSite
 from zope.component.interfaces import ISite
+from zope.interface.interfaces import IComponentLookup
 from zope.traversing.interfaces import BeforeTraverseEvent
 
 import ExtensionClass
@@ -64,7 +64,7 @@
     # We want the original object, not stuff in between, and no acquisition
     obj = aq_base(obj)
     if not IPossibleSite.providedBy(obj):
-        raise TypeError, 'Must provide IPossibleSite'
+        raise TypeError('Must provide IPossibleSite')
     hook = NameCaller(HOOK_NAME)
     registerBeforeTraverse(obj, hook, HOOK_NAME, 1)
 

Modified: Zope/trunk/src/Products/Five/component/component.txt
===================================================================
--- Zope/trunk/src/Products/Five/component/component.txt	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/Products/Five/component/component.txt	2012-07-18 07:06:13 UTC (rev 127347)
@@ -30,7 +30,7 @@
 When we adapt the site itself, we obviously get its component
 registry:
 
-  >>> from zope.component.interfaces import IComponentLookup
+  >>> from zope.interface.interfaces import IComponentLookup
   >>> IComponentLookup(site) is components
   True
  

Modified: Zope/trunk/src/Products/Five/component/makesite.txt
===================================================================
--- Zope/trunk/src/Products/Five/component/makesite.txt	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/Products/Five/component/makesite.txt	2012-07-18 07:06:13 UTC (rev 127347)
@@ -56,7 +56,7 @@
 component registry:
 
     >>> sm = app.folder.getSiteManager()
-    >>> from zope.component.interfaces import IComponents
+    >>> from zope.interface.interfaces import IComponents
     >>> IComponents.providedBy(sm)
     True
 

Modified: Zope/trunk/src/Products/Five/viewlet/manager.py
===================================================================
--- Zope/trunk/src/Products/Five/viewlet/manager.py	2012-07-16 09:25:46 UTC (rev 127346)
+++ Zope/trunk/src/Products/Five/viewlet/manager.py	2012-07-18 07:06:13 UTC (rev 127347)
@@ -27,7 +27,7 @@
     """A base class for Viewlet managers to work in Zope2"""
 
     template = None
-    
+
     def __getitem__(self, name):
         """See zope.interface.common.mapping.IReadMapping"""
         # Find the viewlet
@@ -37,7 +37,7 @@
 
         # If the viewlet was not found, then raise a lookup error
         if viewlet is None:
-            raise zope.component.interfaces.ComponentLookupError(
+            raise zope.interface.interfaces.ComponentLookupError(
                 'No provider with name `%s` found.' %name)
 
         # If the viewlet cannot be accessed, then raise an
@@ -77,7 +77,7 @@
 
 def ViewletManager(name, interface, template=None, bases=()):
     attrDict = {'__name__': name}
-    
+
     if template is not None:
         attrDict['template'] = ZopeTwoPageTemplateFile(template)
 


Property changes on: Zope/trunk/src/Products/Five/viewlet/manager.py
___________________________________________________________________
Deleted: svn:keywords
   - Id



More information about the Zope-Checkins mailing list