[Zope3-checkins] CVS: Zope3/src/zope/app/utility - __init__.py:1.3 configure.zcml:1.2 interfaces.py:1.2 tests.py:1.3 utility.txt:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Mar 13 13:01:55 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/utility
In directory cvs.zope.org:/tmp/cvs-serv27233/src/zope/app/utility

Modified Files:
	__init__.py configure.zcml interfaces.py tests.py utility.txt 
Log Message:


Moved registration code to zope.app.registration. Created module aliases, so
that old ZODBs work.


=== Zope3/src/zope/app/utility/__init__.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/utility/__init__.py:1.2	Sat Mar 13 10:21:39 2004
+++ Zope3/src/zope/app/utility/__init__.py	Sat Mar 13 13:01:23 2004
@@ -20,12 +20,12 @@
 from persistent.dict import PersistentDict
 from persistent import Persistent
 from zope.app.component.nextservice import getNextService
-from zope.app.interfaces.services.registration import IRegistry
+from zope.app.registration.interfaces import IRegistry
 from zope.app.site.interfaces import ISimpleService
 from zope.app.utility.interfaces import \
      IUtilityRegistration, ILocalUtilityService
 from zope.app.services.servicenames import Utilities
-from zope.app.services.registration import \
+from zope.app.registration.registration import \
      RegistrationStack, ComponentRegistration
 from zope.component.exceptions import ComponentLookupError
 from zope.interface.implementor import ImplementorRegistry
@@ -98,13 +98,13 @@
         return L
 
     def queryRegistrationsFor(self, registration, default=None):
-        """zope.app.interfaces.services.registration.IRegistry"""
+        """zope.app.registration.interfaces.IRegistry"""
         return self.queryRegistrations(registration.name,
                                         registration.interface,
                                         default)
 
     def queryRegistrations(self, name, interface, default=None):
-        """zope.app.interfaces.services.registration.IRegistry"""
+        """zope.app.registration.interfaces.IRegistry"""
         utilities = self._utilities.get(name)
         if utilities is None:
             return default
@@ -115,7 +115,7 @@
         return stack
 
     def createRegistrationsFor(self, registration):
-        """zope.app.interfaces.services.registration.IRegistry"""
+        """zope.app.registration.interfaces.IRegistry"""
         return self.createRegistrations(registration.name,
                                          registration.interface)
 


=== Zope3/src/zope/app/utility/configure.zcml 1.1 => 1.2 ===
--- Zope3/src/zope/app/utility/configure.zcml:1.1	Thu Mar 11 17:05:01 2004
+++ Zope3/src/zope/app/utility/configure.zcml	Sat Mar 13 13:01:23 2004
@@ -36,7 +36,7 @@
 
 <fssync:adapter
     class=".UtilityRegistration"
-    factory="zope.app.services.registration.ComponentRegistrationAdapter"
+    factory="zope.app.registration.registration.ComponentRegistrationAdapter"
     />
 
 </configure>


=== Zope3/src/zope/app/utility/interfaces.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/utility/interfaces.py:1.1	Thu Mar 11 17:05:01 2004
+++ Zope3/src/zope/app/utility/interfaces.py	Sat Mar 13 13:01:23 2004
@@ -17,9 +17,9 @@
 """
 from zope.app.component.interfacefield import InterfaceField
 from zope.app.i18n import ZopeMessageIDFactory as _
-from zope.app.interfaces.services.registration import IComponentRegistration
-from zope.app.interfaces.services.registration import IRegisterable
-from zope.app.interfaces.services.registration import ComponentPath
+from zope.app.registration.interfaces import IComponentRegistration
+from zope.app.registration.interfaces import IRegisterable
+from zope.app.registration.interfaces import ComponentPath
 from zope.component.interfaces import IUtilityService
 from zope.schema import TextLine
 


=== Zope3/src/zope/app/utility/tests.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/utility/tests.py:1.2	Sat Mar 13 10:21:39 2004
+++ Zope3/src/zope/app/utility/tests.py	Sat Mar 13 13:01:23 2004
@@ -24,12 +24,12 @@
 from zope.component import getService
 from zope.component.exceptions import ComponentLookupError
 from zope.app.traversing import traverse
-from zope.app.interfaces.services.registration import IRegistrationStack
-from zope.app.interfaces.services.registration import UnregisteredStatus
-from zope.app.interfaces.services.registration import RegisteredStatus
-from zope.app.interfaces.services.registration import ActiveStatus
+from zope.app.registration.interfaces import IRegistrationStack
+from zope.app.registration.interfaces import UnregisteredStatus
+from zope.app.registration.interfaces import RegisteredStatus
+from zope.app.registration.interfaces import ActiveStatus
+from zope.app.registration.interfaces import IRegistered
 from zope.app.utility.interfaces import ILocalUtility
-from zope.app.interfaces.services.registration import IRegistered
 from zope.app.interfaces.dependable import IDependable
 from zope.app.tests import setup
 
@@ -56,16 +56,16 @@
         return 'foo ' + self.name
 
     def addUsage(self, location):
-        "See zope.app.interfaces.services.registration.IRegistered"
+        "See zope.app.registration.interfaces.IRegistered"
         if location not in self._usages:
             self._usages.append(location)
 
     def removeUsage(self, location):
-        "See zope.app.interfaces.services.registration.IRegistered"
+        "See zope.app.registration.interfaces.IRegistered"
         self._usages.remove(location)
 
     def usages(self):
-        "See zope.app.interfaces.services.registration.IRegistered"
+        "See zope.app.registration.interfaces.IRegistered"
         return self._usages
 
     def addDependent(self, location):


=== Zope3/src/zope/app/utility/utility.txt 1.1 => 1.2 ===
--- Zope3/src/zope/app/utility/utility.txt:1.1	Thu Mar 11 17:05:01 2004
+++ Zope3/src/zope/app/utility/utility.txt	Sat Mar 13 13:01:23 2004
@@ -148,7 +148,7 @@
   { utility_name -> { interface -> stack } }
 
 We also need to implement
-``zope.app.interfaces.services.registration.IRegistry``.  This defines
+``zope.app.registration.interfaces.IRegistry``.  This defines
 two methods, ``queryRegistrationsFor`` and ``createRegistrationsFor``.
 The ``queryRegistrationsFor`` method takes a registration object and
 returns the corresponding registration stack.  The registration
@@ -194,9 +194,9 @@
 To create the registration class, we'll start by defining a
 registration schema in ``zope/app/interfaces/services/utility.py``.
 The schema should extend
-``zope.app.interfaces.services.registration.IRegistration``.  There's
+``zope.app.registration.interfaces.IRegistration``.  There's
 a more specific interface,
-``zope.app.interfaces.services.registration.IComponentRegistration``
+``zope.app.registration.interfaces.IComponentRegistration``
 that is much closer to what we need. [2]_ We extend this interface as
 IUtilityRegistration, which adds a name field (which is required but
 may be empty -- note the subtle difference, because the empty string
@@ -279,7 +279,7 @@
 view on an `IAdding` view.  That is the normal way to use add forms, but
 here we don't do that; this particular add form is a view on a local
 utility component.  Our ``AddRegistration`` class subclasses
-``zope.app.browser.services.registration.AddComponentRegistration``,
+``zope.app.registration.browser.AddComponentRegistration``,
 which provides the implementations of ``add`` and ``nextURL`` that we
 need. The ``add`` method defined in ``AddComponentRegistration`` finds
 the congiguration manager in the current folder and adds the new




More information about the Zope3-Checkins mailing list