[Zope3-checkins] SVN: Zope3/trunk/ Deprecate directive <zope:localUtility>.

Florent Xicluna laxyf at yahoo.fr
Sun Sep 17 11:31:04 EDT 2006


Log message for revision 70213:
  Deprecate directive <zope:localUtility>.
  Remove deprecated directive <zope:defaultLayer>.
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/app/authentication/configure.zcml
  U   Zope3/trunk/src/zope/app/authentication/httpplugins.zcml
  U   Zope3/trunk/src/zope/app/authentication/principalfolder.zcml
  U   Zope3/trunk/src/zope/app/authentication/session.zcml
  U   Zope3/trunk/src/zope/app/cache/configure.zcml
  U   Zope3/trunk/src/zope/app/catalog/configure.zcml
  U   Zope3/trunk/src/zope/app/catalog/tests.py
  U   Zope3/trunk/src/zope/app/component/contentdirective.py
  U   Zope3/trunk/src/zope/app/component/meta.zcml
  U   Zope3/trunk/src/zope/app/component/metaconfigure.py
  U   Zope3/trunk/src/zope/app/component/metadirectives.py
  U   Zope3/trunk/src/zope/app/error/configure.zcml
  U   Zope3/trunk/src/zope/app/homefolder/configure.zcml
  U   Zope3/trunk/src/zope/app/http/configure.zcml
  U   Zope3/trunk/src/zope/app/http/exception/configure.zcml
  U   Zope3/trunk/src/zope/app/i18n/configure.zcml
  U   Zope3/trunk/src/zope/app/intid/configure.zcml
  U   Zope3/trunk/src/zope/app/module/configure.zcml
  U   Zope3/trunk/src/zope/app/preference/configure.zcml
  U   Zope3/trunk/src/zope/app/principalannotation/configure.zcml
  U   Zope3/trunk/src/zope/app/principalannotation/interfaces.py
  U   Zope3/trunk/src/zope/app/schemacontent/configure.zcml
  U   Zope3/trunk/src/zope/app/security/configure.zcml
  U   Zope3/trunk/src/zope/app/securitypolicy/configure.zcml
  U   Zope3/trunk/src/zope/app/workflow/configure.zcml
  U   Zope3/trunk/src/zope/rdb/configure.zcml

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/doc/CHANGES.txt	2006-09-17 15:31:01 UTC (rev 70213)
@@ -37,6 +37,10 @@
 
     Restructuring
 
+      - Deprecated directive <zope:localUtility>, replaced by <zope:class>.
+
+      - Removed deprecated directive <zope:defaultLayer>.
+
       - Removed deprecated argument 'outstream' from ``zope.publisher``
         API, and removed other deprecated code.
 

Modified: Zope3/trunk/src/zope/app/authentication/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/authentication/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -4,7 +4,10 @@
     i18n_domain="zope"
     >
 
-  <localUtility class=".PluggableAuthentication">
+  <class class=".PluggableAuthentication">
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.ManageSite"
         interface=".interfaces.IPluggableAuthentication"
@@ -14,13 +17,14 @@
         permission="zope.ManageServices"
         attributes="registrationManager"
         />
-  </localUtility>
+  </class>
 
   <adapter
-    for=".interfaces.IQuerySchemaSearch
-         .interfaces.IPluggableAuthentication"
-    provides=".interfaces.IQueriableAuthenticator"
-    factory=".authentication.QuerySchemaSearchAdapter" />
+      for=".interfaces.IQuerySchemaSearch
+          .interfaces.IPluggableAuthentication"
+      provides=".interfaces.IQueriableAuthenticator"
+      factory=".authentication.QuerySchemaSearchAdapter"
+      />
 
   <utility
       component=".vocabulary.credentialsPlugins"

Modified: Zope3/trunk/src/zope/app/authentication/httpplugins.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/httpplugins.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/authentication/httpplugins.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,23 +1,26 @@
 <configure
     xmlns="http://namespaces.zope.org/zope"
     xmlns:browser="http://namespaces.zope.org/browser"
-    i18n_domain="zope">
-    
+    i18n_domain="zope"
+    >
+
   <utility
       name="Zope Realm Basic-Auth"
       provides=".interfaces.ICredentialsPlugin"
       factory=".httpplugins.HTTPBasicAuthCredentialsPlugin"
       />
 
-  <localUtility class=".httpplugins.HTTPBasicAuthCredentialsPlugin">
-
+  <class class=".httpplugins.HTTPBasicAuthCredentialsPlugin">
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.ManageServices"
         interface=".httpplugins.IHTTPBasicAuthRealm"
-        set_schema=".httpplugins.IHTTPBasicAuthRealm" />
+        set_schema=".httpplugins.IHTTPBasicAuthRealm"
+        />
+  </class>
 
-  </localUtility>
-  
   <include package=".browser" file="httpplugins.zcml" />
 
 </configure>

Modified: Zope3/trunk/src/zope/app/authentication/principalfolder.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/principalfolder.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/authentication/principalfolder.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -12,17 +12,23 @@
         />
   </class>
 
-  <localUtility class=".principalfolder.PrincipalFolder">
+  <class class=".principalfolder.PrincipalFolder">
 
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+
     <require
         permission="zope.ManageServices"
