[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/ Fix up import
locations after moving things from zope.app.event to
Philipp von Weitershausen
philikon at philikon.de
Fri Apr 7 09:27:57 EDT 2006
Log message for revision 66647:
Fix up import locations after moving things from zope.app.event to
zope.component.testing and zope.lifecycleevent.
Changed:
U Zope3/branches/jim-adapter/src/buddydemo/browser.py
U Zope3/branches/jim-adapter/src/buddydemo/tests.py
U Zope3/branches/jim-adapter/src/bugtracker/configure.zcml
U Zope3/branches/jim-adapter/src/bugtracker/mail.py
U Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py
U Zope3/branches/jim-adapter/src/bugtracker/xmlrpc.py
U Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.txt
U Zope3/branches/jim-adapter/src/zope/app/authentication/groupfolder.txt
U Zope3/branches/jim-adapter/src/zope/app/authentication/principalfolder.py
U Zope3/branches/jim-adapter/src/zope/app/authentication/tests.py
U Zope3/branches/jim-adapter/src/zope/app/catalog/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/catalog/tests.py
U Zope3/branches/jim-adapter/src/zope/app/component/site.txt
U Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py
U Zope3/branches/jim-adapter/src/zope/app/container/contained.py
U Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py
U Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py
U Zope3/branches/jim-adapter/src/zope/app/container/tests/test_ordered.py
U Zope3/branches/jim-adapter/src/zope/app/copypastemove/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/copypastemove/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/dav/mkcol.py
U Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py
U Zope3/branches/jim-adapter/src/zope/app/dublincore/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_editview.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py
U Zope3/branches/jim-adapter/src/zope/app/ftp/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/http/put.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/contentworkflow.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/definition.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_contentworkflow.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_instance.py
U Zope3/branches/jim-adapter/src/zwiki/tests/test_wikimail.py
-=-
Modified: Zope3/branches/jim-adapter/src/buddydemo/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/buddydemo/browser.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/buddydemo/browser.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -1,7 +1,7 @@
import zope.interface
from buddydemo.interfaces import IBuddy, IPostalInfo
from zope.event import notify
-from zope.app.event.objectevent import ObjectModifiedEvent
+from zope.lifecycleevent import ObjectModifiedEvent
class BuddyInfo:
"""Provide an interface for viewing a Buddy
Modified: Zope3/branches/jim-adapter/src/buddydemo/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/buddydemo/tests.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/buddydemo/tests.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -79,9 +79,8 @@
There should be an ObjectModifiedEvent event logged:
- >>> from zope.app.event.tests.placelesssetup \
- ... import getEvents
- >>> from zope.app.event.interfaces \
+ >>> from zope.component.testing import getEvents
+ >>> from zope.lifecycleevent.interfaces \
... import IObjectModifiedEvent
>>> [event] = getEvents(IObjectModifiedEvent)
>>> event.object is fake
Modified: Zope3/branches/jim-adapter/src/bugtracker/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/configure.zcml 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/bugtracker/configure.zcml 2006-04-07 13:27:53 UTC (rev 66647)
@@ -376,8 +376,8 @@
<!-- Register event listener for change mails -->
<subscriber
handler=".mail.Mailer"
- for="zope.app.event.interfaces.IObjectCreatedEvent
- zope.app.event.interfaces.IObjectModifiedEvent" />
+ for="zope.lifecycleevent.interfaces.IObjectCreatedEvent
+ zope.lifecycleevent.interfaces.IObjectModifiedEvent" />
<!-- Register various browser related components, including all views -->
Modified: Zope3/branches/jim-adapter/src/bugtracker/mail.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/mail.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/bugtracker/mail.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -17,9 +17,9 @@
"""
from zope.interface import implements
from zope.annotation.interfaces import IAnnotations
+from zope.lifecycleevent.interfaces import IObjectCreatedEvent, IObjectModifiedEvent
from zope.app import zapi
-from zope.app.event.interfaces import IObjectCreatedEvent, IObjectModifiedEvent
from zope.app.mail.interfaces import IMailDelivery
from interfaces import IBug, IBugTracker, IMailSubscriptions
Modified: Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/bugtracker/tests/test_mail.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -24,11 +24,11 @@
from zope.location.traversing import LocationPhysicallyLocatable
from zope.annotation.interfaces import IAnnotations, IAttributeAnnotatable
from zope.annotation.attribute import AttributeAnnotations
+from zope.lifecycleevent import ObjectModifiedEvent
from zope.app.testing import ztapi
from zope.app.dublincore.interfaces import IWriteZopeDublinCore
from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
-from zope.app.event.objectevent import ObjectModifiedEvent
from zope.app.mail.interfaces import IMailDelivery
from bugtracker.bug import Bug
Modified: Zope3/branches/jim-adapter/src/bugtracker/xmlrpc.py
===================================================================
--- Zope3/branches/jim-adapter/src/bugtracker/xmlrpc.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/bugtracker/xmlrpc.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -22,11 +22,11 @@
from zope.event import notify
from zope.app.publisher.xmlrpc import MethodPublisher
from zope.schema.vocabulary import getVocabularyRegistry
+from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
from zope.app import zapi
from zope.app.container.contained import contained
from zope.app.container.interfaces import INameChooser
-from zope.app.event.objectevent import ObjectCreatedEvent, ObjectModifiedEvent
from zope.app.file import File, Image
from bugtracker.bug import Bug
Modified: Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.txt 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.txt 2006-04-07 13:27:53 UTC (rev 66647)
@@ -24,7 +24,7 @@
A DatabaseOpenedWithRoot is generated with the database.
- >>> from zope.app.event.tests.placelesssetup import getEvents
+ >>> from zope.component.testing import getEvents
>>> [event] = getEvents(interfaces.IDatabaseOpenedWithRootEvent)
>>> event.database is db
True
Modified: Zope3/branches/jim-adapter/src/zope/app/authentication/groupfolder.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/authentication/groupfolder.txt 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/authentication/groupfolder.txt 2006-04-07 13:27:53 UTC (rev 66647)
@@ -19,7 +19,7 @@
Note that when group-info is added, a GroupAdded event is generated:
>>> from zope.app.authentication import interfaces
- >>> from zope.app.event.tests.placelesssetup import getEvents
+ >>> from zope.component.testing import getEvents
>>> getEvents(interfaces.IGroupAdded)
[<GroupAdded 'group.g1'>]
Modified: Zope3/branches/jim-adapter/src/zope/app/authentication/principalfolder.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/authentication/principalfolder.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/authentication/principalfolder.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -461,7 +461,7 @@
It also fires an AuthenticatedPrincipalCreatedEvent:
- >>> from zope.app.event.tests.placelesssetup import getEvents
+ >>> from zope.component.testing import getEvents
>>> [event] = getEvents(interfaces.IAuthenticatedPrincipalCreated)
>>> event.principal is principal, event.authentication is auth
(True, True)
@@ -524,7 +524,7 @@
It also fires a FoundPrincipalCreatedEvent:
- >>> from zope.app.event.tests.placelesssetup import getEvents
+ >>> from zope.component.testing import getEvents
>>> [event] = getEvents(interfaces.IFoundPrincipalCreated)
>>> event.principal is principal, event.authentication is auth
(True, True)
Modified: Zope3/branches/jim-adapter/src/zope/app/authentication/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/authentication/tests.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/authentication/tests.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -22,12 +22,11 @@
from zope.testing import doctest
from zope.interface import implements
from zope.component import provideUtility, provideAdapter
+from zope.component.testing import getEvents, clearEvents
from zope.publisher.interfaces import IRequest
from zope.publisher.tests.httprequest import TestRequest
-from zope.app import zapi
from zope.app.testing import placelesssetup, ztapi
-from zope.app.event.tests.placelesssetup import getEvents, clearEvents
from zope.app.testing.setup import placefulSetUp, placefulTearDown
from zope.app.session.interfaces import \
IClientId, IClientIdManager, ISession, ISessionDataContainer, \
Modified: Zope3/branches/jim-adapter/src/zope/app/catalog/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/catalog/configure.zcml 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/catalog/configure.zcml 2006-04-07 13:27:53 UTC (rev 66647)
@@ -41,7 +41,7 @@
<subscriber
handler=".catalog.reindexDocSubscriber"
- for="zope.app.event.objectevent.IObjectModifiedEvent"
+ for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
/>
<subscriber
Modified: Zope3/branches/jim-adapter/src/zope/app/catalog/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/catalog/tests.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/catalog/tests.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -249,7 +249,7 @@
def test_reindexDocSubscriber(self):
from zope.app.catalog.catalog import reindexDocSubscriber
- from zope.app.event.objectevent import ObjectModifiedEvent
+ from zope.lifecycleevent import ObjectModifiedEvent
ob = Stub()
id = self.utility.register(ob)
Modified: Zope3/branches/jim-adapter/src/zope/app/component/site.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/site.txt 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/component/site.txt 2006-04-07 13:27:53 UTC (rev 66647)
@@ -52,7 +52,7 @@
Note that an event is generated when a local site manager is created:
- >>> from zope.app.event.tests.placelesssetup import getEvents
+ >>> from zope.component.testing import getEvents
>>> from zope.app.component.interfaces import INewLocalSite
>>> [event] = getEvents(INewLocalSite)
>>> event.manager is sm
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/adding.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -30,13 +30,13 @@
from zope.security.proxy import removeSecurityProxy
from zope.exceptions.interfaces import UserError
from zope.location import LocationProxy
+from zope.lifecycleevent import ObjectCreatedEvent
from zope.app.container.interfaces import IAdding, INameChooser
from zope.app.container.interfaces import IContainerNamesContainer
from zope.app.container.constraints import checkFactory, checkObject
from zope.app import zapi
-from zope.app.event.objectevent import ObjectCreatedEvent
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.app.publisher.browser.menu import getMenu
Modified: Zope3/branches/jim-adapter/src/zope/app/container/contained.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/contained.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/container/contained.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -406,8 +406,8 @@
If we run this using the testing framework, we'll use `getEvents` to
track the events generated:
- >>> from zope.app.event.tests.placelesssetup import getEvents
- >>> from zope.app.event.interfaces import IObjectModifiedEvent
+ >>> from zope.component.testing import getEvents
+ >>> from zope.lifecycleevent.interfaces import IObjectModifiedEvent
We have an added event:
@@ -601,9 +601,9 @@
If we run this using the testing framework, we'll use `getEvents` to
track the events generated:
- >>> from zope.app.event.tests.placelesssetup import getEvents
+ >>> from zope.component.testing import getEvents
+ >>> from zope.lifecycleevent.interfaces import IObjectModifiedEvent
>>> from zope.app.container.interfaces import IObjectRemovedEvent
- >>> from zope.app.event.interfaces import IObjectModifiedEvent
We'll start by creating a container with an item:
Modified: Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -16,15 +16,15 @@
$Id$
"""
from unittest import TestCase, TestSuite, main, makeSuite
+
+import zope.component
from zope.testing import doctest
from zope.traversing.api import traverse
+from zope.component.testing import getEvents, clearEvents
-from zope.app.event.tests.placelesssetup import getEvents
-from zope.app.event.tests.placelesssetup import clearEvents
from zope.app.component.testing import PlacefulSetup
from zope.app.copypastemove import ObjectCopier
from zope.app.copypastemove.interfaces import IObjectCopier
-from zope.app.testing import ztapi
from zope.app.testing import setup
from zope.app.folder import Folder
@@ -36,7 +36,7 @@
Prepare the setup::
>>> root = setup.placefulSetUp(site=True)
- >>> ztapi.provideAdapter(None, IObjectCopier, ObjectCopier)
+ >>> zope.component.provideAdapter(ObjectCopier, (None,), IObjectCopier)
Prepare some objects::
@@ -83,7 +83,7 @@
def setUp(self):
PlacefulSetup.setUp(self)
PlacefulSetup.buildFolders(self)
- ztapi.provideAdapter(None, IObjectCopier, ObjectCopier)
+ zope.component.provideAdapter(ObjectCopier, (None,), IObjectCopier)
def test_copytosame(self):
root = self.rootFolder
Modified: Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -16,15 +16,15 @@
$Id$
"""
from unittest import TestCase, TestSuite, main, makeSuite
+
+import zope.component
from zope.testing import doctest
from zope.traversing.api import traverse
+from zope.component.testing import getEvents, clearEvents
-from zope.app.event.tests.placelesssetup import getEvents
-from zope.app.event.tests.placelesssetup import clearEvents
from zope.app.component.testing import PlacefulSetup
from zope.app.copypastemove import ObjectMover
from zope.app.copypastemove.interfaces import IObjectMover
-from zope.app.testing import ztapi
from zope.app.testing import setup
from zope.app.folder import Folder
@@ -36,7 +36,7 @@
Prepare the setup::
>>> root = setup.placefulSetUp(site=True)
- >>> ztapi.provideAdapter(None, IObjectMover, ObjectMover)
+ >>> zope.component.provideAdapter(ObjectMover, (None,), IObjectMover)
Prepare some objects::
@@ -96,7 +96,7 @@
def setUp(self):
PlacefulSetup.setUp(self)
PlacefulSetup.buildFolders(self)
- ztapi.provideAdapter(None, IObjectMover, ObjectMover)
+ zope.component.provideAdapter(ObjectMover, (None,), )
def test_movetosame(self):
# Should be a noop, because "moving" to same location
Modified: Zope3/branches/jim-adapter/src/zope/app/container/tests/test_ordered.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/tests/test_ordered.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/container/tests/test_ordered.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -16,12 +16,9 @@
$Id$
"""
import unittest
-
from zope.testing.doctestunit import DocTestSuite
-from zope.app.testing import placelesssetup
-from zope.app.testing import setup
-from zope.app.event.tests.placelesssetup import getEvents
-from zope.app.event.tests.placelesssetup import clearEvents
+from zope.component.testing import getEvents, clearEvents
+from zope.app.testing import placelesssetup, setup
def test_order_events():
"""
@@ -54,7 +51,7 @@
This is in fact a specialized modification event::
- >>> from zope.app.event.interfaces import IObjectModifiedEvent
+ >>> from zope.lifecycleevent.interfaces import IObjectModifiedEvent
>>> IObjectModifiedEvent.providedBy(events[0])
True
Modified: Zope3/branches/jim-adapter/src/zope/app/copypastemove/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/copypastemove/__init__.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/copypastemove/__init__.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -26,9 +26,9 @@
from zope.location.interfaces import ISublocations
from zope.annotation.interfaces import IAnnotations
from zope.annotation.interfaces import IAnnotations
+from zope.lifecycleevent import ObjectCopiedEvent
from zope.app.container.sample import SampleContainer
-from zope.app.event.objectevent import ObjectCopiedEvent
from zope.app.container.interfaces import IContainer, IOrderedContainer
from zope.app.container.interfaces import IContained
from zope.app.container.interfaces import INameChooser
@@ -681,8 +681,8 @@
Finally, we need to register our handler for copy events:
+ >>> from zope.lifecycleevent.interfaces import IObjectCopiedEvent
>>> from zope.app.testing import ztapi
- >>> from zope.app.event.interfaces import IObjectCopiedEvent
>>> ztapi.subscribe([None, IObjectCopiedEvent], None, handler)
and this function as a dispatcher:
Modified: Zope3/branches/jim-adapter/src/zope/app/copypastemove/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/copypastemove/configure.zcml 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/copypastemove/configure.zcml 2006-04-07 13:27:53 UTC (rev 66647)
@@ -24,7 +24,7 @@
<subscriber
for="zope.location.interfaces.ILocation
- zope.app.event.interfaces.IObjectCopiedEvent"
+ zope.lifecycleevent.interfaces.IObjectCopiedEvent"
handler=".dispatchToSublocations"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/mkcol.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/mkcol.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/mkcol.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -18,7 +18,7 @@
from zope.app.filerepresentation.interfaces import IWriteDirectory
from zope.app.filerepresentation.interfaces import IDirectoryFactory
from zope.event import notify
-from zope.app.event.objectevent import ObjectCreatedEvent
+from zope.lifecycleevent import ObjectCreatedEvent
class NullResource(object):
"""MKCOL handler for creating collections"""
Modified: Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/demo/jobboard/browser.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -19,7 +19,7 @@
from zope.publisher.browser import BrowserView
from zope.event import notify
-from zope.app.event.objectevent import ObjectModifiedEvent
+from zope.lifecycleevent import ObjectModifiedEvent
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from job import Job
Modified: Zope3/branches/jim-adapter/src/zope/app/dublincore/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dublincore/configure.zcml 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/dublincore/configure.zcml 2006-04-07 13:27:53 UTC (rev 66647)
@@ -32,22 +32,22 @@
<subscriber
handler=".timeannotators.ModifiedAnnotator"
- for="zope.app.event.interfaces.IObjectModifiedEvent"
+ for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
/>
<subscriber
handler=".timeannotators.CreatedAnnotator"
- for="zope.app.event.interfaces.IObjectCreatedEvent"
+ for="zope.lifecycleevent.interfaces.IObjectCreatedEvent"
/>
<subscriber
handler=".creatorannotator.CreatorAnnotator"
- for="zope.app.event.interfaces.IObjectModifiedEvent"
+ for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
/>
<subscriber
handler=".creatorannotator.CreatorAnnotator"
- for="zope.app.event.interfaces.IObjectCreatedEvent"
+ for="zope.lifecycleevent.interfaces.IObjectCreatedEvent"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -19,22 +19,21 @@
import sys
-from zope.app import zapi
+import zope.component
from zope.component.interfaces import IFactory
from zope.event import notify
from zope.interface import Interface
+from zope.schema.interfaces import ValidationError
+from zope.security.checker import defineChecker, NamesChecker
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
+from zope.lifecycleevent import Attributes
-from zope.app.event.objectevent import ObjectCreatedEvent
-from zope.app.event.objectevent import ObjectModifiedEvent
-from zope.app.event.objectevent import Attributes
from zope.app.form.utility import setUpWidgets, getWidgetsData
from zope.app.i18n import ZopeMessageFactory as _
from zope.app.form.interfaces import IInputWidget, WidgetsError
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-from zope.publisher.interfaces.browser import IDefaultBrowserLayer
-from zope.schema.interfaces import ValidationError
-from zope.security.checker import defineChecker, NamesChecker
from editview import EditView
from submit import Update
@@ -143,7 +142,7 @@
factory = self.__dict__.get('_factory_or_id', self._factory_or_id)
if type(factory) is str: # factory id
- return zapi.getUtility(IFactory, factory, self.context)
+ return zope.component.getUtility(IFactory, factory, self.context)
else:
return factory
@@ -181,5 +180,5 @@
if layer is None:
layer = IDefaultBrowserLayer
- s = zapi.getGlobalSiteManager()
+ s = zope.component.getGlobalSiteManager()
s.registerAdapter(class_, (for_, layer), Interface, name)
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -20,25 +20,23 @@
from datetime import datetime
import transaction
+import zope.component
from zope.interface import Interface
from zope.schema import getFieldNamesInOrder
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
from zope.publisher.browser import BrowserView
from zope.security.checker import defineChecker, NamesChecker
-
-from zope.app import zapi
from zope.event import notify
-from zope.app.event.objectevent import ObjectModifiedEvent
-from zope.app.event.objectevent import Attributes
+from zope.lifecycleevent import ObjectModifiedEvent
+from zope.lifecycleevent import Attributes
+
from zope.app.i18n import ZopeMessageFactory as _
-from zope.app.form.interfaces import WidgetsError
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
-
+from zope.app.form.interfaces import WidgetsError
from zope.app.form.utility import setUpEditWidgets, applyWidgetsChanges
from zope.app.form.browser.submit import Update
-
class EditView(BrowserView):
"""Simple edit-view base class
@@ -145,5 +143,5 @@
if layer is None:
layer = IDefaultBrowserLayer
- s = zapi.getGlobalSiteManager()
+ s = zope.component.getGlobalSiteManager()
s.registerAdapter(class_, (for_, layer), Interface, name)
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_add.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -17,6 +17,7 @@
"""
import unittest
+from zope.component import getMultiAdapter
from zope.component.interfaces import IFactory
from zope.component.interfaces import IComponentLookup
from zope.component.factory import Factory
@@ -26,12 +27,11 @@
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
from zope.schema import TextLine, accessors
from zope.security.checker import CheckerPublic
+from zope.component.testing import getEvents
+from zope.lifecycleevent.interfaces import IObjectCreatedEvent, IObjectModifiedEvent
-from zope.app import zapi
from zope.app.component.site import SiteManagerAdapter
from zope.app.container.interfaces import IAdding
-from zope.app.event.tests.placelesssetup import getEvents
-from zope.app.event.interfaces import IObjectCreatedEvent, IObjectModifiedEvent
from zope.app.form import CustomWidgetFactory
from zope.app.form.browser import TextWidget as Text
from zope.app.form.browser.add import AddViewFactory, AddView
@@ -258,7 +258,7 @@
(descriminator, callable, args, kw) = self._context.last_action
factory = AddViewFactory(*args)
request = TestRequest()
- view = zapi.getMultiAdapter((adding, request), name='addthis')
+ view = getMultiAdapter((adding, request), name='addthis')
content = view.create('a',0,abc='def')
self.failUnless(isinstance(content, C))
@@ -295,7 +295,7 @@
(descriminator, callable, args, kw) = self._context.last_action
factory = AddViewFactory(*args)
request = TestRequest()
- view = zapi.getMultiAdapter((adding, request), name='addthis')
+ view = getMultiAdapter((adding, request), name='addthis')
content = view.create('a',0,abc='def')
self.failUnless(isinstance(content, C))
@@ -328,7 +328,7 @@
(descriminator, callable, args, kw) = self._context.last_action
factory = AddViewFactory(*args)
request = TestRequest()
- view = zapi.getMultiAdapter((adding, request), name='addthis')
+ view = getMultiAdapter((adding, request), name='addthis')
view.createAndAdd(SampleData.__dict__)
@@ -366,7 +366,7 @@
(descriminator, callable, args, kw) = self._context.last_action
factory = AddViewFactory(*args)
request = TestRequest()
- view = zapi.getMultiAdapter((adding, request), name='addthis')
+ view = getMultiAdapter((adding, request), name='addthis')
view.createAndAdd({'bar': 'bar'})
@@ -386,7 +386,7 @@
for (k, v) in dict(SampleData.__dict__).items()
]))
request.form[Update] = ''
- view = zapi.getMultiAdapter((adding, request), name='addthis')
+ view = getMultiAdapter((adding, request), name='addthis')
# Add hooks to V
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_editview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_editview.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_editview.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -22,11 +22,11 @@
from zope.schema import TextLine, accessors
from zope.schema.interfaces import ITextLine
from zope.component.interfaces import ComponentLookupError
+from zope.component.testing import getEvents, clearEvents
from zope.location.interfaces import ILocation
from zope.app.testing import ztapi
from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.event.tests.placelesssetup import getEvents, clearEvents
from zope.app.form.browser import TextWidget
from zope.app.form.browser.editview import EditView
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -28,13 +28,12 @@
from zope.proxy import removeAllProxies
from zope.xmlpickle import fromxml
from zope.traversing.api import traverseName, getName
+from zope.lifecycleevent import ObjectCreatedEvent, ObjectModifiedEvent
from zope.app.fssync import fspickle
from zope.app.container.interfaces import IContainer
from zope.app.filerepresentation.interfaces import IFileFactory
from zope.app.filerepresentation.interfaces import IDirectoryFactory
-from zope.app.event.objectevent import ObjectCreatedEvent
-from zope.app.event.objectevent import ObjectModifiedEvent
from zope.app.container.contained import contained
class SynchronizationError(Exception):
Modified: Zope3/branches/jim-adapter/src/zope/app/ftp/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/ftp/__init__.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/ftp/__init__.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -23,20 +23,18 @@
from zope.publisher.interfaces.ftp import IFTPPublisher
from zope.security.proxy import removeSecurityProxy
from zope.security.checker import canAccess
+from zope.event import notify
+from zope.lifecycleevent import ObjectCreatedEvent
from zope.app.filerepresentation.interfaces import IReadFile, IWriteFile
from zope.app.filerepresentation.interfaces import IReadDirectory
from zope.app.filerepresentation.interfaces import IWriteDirectory
from zope.app.filerepresentation.interfaces import IFileFactory
from zope.app.filerepresentation.interfaces import IDirectoryFactory
-
-from zope.event import notify
-from zope.app.event.objectevent import ObjectCreatedEvent
from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.copypastemove.interfaces import IContainerItemRenamer
from zope.app.container.interfaces import IContainer
-
class FTPView(object):
implements(IFTPPublisher)
Modified: Zope3/branches/jim-adapter/src/zope/app/http/put.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/http/put.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/http/put.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -16,12 +16,13 @@
__docformat__ = 'restructuredtext'
from zope.component import queryAdapter
+from zope.event import notify
+from zope.lifecycleevent import ObjectCreatedEvent
+from zope.interface import implements
+
from zope.app.http.interfaces import INullResource
from zope.app.filerepresentation.interfaces import IWriteFile
from zope.app.filerepresentation.interfaces import IWriteDirectory, IFileFactory
-from zope.event import notify
-from zope.app.event.objectevent import ObjectCreatedEvent
-from zope.interface import implements
class NullResource(object):
"""Object representing objects to be created by a `PUT`.
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/configure.zcml 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/configure.zcml 2006-04-07 13:27:53 UTC (rev 66647)
@@ -139,7 +139,7 @@
are created. -->
<subscriber
for="..interfaces.IProcessInstanceContainerAdaptable
- zope.app.event.objectevent.IObjectCreatedEvent"
+ zope.lifecycleevent.IObjectCreatedEvent"
handler=".contentworkflow.NewObjectProcessInstanceCreator"
>
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/contentworkflow.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/contentworkflow.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/contentworkflow.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -20,14 +20,14 @@
from persistent import Persistent
from persistent.dict import PersistentDict
-from zope.app import zapi
-from zope.app.event.interfaces import IObjectCreatedEvent
+from zope.component import getUtilitiesFor
+from zope.interface import implements, providedBy
+from zope.lifecycleevent.interfaces import IObjectCreatedEvent
from zope.app.workflow.interfaces import IProcessInstanceContainer
from zope.app.workflow.interfaces import IProcessInstanceContainerAdaptable
from zope.app.workflow.stateful.interfaces import IContentWorkflowsManager
from zope.app.workflow.instance import createProcessInstance
-from zope.interface import implements, providedBy
from zope.app.container.contained import Contained
@@ -36,7 +36,7 @@
pi_container = IProcessInstanceContainer(obj)
- for (ignored, cwf) in zapi.getUtilitiesFor(IContentWorkflowsManager):
+ for (ignored, cwf) in getUtilitiesFor(IContentWorkflowsManager):
# here we will lookup the configured processdefinitions
# for the newly created compoent. For every pd_name
# returned we will create a processinstance.
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/definition.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/definition.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/definition.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -23,8 +23,8 @@
from zope.security.checker import CheckerPublic
from zope.event import notify
from zope.component.interfaces import ObjectEvent
+from zope.lifecycleevent import modified
-from zope.app.event.objectevent import modified
from zope.app.container.interfaces import IReadContainer
from zope.app.container.contained import Contained, containedEvent
from zope.app.schema.interfaces import IVocabularyFactory
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_contentworkflow.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -21,11 +21,11 @@
from zope.interface.verify import verifyClass
from zope.annotation.interfaces import IAttributeAnnotatable
from zope.annotation.interfaces import IAnnotatable, IAttributeAnnotatable
+from zope.lifecycleevent import ObjectCreatedEvent
+from zope.lifecycleevent.interfaces import IObjectCreatedEvent
from zope.app import zapi
from zope.app.container.contained import Contained
-from zope.app.event.objectevent import ObjectCreatedEvent
-from zope.app.event.interfaces import IObjectCreatedEvent
from zope.app.component.site import UtilityRegistration
from zope.app.component.interfaces import ILocalUtility
from zope.app.component.interfaces.registration import ActiveStatus
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_instance.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_instance.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/tests/test_instance.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -24,8 +24,8 @@
from zope.security.checker import CheckerPublic
from zope.security.management import newInteraction, endInteraction
from zope.annotation.interfaces import IAttributeAnnotatable
+from zope.component.testing import events, clearEvents
-from zope.app.event.tests.placelesssetup import events, clearEvents
from zope.app.security.interfaces import IPermission
from zope.app.security.permission import Permission
@@ -43,7 +43,6 @@
from zope.app.workflow.stateful.instance import StatefulProcessInstance
from zope.app.workflow.stateful.instance import StateChangeInfo
-from zope.app import zapi
from zope.app.container.contained import contained
from zope.app.utility import UtilityRegistration
from zope.app.testing import setup
@@ -98,7 +97,7 @@
setup.addUtility(self.sm, 'definition1', IProcessDefinition, pd)
- self.pd = zapi.getUtility(IProcessDefinition, name='definition1')
+ self.pd = component.getUtility(IProcessDefinition, name='definition1')
# give the pi some context to find a service
self.pi = createProcessInstance(self.sm, 'definition1')
# Let's also listen to the fired events
@@ -206,7 +205,7 @@
setup.addUtility(self.sm, 'definition1', IProcessDefinition, pd)
- self.pd = zapi.getUtility(IProcessDefinition, 'definition1')
+ self.pd = component.getUtility(IProcessDefinition, 'definition1')
# give the pi some context to find a service
self.pi = contained(
createProcessInstance(self.sm, 'definition1'),
@@ -288,7 +287,7 @@
setup.addUtility(self.sm, 'definition1', IProcessDefinition, pd)
- self.pd = zapi.getUtility(IProcessDefinition, 'definition1')
+ self.pd = component.getUtility(IProcessDefinition, 'definition1')
# give the pi some context to find a service
self.pi = contained(
createProcessInstance(self.sm, 'definition1'),
@@ -370,7 +369,7 @@
setup.addUtility(self.sm, 'definition1', IProcessDefinition, pd)
- self.pd = zapi.getUtility(IProcessDefinition, 'definition1')
+ self.pd = component.getUtility(IProcessDefinition, 'definition1')
# give the process instance container (pic) some context to find a
# service (while this is not correct, it resembles the current
# behavior.
Modified: Zope3/branches/jim-adapter/src/zwiki/tests/test_wikimail.py
===================================================================
--- Zope3/branches/jim-adapter/src/zwiki/tests/test_wikimail.py 2006-04-07 13:11:26 UTC (rev 66646)
+++ Zope3/branches/jim-adapter/src/zwiki/tests/test_wikimail.py 2006-04-07 13:27:53 UTC (rev 66647)
@@ -23,11 +23,11 @@
from zope.interface import classImplements, implements
from zope.annotation.interfaces import IAnnotations, IAttributeAnnotatable
from zope.annotation.attribute import AttributeAnnotations
+from zope.lifecycleevent import ObjectModifiedEvent
from zope.app.testing import ztapi
from zope.app.testing.placelesssetup import PlacelessSetup
from zope.app.site.tests.placefulsetup import PlacefulSetup
-from zope.app.event.objectevent import ObjectModifiedEvent
from zope.app.mail.interfaces import IMailDelivery
from zwiki.interfaces import IWikiPage, IWiki, IMailSubscriptions
More information about the Zope3-Checkins
mailing list