[Zope3-checkins] CVS: Zope3/src/zope/app/services - service.py:1.8.4.7

Guido van Rossum guido@python.org
Mon, 3 Mar 2003 13:29:02 -0500


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

Modified Files:
      Tag: use-config-branch
	service.py 
Log Message:
Get rid of IService.  Instead, add ILocalService, which only applies
(as the name implies) to local services.  Fewer files touched.

=== Zope3/src/zope/app/services/service.py 1.8.4.6 => 1.8.4.7 ===
--- Zope3/src/zope/app/services/service.py:1.8.4.6	Mon Mar  3 12:04:42 2003
+++ Zope3/src/zope/app/services/service.py	Mon Mar  3 13:28:31 2003
@@ -58,8 +58,8 @@
 from zope.app.services.configuration import NameComponentConfigurable
 from zope.app.services.configuration import NamedComponentConfiguration
 from zope.app.services.package import Packages
-from zope.component.interfaces import IService
 from zope.app.interfaces.services.configuration import IUseConfigurable
+from zope.app.interfaces.services.interfaces import ILocalService
 
 from zope.app.traversing import getPhysicalPathString
 
@@ -268,12 +268,9 @@
             # Check that the object implements stuff we need
             wrapped_self = ContextWrapper(self, context)
             service = wrapped_self.getComponent()
-            if not IService.isImplementedBy(service):
-                raise TypeError("service %r doesn't implement IService" %
+            if not ILocalService.isImplementedBy(service):
+                raise TypeError("service %r doesn't implement ILocalService" %
                                 service)
-            if not IUseConfigurable.isImplementedBy(service):
-                raise TypeError("service %r doesn't implement "
-                                "IUseConfigurable" % service)
         # Else, this must be a hopeful test invocation
 
     def getInterface(self):