-        interface="zope.app.container.interfaces.IContainer" />
+        interface="zope.app.container.interfaces.IContainer"
+        />
 
     <require
         permission="zope.ManageServices"
-        attributes="prefix" />
+        attributes="prefix"
+        />
 
-  </localUtility>
+  </class>
 
   <adapter
       provides="zope.app.container.interfaces.INameChooser"

Modified: Zope3/trunk/src/zope/app/authentication/session.zcml
===================================================================
--- Zope3/trunk/src/zope/app/authentication/session.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/authentication/session.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,23 +1,29 @@
 <configure
     xmlns="http://namespaces.zope.org/zope"
     xmlns:browser="http://namespaces.zope.org/browser"
-    i18n_domain="zope">
-    
+    i18n_domain="zope"
+    >
+
   <utility
       name="Session Credentials"
       provides=".interfaces.ICredentialsPlugin"
       factory=".session.SessionCredentialsPlugin"
-     />
-    
-  <localUtility class=".session.SessionCredentialsPlugin">
+      />
 
+  <class class=".session.SessionCredentialsPlugin">
+
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+
     <require
         permission="zope.ManageServices"
         interface=".session.IBrowserFormChallenger"
-        set_schema=".session.IBrowserFormChallenger" />
+        set_schema=".session.IBrowserFormChallenger"
+        />
 
-  </localUtility>
-  
+  </class>
+
   <include package=".browser" file="session.zcml" />
-  
+
 </configure>

Modified: Zope3/trunk/src/zope/app/cache/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/cache/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/cache/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,6 +1,7 @@
 <configure 
     xmlns="http://namespaces.zope.org/zope"
-    i18n_domain="zope">
+    i18n_domain="zope"
+    >
 
   <adapter 
       for="zope.annotation.interfaces.IAnnotatable"
@@ -8,21 +9,24 @@
       factory="zope.app.cache.annotationcacheable.AnnotationCacheable"
       />
 
-  <localUtility class=".ram.RAMCache">
+  <class class=".ram.RAMCache">
+
     <factory
         id="zope.caching.RAMCache"
         />
 
     <implements
-        interface="zope.app.cache.interfaces.ICache"
+        interface="zope.annotation.interfaces.IAttributeAnnotatable
+                   zope.app.cache.interfaces.ICache"
         />
 
     <require 
         permission="zope.ManageServices" 
         interface="zope.app.cache.interfaces.ram.IRAMCache"
         />
-  </localUtility>
 
+  </class>
+
   <utility
       component=".caching.CacheNamesVocabulary"
       name="Cache Names"

Modified: Zope3/trunk/src/zope/app/catalog/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/catalog/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/catalog/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -4,10 +4,13 @@
     i18n_domain="zope"
     >
 
-  <localUtility class=".catalog.Catalog">
+  <class class=".catalog.Catalog">
     <factory
         id="zope.app.catalog"
         />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         interface="zope.app.catalog.interfaces.ICatalogQuery"
         permission="zope.Public"
@@ -20,36 +23,37 @@
         interface="zope.app.container.interfaces.IContainer"
         permission="zope.ManageServices"
         />
-  </localUtility>
-  
+  </class>
+
   <class class=".catalog.ResultSet">
     <require
         attributes="__iter__ __len__"
-        permission="zope.Public"/>
+        permission="zope.Public"
+        />
   </class>
-  
+
   <subscriber
       handler=".catalog.indexAdded"
       for=".interfaces.ICatalogIndex
            zope.app.container.interfaces.IObjectAddedEvent"
       />
-  
+
   <subscriber
       handler=".catalog.indexDocSubscriber"
       for="zope.app.intid.interfaces.IIntIdAddedEvent"
       />
-  
+
   <subscriber
       handler=".catalog.reindexDocSubscriber"
       for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
       />
-  
+
   <subscriber
       handler=".catalog.unindexDocSubscriber"
       for="zope.app.intid.interfaces.IIntIdRemovedEvent"
       />
-  
-  
+
+
   <class class=".field.FieldIndex">
     <require
         permission="zope.ManageServices"
@@ -59,7 +63,7 @@
         set_schema=".interfaces.IAttributeIndex"
         />
   </class>
-  
+
   <class class=".text.TextIndex">
     <require
         permission="zope.ManageServices"
@@ -69,7 +73,7 @@
         set_schema=".interfaces.IAttributeIndex"
         />
   </class>
-  
+
   <include package=".browser" />
 
   <interface interface="zope.index.text.interfaces.ISearchableText" />

Modified: Zope3/trunk/src/zope/app/catalog/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/catalog/tests.py	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/catalog/tests.py	2006-09-17 15:31:01 UTC (rev 70213)
@@ -21,8 +21,6 @@
 import unittest
 from zope.testing import doctest
 
-import BTrees.IFBTree
-
 from zope.interface import implements
 from zope.interface.verify import verifyObject
 from zope.app.testing import ztapi, setup, placelesssetup
@@ -33,7 +31,6 @@
 from zope.index.interfaces import IInjection, IIndexSearch
 from zope.app.catalog.interfaces import ICatalog
 from zope.app.catalog.catalog import Catalog
-from zope.app import zapi
 
 class ReferenceStub:
     def __init__(self, obj):

