[Zope3-checkins] SVN: Zope3/branches/jim-simplifyevents/ Various
fixes to get the tsts running. Yay!
Jim Fulton
jim at zope.com
Wed May 26 16:07:32 EDT 2004
Log message for revision 25024:
Various fixes to get the tsts running. Yay!
-=-
Deleted: Zope3/branches/jim-simplifyevents/package-includes/zope.app.catalog-configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/package-includes/zope.app.catalog-configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/package-includes/zope.app.catalog-configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -1 +0,0 @@
-<include package="zope.app.catalog"/>
Deleted: Zope3/branches/jim-simplifyevents/package-includes/zope.app.zptpage.textindex-configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/package-includes/zope.app.zptpage.textindex-configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/package-includes/zope.app.zptpage.textindex-configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -1 +0,0 @@
-<include package="zope.app.zptpage.textindex" />
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/apidoc/ifacemodule/browser.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/apidoc/ifacemodule/browser.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/apidoc/ifacemodule/browser.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -332,8 +332,14 @@
>>> details = getInterfaceDetails()
>>> adapters = details.getRequiredAdapters()
+ >>> adapters.sort()
>>> pprint(adapters)
- [[('factory',
+ [[('factory', 'None.append'),
+ ('factory_url', 'None/append'),
+ ('name', None),
+ ('provided', None),
+ ('required', [])],
+ [('factory',
'zope.app.location.traversing.LocationPhysicallyLocatable'),
('factory_url',
'zope/app/location/traversing/LocationPhysicallyLocatable'),
@@ -360,7 +366,7 @@
'required': [getPythonPath(iface)
for iface in reg.required
if iface is not None],
- 'name': reg.name,
+ 'name': getattr(reg, 'name', None),
'factory': path,
'factory_url': url
})
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/apidoc/servicemodule/__init__.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/apidoc/servicemodule/__init__.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/apidoc/servicemodule/__init__.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -60,9 +60,9 @@
>>> print '\n'.join([id for id, iface in module.items()][:4])
Adapters
- EventPublication
Presentation
Services
+ Utilities
>>> setup.tearDown()
"""
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/appsetup/bootstrap.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/appsetup/bootstrap.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/appsetup/bootstrap.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -30,7 +30,6 @@
from zope.app.publication.zopepublication import ZopePublication
from zope.app.folder import rootFolder
from zope.app.servicenames import PrincipalAnnotation
-from zope.app.servicenames import EventPublication, EventSubscription
from zope.app.servicenames import ErrorLogging, Utilities
from zope.app.site.service import ServiceManager, ServiceRegistration
from zope.app.errorservice import RootErrorReportingService
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/appsetup/configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/appsetup/configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/appsetup/configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -1,6 +1,6 @@
<configure xmlns="http://namespaces.zope.org/zope">
- <subscribe
+ <subscriber
factory=".bootstrap.bootstrapInstance"
for="zope.app.appsetup.IDatabaseOpenedEvent"
/>
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/broken/broken.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/broken/broken.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/broken/broken.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -69,7 +69,7 @@
return default
return annotations.get(key, default)
-def installBrokenSubscriber(event):
+def installBroken(event):
"""Install a class factory that handled broken objects
This method installs a custom class factory when it gets a
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/broken/configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/broken/configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/broken/configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -5,7 +5,7 @@
</content>
<subscriber
- factory=".broken.installBrokenSubscriber"
+ factory=".broken.installBroken"
for="zope.app.appsetup.IDatabaseOpenedEvent"
/>
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/browser.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/browser.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/browser.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -8,7 +8,6 @@
<include package="zope.app.traversing.browser" />
<include package="zope.app.container.browser" />
- <include package="zope.app.event.browser" />
<include package="zope.app.registration.browser" />
<include package="zope.app.form.browser" />
<include package="zope.app.utility.browser" />
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/component/configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/component/configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/component/configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -55,7 +55,7 @@
/>
<subscriber
- factory==".localservice.clearThreadSiteSubscriber"
+ factory=".localservice.clearThreadSiteSubscriber"
for="zope.app.publication.interfaces.IEndRequestEvent"
/>
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -10,10 +10,11 @@
<!-- Note that we need to do this early, as later startup
subscribers may break without fixups -->
+ <include package="zope.app.component" />
+
<include package=".generations" file="subscriber.zcml" />
<!-- Ordinary Application (non-view) configuration) -->
- <include package="zope.app.component" />
<include package="zope.app.interface" />
<include package="zope.app.security" />
<include package="zope.app.event" />
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/container/contained.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/container/contained.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/container/contained.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -237,10 +237,10 @@
>>> from zope.app.tests import ztapi
>>> ztapi.handle([IItem, IObjectAddedEvent],
- ... lambda event: event.object.setAdded(event))
+ ... lambda obj, event: obj.setAdded(event))
- >>> ztapi.handle([IItem, IObjectMovesEvent],
- ... lambda event: event.object.setMoved(event))
+ >>> ztapi.handle([IItem, IObjectMovedEvent],
+ ... lambda obj, event: obj.setMoved(event))
>>> item = Item()
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/dublincore/configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/dublincore/configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/dublincore/configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -50,12 +50,12 @@
for="zope.app.event.interfaces.IObjectCreatedEvent"
/>
- <subscribe
+ <subscriber
factory=".creatorannotator.CreatorAnnotator"
for="zope.app.event.interfaces.IObjectModifiedEvent"
/>
- <subscribe
+ <subscriber
factory=".creatorannotator.CreatorAnnotator"
for="zope.app.event.interfaces.IObjectCreatedEvent"
/>
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/event/tests/placelesssetup.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/event/tests/placelesssetup.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/event/tests/placelesssetup.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -43,6 +43,7 @@
def setUp(self):
clearEvents()
ztapi.handle([None], events.append)
+ ztapi.handle([IObjectEvent], objectEventNotify)
import zope.testing.cleanup
zope.testing.cleanup.addCleanUp(clearEvents)
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/form/browser/tests/test_configure.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/form/browser/tests/test_configure.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/form/browser/tests/test_configure.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -28,7 +28,6 @@
xmlconfig.string(
"""<configure xmlns='http://namespaces.zope.org/zope'>
<include package='zope.app.component' file='meta.zcml' />
- <include package='zope.app.event' file='meta.zcml' />
<include package='zope.app.publisher.browser'
file='meta.zcml' />
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/meta.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/meta.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/meta.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -8,7 +8,6 @@
<include package="zope.app.publisher" file="meta.zcml" />
<include package="zope.app.security" file="meta.zcml" />
<include package="zope.app.form.browser" file="meta.zcml" />
-<include package="zope.app.event" file="meta.zcml" />
<include package="zope.app.i18n" file="meta.zcml" />
<include package="zope.app.pagetemplate" file="meta.zcml" />
<include package="zope.app.schema" file="meta.zcml" />
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/observable/tests.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/observable/tests.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/observable/tests.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -146,8 +146,7 @@
handlers are notified.
>>> event = DummyObservableEvent()
- >>> notifier = observerevent.ObserverEventNotifier()
- >>> notifier.notify(event)
+ >>> observerevent.observerEventNotifier(event)
>>> event.object.flag
True
"""
@@ -159,8 +158,7 @@
ObserverEventNotifier doesn't do anything to it.
>>> event = DummyNotObservableEvent()
- >>> notifier = observerevent.ObserverEventNotifier()
- >>> notifier.notify(event)
+ >>> observerevent.observerEventNotifier(event)
>>> event.object.flag
False
"""
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/publication/tests/test_zopepublication.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/publication/tests/test_zopepublication.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/publication/tests/test_zopepublication.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -443,8 +443,8 @@
set = []
clear = []
- ztapi.handle(IBeforeTraverseEvent, set.append)
- ztapi.handle(IEndRequestEvent, clear.append)
+ ztapi.handle([IBeforeTraverseEvent], set.append)
+ ztapi.handle([IEndRequestEvent], clear.append)
ob = object()
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/registration/registration.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/registration/registration.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/registration/registration.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -619,7 +619,7 @@
"""Receive notification of remove event."""
component = component_registration.getComponent()
dependents = IDependable(component)
- objectpath = zapi.getPath(self.component_registration)
+ objectpath = zapi.getPath(component_registration)
dependents.removeDependent(objectpath)
# Also update usage, if supported
adapter = interfaces.IRegistered(component, None)
@@ -630,7 +630,7 @@
"""Receive notification of add event."""
component = component_registration.getComponent()
dependents = IDependable(component)
- objectpath = zapi.getPath(self.component_registration)
+ objectpath = zapi.getPath(component_registration)
dependents.addDependent(objectpath)
# Also update usage, if supported
adapter = interfaces.IRegistered(component, None)
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/wiki/browser/wiki.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/wiki/browser/wiki.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/wiki/browser/wiki.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -22,7 +22,6 @@
from zope.app.dublincore.interfaces import ICMFDublinCore
from zope.app.traversing.api import getName, getPath
from zope.app.container.browser.adding import Adding
-from zope.app.hub import Registration
from zope.app.wiki.interfaces import IWikiPageHierarchy
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/wiki/configure.zcml
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/wiki/configure.zcml 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/wiki/configure.zcml 2004-05-26 20:07:31 UTC (rev 25024)
@@ -207,11 +207,11 @@
<!-- Register event listener for change mails -->
<subscriber
factory=".wikipage.mailer"
- for="zope.app.container.interfaces.IObjectAddedEvent"
+ for="zope.app.container.interfaces.IObjectMovedEvent"
/>
<subscriber
factory=".wikipage.mailer"
- for="zope.app.event.interfaces.IMovedEvent"
+ for="zope.app.event.interfaces.IObjectModifiedEvent"
/>
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/workflow/stateful/tests/test_contentworkflow.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -159,8 +159,7 @@
obj = TestObject2()
event = ObjectCreatedEvent(obj)
- subscriber = NewObjectProcessInstanceCreator(obj, event)
- subscriber.notify(event)
+ NewObjectProcessInstanceCreator(obj, event)
pi = obj.__annotations__['zope.app.worfklow.ProcessInstanceContainer']
self.assertEqual(pi.keys(), ['definition2', 'definition1'])
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/workflow/tests/workflowsetup.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/workflow/tests/workflowsetup.py 2004-05-26 20:04:11 UTC (rev 25023)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/workflow/tests/workflowsetup.py 2004-05-26 20:07:31 UTC (rev 25024)
@@ -1,4 +1,4 @@
-##############################################################################
+ ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
More information about the Zope3-Checkins
mailing list