[Checkins] SVN: zope.app.component/trunk/src/zope/app/component/meta Remove factory directive.

Dan Korostelev nadako at gmail.com
Sat Dec 13 17:18:32 EST 2008


Log message for revision 94040:
  Remove factory directive.

Changed:
  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

-=-
Modified: zope.app.component/trunk/src/zope/app/component/meta.zcml
===================================================================
--- zope.app.component/trunk/src/zope/app/component/meta.zcml	2008-12-13 22:16:56 UTC (rev 94039)
+++ zope.app.component/trunk/src/zope/app/component/meta.zcml	2008-12-13 22:18:32 UTC (rev 94040)
@@ -12,14 +12,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	2008-12-13 22:16:56 UTC (rev 94039)
+++ zope.app.component/trunk/src/zope/app/component/metaconfigure.py	2008-12-13 22:18:32 UTC (rev 94040)
@@ -22,7 +22,7 @@
 from zope.interface import Interface
 from zope.component.zcml import handler, proxify, utility
 from zope.component.interface import provideInterface
-from zope.component.interfaces import IDefaultViewName, IFactory
+from zope.component.interfaces import IFactory
 from zope.configuration.exceptions import ConfigurationError
 from zope.security.checker import CheckerPublic
 from zope.security.checker import Checker, NamesChecker
@@ -192,33 +192,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	2008-12-13 22:16:56 UTC (rev 94039)
+++ zope.app.component/trunk/src/zope/app/component/metadirectives.py	2008-12-13 22:18:32 UTC (rev 94040)
@@ -25,13 +25,6 @@
 
 from zope.app.component.i18n import ZopeMessageFactory as _
 
-class IDefaultViewName(zope.interface.Interface):
-    """A string that contains the default view name
-
-    A default view name is used to select a view when a user hasn't
-    specified one.
-    """
-
 class IBasicViewInformation(zope.interface.Interface):
     """This is the basic information for all views."""
 
@@ -128,33 +121,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"""



More information about the Checkins mailing list