Modified: Zope3/trunk/src/zope/app/component/contentdirective.py
===================================================================
--- Zope3/trunk/src/zope/app/component/contentdirective.py	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/component/contentdirective.py	2006-09-17 15:31:01 UTC (rev 70213)
@@ -187,12 +187,16 @@
         warnings.warn_explicit(
             "The 'content' alias for the 'class' directive has been "
             "deprecated and will be removed in Zope 3.5.\n",
-            DeprecationWarning, _context.info.file, _context.info.line)        
+            DeprecationWarning, _context.info.file, _context.info.line)
         super(ContentDirective, self).__init__(_context, class_)
 
+# BBB 2006/09/17, to be removed after 12 months
 class LocalUtilityDirective(ClassDirective):
-    r"""localUtility directive handler.
+    r""" *BBB: DEPRECATED*
 
+    The ``localUtility`` alias for the ``class`` directive has been
+    deprecated and will be removed in Zope 3.5.
+
     Examples:
 
       >>> from zope.interface import implements
@@ -238,6 +242,9 @@
             raise ConfigurationError('Class `%s` does not implement '
                                      '`IPersistent`.' % class_.__name__)
 
+        warnings.warn_explicit(
+            "The 'localUtility' alias for the 'class' directive has been "
+            "deprecated and will be removed in Zope 3.5.\n",
+            DeprecationWarning, _context.info.file, _context.info.line)
         classImplements(class_, IAttributeAnnotatable)
-
         super(LocalUtilityDirective, self).__init__(_context, class_)

Modified: Zope3/trunk/src/zope/app/component/meta.zcml
===================================================================
--- Zope3/trunk/src/zope/app/component/meta.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/component/meta.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -32,12 +32,6 @@
         handler="zope.app.component.metaconfigure.resource"
         />
 
-    <meta:directive
-        name="defaultLayer"
-        schema=".metadirectives.IDefaultLayerDirective"
-        handler="zope.app.component.metaconfigure.defaultLayer"
-        />
-
     <meta:complexDirective
         name="class"
         schema=".metadirectives.IClassDirective"
@@ -69,7 +63,7 @@
     <!-- BBB 2006/02/24, to be removed after 12 months -->
     <meta:complexDirective
         name="content"
-        schema=".metadirectives.IClassDirective"
+        schema=".metadirectives.IBBBClassDirective"
         handler=".contentdirective.ContentDirective"
         >
 
@@ -95,9 +89,10 @@
 
     </meta:complexDirective>
 
+    <!-- BBB 2006/09/17, to be removed after 12 months -->
     <meta:complexDirective
         name="localUtility"
-        schema=".metadirectives.IClassDirective"
+        schema=".metadirectives.IBBBClassDirective"
         handler=".contentdirective.LocalUtilityDirective"
         >
 

Modified: Zope3/trunk/src/zope/app/component/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/component/metaconfigure.py	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/component/metaconfigure.py	2006-09-17 15:31:01 UTC (rev 70213)
@@ -250,12 +250,3 @@
            'the browser:defaultView directive. '
            'Will be gone in Zope 3.3.')
 
-############################################################################
-# BBB: Deprecated. Will go away in 3.4.
-def defaultLayer(_context, type, layer):
-    import warnings
-    warnings.warn("""The defaultLayer directive is deprecated and will
-go away in Zope 3.4.  It doesn't actually do anything, and never did.
-
-(%s)
-""" % _context.info, DeprecationWarning)

Modified: Zope3/trunk/src/zope/app/component/metadirectives.py
===================================================================
--- Zope3/trunk/src/zope/app/component/metadirectives.py	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/component/metadirectives.py	2006-09-17 15:31:01 UTC (rev 70213)
@@ -228,19 +228,22 @@
 
 
 class IClassDirective(zope.interface.Interface):
-    """Make statements about a class
+    """Make statements about a class"""
 
-    It is discouraged to use ``content`` or ``localUtility`` directives.
-    They are no longer useful, and will be deprecated soon or later.
-
-    Only use ``class`` directive for class statements.
-    """
-
     class_ = zope.configuration.fields.GlobalObject(
         title=_("Class"),
         required=True
         )
 
