[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/ Move
more directive handlers to the new registration API; fix some tests
Philipp von Weitershausen
philikon at philikon.de
Wed Apr 12 14:09:31 EDT 2006
Log message for revision 66899:
Move more directive handlers to the new registration API; fix some tests
that I broke by moving the elementary ones earlier.
Changed:
U Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_directive.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/i18nresourcemeta.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/metaconfigure.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resourcemeta.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_addMenuItem.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_directive.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_directive.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_directive.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -69,12 +69,12 @@
<InterfaceClass zope.app.menus.zmi_views>,
u'Contents'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.menus.zmi_views>,
u'Contents',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -97,12 +97,12 @@
<InterfaceClass zope.publisher.interfaces.browser.IBrowserRequest>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <class 'zope.app.publisher.browser.viewmeta.Contents'>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.interface.Interface>,
'contents.html',
- <class 'zope.app.publisher.browser.viewmeta.Contents'>,
'info')),
(None,
<function provideInterface>,
@@ -114,12 +114,12 @@
<InterfaceClass zope.publisher.interfaces.browser.IBrowserRequest>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <class 'zope.app.publisher.browser.viewmeta.Contents'>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.interface.Interface>,
'index.html',
- <class 'zope.app.publisher.browser.viewmeta.Contents'>,
'info')),
(('adapter',
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
@@ -127,12 +127,12 @@
<InterfaceClass zope.app.menus.zmi_actions>,
u'Add'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.menus.zmi_actions>,
u'Add',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'info')),
(None,
<function provideInterface>,
@@ -158,12 +158,12 @@
'+',
<InterfaceClass zope.interface.Interface>),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <class 'zope.app.publisher.browser.viewmeta.+'>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.interface.Interface>,
'+',
- <class 'zope.app.publisher.browser.viewmeta.+'>,
'info')))
"""
@@ -186,12 +186,12 @@
<InterfaceClass zope.app.menus.zmi_views>,
u'Contents'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<InterfaceClass zope.app.menus.zmi_views>,
u'Contents',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -214,12 +214,12 @@
<InterfaceClass zope.publisher.interfaces.browser.IBrowserRequest>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <class 'zope.app.publisher.browser.viewmeta.Contents'>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<InterfaceClass zope.interface.Interface>,
'contents.html',
- <class 'zope.app.publisher.browser.viewmeta.Contents'>,
'info')),
(None,
<function provideInterface>,
@@ -231,12 +231,12 @@
<InterfaceClass zope.publisher.interfaces.browser.IBrowserRequest>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <class 'zope.app.publisher.browser.viewmeta.Contents'>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<InterfaceClass zope.interface.Interface>,
'index.html',
- <class 'zope.app.publisher.browser.viewmeta.Contents'>,
'info')),
(('adapter',
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
@@ -244,12 +244,12 @@
<InterfaceClass zope.app.menus.zmi_actions>,
u'Add'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<InterfaceClass zope.app.menus.zmi_actions>,
u'Add',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'info')),
(None,
<function provideInterface>,
@@ -275,12 +275,12 @@
'+',
<InterfaceClass zope.interface.Interface>),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <class 'zope.app.publisher.browser.viewmeta.+'>,
(<InterfaceClass zope.app.container.browser.tests.test_directive.I>,
<InterfaceClass zope.app.container.browser.tests.test_directive.ITestLayer>),
<InterfaceClass zope.interface.Interface>,
'+',
- <class 'zope.app.publisher.browser.viewmeta.+'>,
'info')))
"""
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/i18nresourcemeta.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/i18nresourcemeta.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/i18nresourcemeta.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -102,8 +102,8 @@
self._context.action(
discriminator = ('i18n-resource', self.name, self.type, self.layer),
callable = handler,
- args = ('provideAdapter',
- (self.layer,), Interface, self.name, factory,
+ args = ('registerAdapter',
+ factory, (self.layer,), Interface, self.name,
self._context.info)
)
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -94,8 +94,8 @@
_context.action(
discriminator = ('view', name, vfactory, layer),
callable = handler,
- args = ('provideAdapter',
- (for_, layer), Interface, name, vfactory, _context.info)
+ args = ('registerAdapter',
+ vfactory, (for_, layer), Interface, name, _context.info)
)
_context.action(
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/metaconfigure.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/metaconfigure.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/metaconfigure.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -371,8 +371,8 @@
True
"""
skin = zapi.getUtility(IBrowserSkinType, name)
- handler('provideAdapter',
- (IBrowserRequest,), IDefaultSkin, '', skin, info),
+ handler('registerAdapter',
+ skin, (IBrowserRequest,), IDefaultSkin, '', info),
def defaultSkin(_context, name):
@@ -387,8 +387,8 @@
_context.action(
discriminator = ('defaultViewName', for_, layer, name),
callable = handler,
- args = ('provideAdapter',
- (for_, layer), IDefaultViewName, '', name, _context.info)
+ args = ('registerAdapter',
+ name, (for_, layer), IDefaultViewName, '', _context.info)
)
if for_ is not None:
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resourcemeta.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resourcemeta.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resourcemeta.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -77,8 +77,8 @@
_context.action(
discriminator = ('resource', name, IBrowserRequest, layer),
callable = handler,
- args = ('provideAdapter',
- (layer,), Interface, name, factory, _context.info),
+ args = ('registerAdapter',
+ factory, (layer,), Interface, name, _context.info),
)
def resourceDirectory(_context, name, directory, layer=IDefaultBrowserLayer,
@@ -98,6 +98,6 @@
_context.action(
discriminator = ('resource', name, IBrowserRequest, layer),
callable = handler,
- args = ('provideAdapter',
- (layer,), Interface, name, factory, _context.info),
+ args = ('registerAdapter',
+ factory, (layer,), Interface, name, _context.info),
)
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_addMenuItem.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_addMenuItem.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_addMenuItem.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -35,12 +35,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.interfaces.IAdding>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -59,7 +59,7 @@
"""
import unittest
-from zope.testing.doctestunit import DocTestSuite
+from zope.testing.doctest import DocTestSuite
import re
import pprint
import cStringIO
@@ -110,12 +110,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.interfaces.IAdding>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -149,12 +149,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.interfaces.IAdding>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -201,12 +201,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.interfaces.IAdding>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -239,12 +239,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -273,12 +273,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.interfaces.IAdding>,
<InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.ILayerStub>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -311,12 +311,12 @@
<class 'zope.app.publisher.browser.tests.test_addMenuItem.MenuStub'>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.IX>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<class 'zope.app.publisher.browser.tests.test_addMenuItem.MenuStub'>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
@@ -346,12 +346,12 @@
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X'),
<function handler>,
- ('provideAdapter',
+ ('registerAdapter',
+ <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
(<InterfaceClass zope.app.container.interfaces.IAdding>,
<InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
<InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
'Add an X',
- <zope.app.publisher.browser.menumeta.MenuItemFactory object>,
'')),
(None,
<function provideInterface>,
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py 2006-04-12 17:46:00 UTC (rev 66898)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/viewmeta.py 2006-04-12 18:09:30 UTC (rev 66899)
@@ -171,8 +171,8 @@
_context.action(
discriminator = ('view', for_, name, IBrowserRequest, layer),
callable = handler,
- args = ('provideAdapter',
- (for_, layer), Interface, name, new_class, _context.info),
+ args = ('registerAdapter',
+ new_class, (for_, layer), Interface, name, _context.info),
)
@@ -348,8 +348,8 @@
_context.action(
discriminator = ('view', (for_, layer), name, self.provides),
callable = handler,
- args = ('provideAdapter',
- (for_, layer), self.provides, name, newclass,
+ args = ('registerAdapter',
+ newclass, (for_, layer), self.provides, name,
_context.info),
)
More information about the Zope3-Checkins
mailing list