[Checkins] SVN: zope.app.component/trunk/ Removed deprecated `zope:defaultView` directive and its
Baiju M
baiju.m.mail at gmail.com
Wed Apr 1 14:00:38 EDT 2009
Log message for revision 98766:
Removed deprecated `zope:defaultView` directive and its
implementation. New directive to set default view is
`browser:defaultView`.
Changed:
U zope.app.component/trunk/CHANGES.txt
U zope.app.component/trunk/setup.py
U zope.app.component/trunk/src/zope/app/component/meta.zcml
U zope.app.component/trunk/src/zope/app/component/metaconfigure.py
U zope.app.component/trunk/src/zope/app/component/metadirectives.py
U zope.app.component/trunk/src/zope/app/component/tests/test_directives.py
-=-
Modified: zope.app.component/trunk/CHANGES.txt
===================================================================
--- zope.app.component/trunk/CHANGES.txt 2009-04-01 17:06:21 UTC (rev 98765)
+++ zope.app.component/trunk/CHANGES.txt 2009-04-01 18:00:32 UTC (rev 98766)
@@ -2,10 +2,12 @@
CHANGES
=======
-3.6.2 (unreleased)
+3.7.0 (unreleased)
------------------
-- ...
+- Removed deprecated `zope:defaultView` directive and its
+ implementation. New directive to set default view is
+ `browser:defaultView`.
3.6.1 (2009-03-12)
------------------
Modified: zope.app.component/trunk/setup.py
===================================================================
--- zope.app.component/trunk/setup.py 2009-04-01 17:06:21 UTC (rev 98765)
+++ zope.app.component/trunk/setup.py 2009-04-01 18:00:32 UTC (rev 98766)
@@ -22,7 +22,7 @@
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(name='zope.app.component',
- version = '3.6.2dev',
+ version='3.7.0dev',
author='Zope Corporation and Contributors',
author_email='zope-dev at zope.org',
description='Local Zope Component Support',
@@ -34,8 +34,8 @@
+ '\n\n' +
read('CHANGES.txt')
),
- keywords = "zope component architecture local",
- classifiers = [
+ keywords="zope component architecture local",
+ classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
@@ -48,7 +48,7 @@
url='http://pypi.python.org/pypi/zope.app.component',
license='ZPL 2.1',
packages=find_packages('src'),
- package_dir = {'': 'src'},
+ package_dir={'': 'src'},
namespace_packages=['zope', 'zope.app'],
extras_require=dict(
test=['zope.app.testing',
@@ -84,7 +84,7 @@
'zope.traversing',
'ZODB3',
],
- include_package_data = True,
- zip_safe = False,
+ include_package_data=True,
+ zip_safe=False,
)
Modified: zope.app.component/trunk/src/zope/app/component/meta.zcml
===================================================================
--- zope.app.component/trunk/src/zope/app/component/meta.zcml 2009-04-01 17:06:21 UTC (rev 98765)
+++ zope.app.component/trunk/src/zope/app/component/meta.zcml 2009-04-01 18:00:32 UTC (rev 98766)
@@ -16,14 +16,7 @@
handler="zope.app.component.metaconfigure.view"
/>
- <!-- BBB: Deprecated. Will go away in 3.3 -->
<meta:directive
- name="defaultView"
- schema=".metadirectives.IDefaultViewDirective"
- handler="zope.app.component.metaconfigure.defaultView"
- />
-
- <meta:directive
name="resource"
schema=".metadirectives.IResourceDirective"
handler="zope.app.component.metaconfigure.resource"
Modified: zope.app.component/trunk/src/zope/app/component/metaconfigure.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/metaconfigure.py 2009-04-01 17:06:21 UTC (rev 98765)
+++ zope.app.component/trunk/src/zope/app/component/metaconfigure.py 2009-04-01 18:00:32 UTC (rev 98766)
@@ -24,7 +24,6 @@
from zope.configuration.exceptions import ConfigurationError
from zope.security.checker import CheckerPublic
from zope.security.checker import Checker
-from zope.publisher.interfaces import IDefaultViewName
PublicPermission = 'zope.Public'
@@ -182,33 +181,3 @@
callable = provideInterface,
args = ('', iface)
)
-############################################################################
-# BBB: Deprecated. Will go away in 3.3.
-
-def defaultView(_context, type, name, for_):
-
- _context.action(
- discriminator = ('defaultViewName', for_, type, name),
- callable = handler,
- args = ('registerAdapter',
- name, (for_, type), IDefaultViewName, '',_context.info)
- )
-
- _context.action(
- discriminator = None,
- callable = provideInterface,
- args = ('', type)
- )
-
- _context.action(
- discriminator = None,
- callable = provideInterface,
- args = ('', for_)
- )
-
-from zope.deprecation import deprecated
-deprecated('defaultView',
- 'The zope:defaultView directive has been deprecated in favor of '
- 'the browser:defaultView directive. '
- 'Will be gone in Zope 3.3.')
-
Modified: zope.app.component/trunk/src/zope/app/component/metadirectives.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/metadirectives.py 2009-04-01 17:06:21 UTC (rev 98765)
+++ zope.app.component/trunk/src/zope/app/component/metadirectives.py 2009-04-01 18:00:32 UTC (rev 98766)
@@ -137,33 +137,7 @@
value_type=zope.configuration.fields.GlobalObject(),
)
-############################################################################
-# BBB: Deprecated; use browser:defaultView instead. Will go away in 3.3.
-class IDefaultViewDirective(IBasicResourceInformation):
- """
- *BBB: DEPRECATED*
- Use ``browser:defaultView`` instead.
-
- The name of the view that should be the default.
-
- This name refers to view that should be the
- view used by default (if no view name is supplied
- explicitly).
- """
-
- for_ = zope.configuration.fields.GlobalInterface(
- title=_("The interface this view is the default for."),
- description=_("""
- Specifies the interface for which the default view is declared. All
- objects implementing this interface make use of this default
- setting. If this attribute is not specified, the default is available
- for all objects."""),
- required=False,
- )
-############################################################################
-
-
class IResourceDirective(IBasicComponentInformation,
IBasicResourceInformation):
"""Register a resource"""
Modified: zope.app.component/trunk/src/zope/app/component/tests/test_directives.py
===================================================================
--- zope.app.component/trunk/src/zope/app/component/tests/test_directives.py 2009-04-01 17:06:21 UTC (rev 98765)
+++ zope.app.component/trunk/src/zope/app/component/tests/test_directives.py 2009-04-01 18:00:32 UTC (rev 98766)
@@ -373,29 +373,6 @@
))
self.assertRaises(ValueError, xmlconfig, config, testing=1)
-
- def testDefaultView(self):
- ob = Ob()
- self.assertEqual(
- zope.component.queryMultiAdapter((Ob(), Request(IV)), name='test'),
- None)
-
- xmlconfig(StringIO(template % (
- '''
- <defaultView name="test"
- for="zope.app.component.tests.views.IC"
- type="zope.app.component.tests.views.IV"/>
- '''
- )))
-
- self.assertEqual(
- zope.component.queryMultiAdapter((Ob(), Request(IV)), name='test'),
- None)
- self.assertEqual(
- zope.component.getGlobalSiteManager().adapters.lookup(
- (IC, IV), IDefaultViewName),
- 'test')
-
def testResource(self):
ob = Ob()
self.assertEqual(
More information about the Checkins
mailing list