+# BBB 2006/09/17, to be removed after 12 months
+class IBBBClassDirective(IClassDirective):
+    """ *BBB: DEPRECATED*
+
+    It is discouraged to use ``content`` or ``localUtility`` directives.
+    They are currently deprecated:
+    only use ``class`` directive for class statements.
+    """
+
 class IImplementsSubdirective(zope.interface.Interface):
     """Declare that the class given by the content directive's class
     attribute implements a given interface
@@ -350,24 +353,3 @@
                       " factory does"),
         required=False,
         )
-
-# BBB: Deprecated. Will go away in 3.4.
-class IDefaultLayerDirective(zope.interface.Interface):
-    """
-    *BBB: DEPRECATED*
-
-    This directive has been deprecated and will go away in Zope 3.4.
-    It doesn't actually do anything, and never did.
-
-    (Associate a default layer with a request type.)
-    """
-
-    type = zope.configuration.fields.GlobalInterface(
-        title=_("Request type"),
-        required=True
-        )
-
-    layer = zope.configuration.fields.GlobalObject(
-        title=_("Layer"),
-        required=True
-        )

Modified: Zope3/trunk/src/zope/app/error/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/error/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/error/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,10 +1,14 @@
 <configure 
-    xmlns="http://namespaces.zope.org/zope">
+    xmlns="http://namespaces.zope.org/zope"
+    >
 
-  <localUtility class=".error.ErrorReportingUtility">
+  <class class=".error.ErrorReportingUtility">
     <factory
         id="zope.app.ErrorLogging"
         />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.Public"
         interface=".interfaces.IErrorReportingUtility"
@@ -13,7 +17,7 @@
         permission="zope.ManageServices"
         interface=".interfaces.ILocalErrorReportingUtility"
         />
-  </localUtility>
+  </class>
 
   <class class=".error.RootErrorReportingUtility">
     <require
@@ -28,7 +32,8 @@
 
   <utility
       provides=".interfaces.IErrorReportingUtility"
-      component=".error.globalErrorReportingUtility" />
+      component=".error.globalErrorReportingUtility"
+      />
 
   <subscriber
       for="zope.app.appsetup.IDatabaseOpenedEvent"

Modified: Zope3/trunk/src/zope/app/homefolder/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/homefolder/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/homefolder/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -14,35 +14,45 @@
       for="zope.security.interfaces.IPrincipal"
       provides="zope.traversing.interfaces.IPathAdapter"
       factory=".homefolder.getHomeFolder"
-      name="homefolder" />
+      name="homefolder"
+      />
 
-  <localUtility class=".homefolder.HomeFolderManager">
+  <class class=".homefolder.HomeFolderManager">
 
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+
     <require
         permission="zope.ManageServices"
         interface=".homefolder.IHomeFolderManager"
-        set_schema=".homefolder.IHomeFolderManager" />
+        set_schema=".homefolder.IHomeFolderManager"
+        />
 
     <require
         permission="zope.ManageServices"
-        attributes="assignments" />
+        attributes="assignments"
+        />
 
-  </localUtility>
+  </class>
 
   <browser:addform
       schema=".interfaces.IHomeFolderManager"
       label="Add Home Folder Manager"
       content_factory=".homefolder.HomeFolderManager"
       name="AddHomeFolderManagerForm.html"
-      permission="zope.ManageServices">
+      permission="zope.ManageServices"
+      >
 
     <browser:widget
-      field="homeFolderBase"
-      class=".browser.PathWidget" />
+        field="homeFolderBase"
+        class=".browser.PathWidget"
+        />
 
     <browser:widget
-      field="containerObject"
-      class=".browser.DottedNameWidget" />
+        field="containerObject"
+        class=".browser.DottedNameWidget"
+        />
 
   </browser:addform>
 
@@ -58,16 +68,18 @@
       label="Edit Home Folder Manager"
       name="edit.html"
       permission="zope.ManageServices"
-      menu="zmi_views" title="Edit">
+      menu="zmi_views" title="Edit"
+      >
 
     <browser:widget
-      field="homeFolderBase"
-      class=".browser.PathWidget" />
+        field="homeFolderBase"
+        class=".browser.PathWidget"
+        />
 
     <browser:widget
-      field="containerObject"
-      class=".browser.DottedNameWidget" />
-    
+        field="containerObject"
+        class=".browser.DottedNameWidget"
+        />
 
   </browser:editform>
 
@@ -95,5 +107,4 @@
 
   </configure>
 
-
 </configure>

Modified: Zope3/trunk/src/zope/app/http/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/http/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/http/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -14,49 +14,49 @@
   />
 
 <view
-  for="zope.app.container.interfaces.IItemContainer"
-  type="zope.publisher.interfaces.http.IHTTPRequest"
-  provides="zope.publisher.interfaces.http.IHTTPPublisher"
-  factory=".traversal.ItemTraverser"
-  permission="zope.Public"
-  allowed_interface="zope.publisher.interfaces.IPublishTraverse"
-  />
+    for="zope.app.container.interfaces.IItemContainer"
+    type="zope.publisher.interfaces.http.IHTTPRequest"
+    provides="zope.publisher.interfaces.http.IHTTPPublisher"
+    factory=".traversal.ItemTraverser"
+    permission="zope.Public"
+    allowed_interface="zope.publisher.interfaces.IPublishTraverse"
+    />
 
 <view
-  for="zope.app.http.interfaces.INullResource"
-  name="PUT"
-  type="zope.publisher.interfaces.http.IHTTPRequest"
-  factory=".put.NullPUT"
-  permission="zope.Public"
-  allowed_attributes="PUT"
-  />
+    for="zope.app.http.interfaces.INullResource"
+    name="PUT"
+    type="zope.publisher.interfaces.http.IHTTPRequest"
+    factory=".put.NullPUT"
+    permission="zope.Public"
+    allowed_attributes="PUT"
+    />
 
 <view
-  for="*"
-  name="PUT"
-  type="zope.publisher.interfaces.http.IHTTPRequest"
-  factory=".put.FilePUT"
-  permission="zope.Public"
-  allowed_attributes="PUT"
-  />
+    for="*"
+    name="PUT"
+    type="zope.publisher.interfaces.http.IHTTPRequest"
+    factory=".put.FilePUT"
+    permission="zope.Public"
+    allowed_attributes="PUT"
+    />
 
 <view
-  for="*"
-  name="DELETE"
-  type="zope.publisher.interfaces.http.IHTTPRequest"
-  factory=".delete.DELETE"
-  permission="zope.Public"
-  allowed_attributes="DELETE"
-  />
+    for="*"
+    name="DELETE"
+    type="zope.publisher.interfaces.http.IHTTPRequest"
+    factory=".delete.DELETE"
+    permission="zope.Public"
+    allowed_attributes="DELETE"
+    />
 
 <view
-  for="*"
-  name="OPTIONS"
-  type="zope.publisher.interfaces.http.IHTTPRequest"
-  factory=".options.OPTIONS"
-  permission="zope.ManageContent"
-  allowed_attributes="OPTIONS"
-  />
+    for="*"
+    name="OPTIONS"
+    type="zope.publisher.interfaces.http.IHTTPRequest"
+    factory=".options.OPTIONS"
+    permission="zope.ManageContent"
+    allowed_attributes="OPTIONS"
+    />
 
 <include package=".exception" />
 

Modified: Zope3/trunk/src/zope/app/http/exception/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/http/exception/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/http/exception/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,4 +1,5 @@
-<configure xmlns="http://namespaces.zope.org/zope">
+<configure
+    xmlns="http://namespaces.zope.org/zope">
 
 <view
     for="zope.security.interfaces.IUnauthorized"

Modified: Zope3/trunk/src/zope/app/i18n/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/i18n/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/i18n/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,5 +1,6 @@
 <configure
-   xmlns="http://namespaces.zope.org/zope">
+    xmlns="http://namespaces.zope.org/zope"
+    >
 
   <!-- Setup language negotiation -->
   <utility
@@ -7,64 +8,80 @@
       component="zope.i18n.negotiator.negotiator"
       />
 
-  <adapter factory="zope.app.publisher.browser.ModifiableBrowserLanguages"
+  <adapter
+      factory="zope.app.publisher.browser.ModifiableBrowserLanguages"
       for="zope.publisher.interfaces.http.IHTTPRequest"
       provides="zope.i18n.interfaces.IModifiableUserPreferredLanguages"
       />
 
   <class class="zope.publisher.http.HTTPRequest">
-      <implements interface="zope.annotation.IAttributeAnnotatable" />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
   </class>
 
   <!-- Setup charset negotiation -->
-  <adapter factory="zope.publisher.http.HTTPCharsets"
+  <adapter
+      factory="zope.publisher.http.HTTPCharsets"
       for="zope.publisher.interfaces.http.IHTTPRequest"
       provides="zope.i18n.interfaces.IUserPreferredCharsets"
       />
 
   <!-- Register the Translation Domain as a content object -->
-  <localUtility class=".translationdomain.TranslationDomain">
+  <class class=".translationdomain.TranslationDomain">
     <factory
-         id="zope.app.i18n.TranslationDomain"
-         />
-    <allow interface="zope.i18n.interfaces.ITranslationDomain"
+        id="zope.app.i18n.TranslationDomain"
         />
-    <require permission="zope.ManageSite"
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+    <allow
+        interface="zope.i18n.interfaces.ITranslationDomain"
+        />
+    <require
+        permission="zope.ManageSite"
         interface="zope.app.container.interfaces.IContainer"
         />
-    <require permission="zope.ManageSite"
+    <require
+        permission="zope.ManageSite"
         interface=".interfaces.IWriteTranslationDomain"
         />
-    <require permission="zope.ManageSite"
+    <require
+        permission="zope.ManageSite"
         interface=".interfaces.ISyncTranslationDomain"
         />
-  </localUtility>
+  </class>
 
   <subscriber
-       for=".interfaces.ILocalTranslationDomain
-            zope.component.interfaces.IRegistered"
-       handler=".translationdomain.setDomainOnActivation"
-       />
+      for=".interfaces.ILocalTranslationDomain
+           zope.component.interfaces.IRegistered"
+      handler=".translationdomain.setDomainOnActivation"
+      />
 
   <subscriber
-       for=".interfaces.ILocalTranslationDomain
-            zope.component.interfaces.IUnregistered"
-       handler=".translationdomain.unsetDomainOnDeactivation"
-       />
+      for=".interfaces.ILocalTranslationDomain
+           zope.component.interfaces.IUnregistered"
+      handler=".translationdomain.unsetDomainOnDeactivation"
+      />
 
   <!-- Setup Message Catalogs -->
   <class class=".messagecatalog.MessageCatalog">
-    <factory id="zope.app.MessageCatalog" />
+    <factory
+        id="zope.app.MessageCatalog"
+        />
     <implements
-        interface="zope.annotation.interfaces.IAttributeAnnotatable" />
-
-    <require permission="zope.View"
-        interface="zope.i18n.interfaces.IMessageCatalog" />
-    <require permission="zope.ManageSite"
-        attributes="setMessage getMessageIds" />
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
+    <require
+        permission="zope.View"
+        interface="zope.i18n.interfaces.IMessageCatalog"
+        />
+    <require
+        permission="zope.ManageSite"
+        attributes="setMessage getMessageIds"
+        />
   </class>
 
-
   <!-- Setup Export and Import Filters -->
   <adapter
       factory=".filters.GettextExportFilter"

Modified: Zope3/trunk/src/zope/app/intid/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/intid/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/intid/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,6 +1,9 @@
-<configure xmlns="http://namespaces.zope.org/zope" i18n_domain="zope">
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    i18n_domain="zope"
+    >
 
-  <localUtility class=".IntIds">
+  <class class=".IntIds">
     <factory
         id="zope.app.intid.IntIds"
         />
@@ -18,12 +21,13 @@
         permission="zope.ManageContent"
         interface=".interfaces.IIntIdsSet"
         />
+
     <require
         permission="zope.Public"
         interface=".interfaces.IIntIdsManage"
         />
 
-  </localUtility>
+  </class>
 
   <subscriber handler=".removeIntIdSubscriber" />
   <subscriber handler=".addIntIdSubscriber" />

Modified: Zope3/trunk/src/zope/app/module/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/module/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/module/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,15 +1,19 @@
-<configure xmlns="http://namespaces.zope.org/zope">
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    >
 
-  <localUtility class=".manager.ModuleManager">
+  <class class=".manager.ModuleManager">
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.ManageCode"
         interface=".interfaces.IModuleManager"
         set_schema=".interfaces.IModuleManager"
         />
-  </localUtility>
+  </class>
 
   <subscriber handler=".manager.setNameOnActivation" />
-
   <subscriber handler=".manager.unsetNameOnDeactivation" />
 
   <adapter

Modified: Zope3/trunk/src/zope/app/preference/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/preference/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/preference/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,9 +1,10 @@
 <configure
-  xmlns="http://namespaces.zope.org/zope"
-  xmlns:browser="http://namespaces.zope.org/browser"
-  xmlns:apidoc="http://namespaces.zope.org/apidoc"
-  xmlns:zcml="http://namespaces.zope.org/zcml"
-  i18n_domain="zope">
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:browser="http://namespaces.zope.org/browser"
+    xmlns:apidoc="http://namespaces.zope.org/apidoc"
+    xmlns:zcml="http://namespaces.zope.org/zcml"
+    i18n_domain="zope"
+    >
 
   <view
       name="preferences"
@@ -52,12 +53,15 @@
 
 
   <!-- Default Preference Provider -->
-  <localUtility class=".default.DefaultPreferenceProvider">
+  <class class=".default.DefaultPreferenceProvider">
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.ManageSite"
         interface=".interfaces.IDefaultPreferenceProvider"
         />
-  </localUtility>
+  </class>
 
   <view
       name="preferences"
@@ -68,11 +72,11 @@
       />
 
   <browser:addMenuItem
-       class=".default.DefaultPreferenceProvider"
-       title="Default User Preferences Provider"
-       description="A Default User Preferences Provider"
-       permission="zope.ManageSite"
-       />
+      class=".default.DefaultPreferenceProvider"
+      title="Default User Preferences Provider"
+      description="A Default User Preferences Provider"
+      permission="zope.ManageSite"
+      />
 
   <!-- Preferences-specific macros -->
   <browser:page

Modified: Zope3/trunk/src/zope/app/principalannotation/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/principalannotation/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/principalannotation/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -3,23 +3,27 @@
     xmlns:browser="http://namespaces.zope.org/browser"
     >
 
-  <localUtility class=".PrincipalAnnotationUtility">
+  <class class=".PrincipalAnnotationUtility">
     <factory
         id="zope.app.PrincipalAnnotationUtility"
         />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.View"
         interface=".interfaces.IPrincipalAnnotationUtility"
         />
-    </localUtility>
+  </class>
 
   <!-- Principal annotations (user data) utility -->
 
   <browser:addMenuItem
-     class=".PrincipalAnnotationUtility"
-     permission="zope.ManageServices"
-     title="Principal Annotation Utility"
-     description="Stores Annotations for Principals" />
+      class=".PrincipalAnnotationUtility"
+      permission="zope.ManageServices"
+      title="Principal Annotation Utility"
+      description="Stores Annotations for Principals"
+      />
 
   <subscriber
       for="zope.app.appsetup.IDatabaseOpenedEvent"

Modified: Zope3/trunk/src/zope/app/principalannotation/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/principalannotation/interfaces.py	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/principalannotation/interfaces.py	2006-09-17 15:31:01 UTC (rev 70213)
@@ -40,8 +40,3 @@
     def hasAnnotations(principal):
         """Return boolean indicating if given `IPrincipal` has
         `IAnnotations`."""
-
-#############################################################################
-# BBB: 12/20/2004
-IPrincipalAnnotationService = IPrincipalAnnotationUtility
-#############################################################################

Modified: Zope3/trunk/src/zope/app/schemacontent/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/schemacontent/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/schemacontent/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,29 +1,33 @@
 <configure 
-  xmlns="http://namespaces.zope.org/zope"
-  xmlns:browser="http://namespaces.zope.org/browser"
-  i18n_domain="zope">
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:browser="http://namespaces.zope.org/browser"
+    i18n_domain="zope"
+    >
 
 <!-- Content Component Definition -->
 
-  <localUtility class=".content.ContentComponentDefinition">
-
+  <class class=".content.ContentComponentDefinition">
     <factory
-      id="utility.ContentComponentDefinition"
-      title="Content Component Definition"
-      description="A Persistent Content Component Definition" />
-
+        id="utility.ContentComponentDefinition"
+        title="Content Component Definition"
+        description="A Persistent Content Component Definition"
+        />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
-      permission="zope.ManageServices"
-      interface=".interfaces.IContentComponentDefinition"
-      set_schema=".interfaces.IContentComponentDefinition" />
+        permission="zope.ManageServices"
+        interface=".interfaces.IContentComponentDefinition"
+        set_schema=".interfaces.IContentComponentDefinition"
+        />
+  </class>
 
-  </localUtility>
-
 <!-- Content Component Instance -->
 
   <class class=".content.ContentComponentInstance">
     <implements
-      interface="zope.annotation.interfaces.IAttributeAnnotatable" />
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
   </class>
 
   <subscriber handler=".content.registeredContentComponent" />

Modified: Zope3/trunk/src/zope/app/security/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/security/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/security/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -25,12 +25,16 @@
 
   <utility
       provides=".interfaces.IAuthentication"
-      component=".principalregistry.principalRegistry" />
+      component=".principalregistry.principalRegistry"
+      />
 
-  <localUtility class=".permission.LocalPermission">
+  <class class=".permission.LocalPermission">
     <factory
         id="zope.app.security.Permission"
         />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <allow
         interface="zope.security.interfaces.IPermission"
         />
@@ -38,31 +42,37 @@
         permission="zope.Security"
         set_schema="zope.security.interfaces.IPermission"
         />
-  </localUtility>
+  </class>
 
   <subscriber
-     for="zope.security.interfaces.IPermission
-          zope.component.interfaces.IRegistered"
-     handler=".permission.setIdOnActivation"
-     />
+      for="zope.security.interfaces.IPermission
+           zope.component.interfaces.IRegistered"
+      handler=".permission.setIdOnActivation"
+      />
 
   <subscriber
-     for="zope.security.interfaces.IPermission
-          zope.component.interfaces.IUnregistered"
-     handler=".permission.unsetIdOnDeactivation"
-     />
+      for="zope.security.interfaces.IPermission
+           zope.component.interfaces.IUnregistered"
+      handler=".permission.unsetIdOnDeactivation"
+      />
 
   <class class="zope.security.permission.Permission">
-    <allow interface="zope.security.interfaces.IPermission" />
+    <allow
+        interface="zope.security.interfaces.IPermission"
+        />
   </class>
 
   <class class=".principalregistry.Principal">
-    <allow interface=".interfaces.IPrincipal" />
+    <allow
+        interface=".interfaces.IPrincipal"
+        />
   </class>
 
   <class class=".settings.PermissionSetting">
-    <require permission="zope.Public"
-             attributes="getName getDescription __str__" />
+    <require
+        permission="zope.Public"
+        attributes="getName getDescription __str__"
+        />
   </class>
 
   <adapter factory=".NoLogout" />
@@ -136,4 +146,3 @@
       />
 
 </configure>
-

Modified: Zope3/trunk/src/zope/app/securitypolicy/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/securitypolicy/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -3,11 +3,12 @@
     i18n_domain="zope"
     >
 
-  <adapter factory=".rolepermission.AnnotationRolePermissionManager"
-           provides=".interfaces.IRolePermissionManager"
-           for="zope.annotation.interfaces.IAnnotatable"
-           trusted="true"
-           />
+  <adapter
+      factory=".rolepermission.AnnotationRolePermissionManager"
+      provides=".interfaces.IRolePermissionManager"
+      for="zope.annotation.interfaces.IAnnotatable"
+      trusted="true"
+      />
 
   <class class=".rolepermission.AnnotationRolePermissionManager">
     <require
@@ -15,14 +16,17 @@
         attributes="grantPermissionToRole denyPermissionToRole
                     unsetPermissionFromRole"
         />
-    <allow interface=".interfaces.IRolePermissionMap" />
+    <allow
+        interface=".interfaces.IRolePermissionMap"
+        />
   </class>
 
-  <adapter factory=".principalrole.AnnotationPrincipalRoleManager"
-           provides=".interfaces.IPrincipalRoleManager"
-           for="zope.annotation.interfaces.IAnnotatable"
-           trusted="true"
-           />
+  <adapter
+      factory=".principalrole.AnnotationPrincipalRoleManager"
+      provides=".interfaces.IPrincipalRoleManager"
+      for="zope.annotation.interfaces.IAnnotatable"
+      trusted="true"
+      />
 
   <class class=".principalrole.AnnotationPrincipalRoleManager">
     <require
@@ -30,14 +34,17 @@
         attributes="assignRoleToPrincipal removeRoleFromPrincipal
                     unsetRoleForPrincipal"
         />
-    <allow interface=".interfaces.IPrincipalRoleMap" />
+    <allow
+        interface=".interfaces.IPrincipalRoleMap"
+        />
   </class>
 
-  <adapter factory=".principalpermission.AnnotationPrincipalPermissionManager"
-           provides=".interfaces.IPrincipalPermissionManager"
-           for="zope.annotation.interfaces.IAnnotatable"
-           trusted="true"
-           />
+  <adapter
+      factory=".principalpermission.AnnotationPrincipalPermissionManager"
+      provides=".interfaces.IPrincipalPermissionManager"
+      for="zope.annotation.interfaces.IAnnotatable"
+      trusted="true"
+      />
 
   <class class=".principalpermission.AnnotationPrincipalPermissionManager">
     <require
@@ -45,40 +52,46 @@
         attributes="grantPermissionToPrincipal denyPermissionToPrincipal
                     unsetPermissionForPrincipal"
         />
-    <allow interface=".interfaces.IPrincipalPermissionMap" />
+    <allow
+        interface=".interfaces.IPrincipalPermissionMap"
+        />
   </class>
 
-  <adapter factory=".grantinfo.AnnotationGrantInfo"
-           provides=".interfaces.IGrantInfo"
-           for="zope.annotation.interfaces.IAnnotatable"
-           />
+  <adapter
+      factory=".grantinfo.AnnotationGrantInfo"
+      provides=".interfaces.IGrantInfo"
+      for="zope.annotation.interfaces.IAnnotatable"
+      />
 
   <!-- protect Roles and Permissions -->
-  <localUtility class=".role.LocalRole">
+  <class class=".role.LocalRole">
     <factory
         id="zope.security.role.Role"
         />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.Security"
         interface=".interfaces.IRole"
         set_schema=".interfaces.IRole"
         />
-  </localUtility>
+  </class>
 
   <subscriber
-     for=".interfaces.IRole
-         zope.component.interfaces.IRegistered"
-     handler=".role.setIdOnActivation"
-     />
+      for=".interfaces.IRole
+           zope.component.interfaces.IRegistered"
+      handler=".role.setIdOnActivation"
+      />
 
   <subscriber
-     for=".interfaces.IRole
-          zope.component.interfaces.IUnregistered"
-     handler=".role.unsetIdOnDeactivation"
-     />
+      for=".interfaces.IRole
+           zope.component.interfaces.IUnregistered"
+      handler=".role.unsetIdOnDeactivation"
+      />
 
   <!-- Include browser package -->
-  <include package=".browser"/>
+  <include package=".browser" />
 
 
   <!-- Vocabularies -->

Modified: Zope3/trunk/src/zope/app/workflow/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/workflow/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/app/workflow/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -1,7 +1,7 @@
 <configure
-   xmlns="http://namespaces.zope.org/zope"
-   i18n_domain="zope"
-   >
+    xmlns="http://namespaces.zope.org/zope"
+    i18n_domain="zope"
+    >
 
   <!-- Workflow Permissions -->
 
@@ -27,15 +27,18 @@
        This is only a generic placeholder for
        future Process Definition implementations -->
 
-  <localUtility class="zope.app.workflow.definition.ProcessDefinition">
+  <class class="zope.app.workflow.definition.ProcessDefinition">
     <factory
         id="zope.app.workflow.ProcessDefinition"
         />
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.ManageServices"
         interface="zope.app.workflow.interfaces.IProcessDefinition" 
         />
-  </localUtility>
+  </class>
 
   <!-- Process Definition Name Vocabualry -->
 
@@ -45,28 +48,25 @@
       />
 
   <class class=".definition.ProcessDefinitionVocabulary">
-      <allow interface="zope.schema.interfaces.IVocabularyTokenized"/>
+    <allow interface="zope.schema.interfaces.IVocabularyTokenized" />
   </class>
 
   <class class=".definition.ProcessDefinitionTerm">
-      <allow interface="zope.schema.interfaces.ITokenizedTerm"/>
+    <allow interface="zope.schema.interfaces.ITokenizedTerm" />
   </class>
 
 
   <!-- Process Instance Container -->
 
   <class 
-        class="zope.app.workflow.definition.ProcessDefinitionElementContainer">
-
+      class="zope.app.workflow.definition.ProcessDefinitionElementContainer">
     <implements
-       interface="zope.annotation.interfaces.IAttributeAnnotatable"
-       />
-
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.View"
         interface="zope.app.container.interfaces.IReadContainer"
         />
-
     <require
         permission="zope.workflow.ManageProcessDefinitions"
         interface="zope.app.container.interfaces.IWriteContainer"

Modified: Zope3/trunk/src/zope/rdb/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/rdb/configure.zcml	2006-09-17 15:06:34 UTC (rev 70212)
+++ Zope3/trunk/src/zope/rdb/configure.zcml	2006-09-17 15:31:01 UTC (rev 70213)
@@ -29,21 +29,23 @@
         />
   </class>
 
-  <localUtility class="zope.rdb.ZopeDatabaseAdapter">
-
+  <class class="zope.rdb.ZopeDatabaseAdapter">
+    <implements
+        interface="zope.annotation.interfaces.IAttributeAnnotatable"
+        />
     <require
         permission="zope.rdb.Use"
-        interface="zope.rdb.interfaces.IZopeDatabaseAdapter" />
+        interface="zope.rdb.interfaces.IZopeDatabaseAdapter"
+        />
+  </class>
 
-  </localUtility>
-
   <class class="zope.rdb.ResultSet">
     <!-- require zope.View for all list methods -->
     <require
         permission="zope.View"
         attributes="__getitem__ __getslice__ __len__ __iter__ __contains__
-                    index count __str__ __add__ __radd__" />
-
+                    index count __str__ __add__ __radd__"
+        />
     <!-- Also require zope.View on the columns attribute, which is
          specified in IResultSet -->
     <require



More information about the Zope3-Checkins mailing list