[Zope3-checkins] CVS: Zope3/src/zope/app/services - adapter.py:1.20 cache.py:1.16 connection.py:1.16 registration.py:1.2 service.py:1.27 utility.py:1.12 view.py:1.25
Jim Fulton
jim@zope.com
Sun, 22 Jun 2003 20:32:02 -0400
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv21652/src/zope/app/services
Modified Files:
adapter.py cache.py connection.py registration.py service.py
utility.py view.py
Log Message:
Now that RegistrationStatusProperty gets the serviceType from the
registration, we can have one definition of status in the base class,
SimpleRegistration.
=== Zope3/src/zope/app/services/adapter.py 1.19 => 1.20 ===
--- Zope3/src/zope/app/services/adapter.py:1.19 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/adapter.py Sun Jun 22 20:31:31 2003
@@ -31,7 +31,6 @@
from zope.app.services.registration import SimpleRegistration
from zope.app.context import ContextWrapper
from zope.context import ContextMethod
-from zope.app.services.registration import RegistrationStatusProperty
from zope.app.component.nextservice import getNextService
from zope.app.interfaces.services.service import ISimpleService
@@ -192,8 +191,6 @@
implements(IAdapterRegistration)
serviceType = Adapters
-
- status = RegistrationStatusProperty()
# XXX These should be positional arguments, except that forInterface
# isn't passed in if it is omitted. To fix this, we need a
=== Zope3/src/zope/app/services/cache.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/services/cache.py:1.15 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/cache.py Sun Jun 22 20:31:31 2003
@@ -24,7 +24,6 @@
from zope.app.interfaces.services.registration import INameComponentRegistry
from zope.app.interfaces.services.event import IEventChannel
from zope.app.interfaces.services.service import ISimpleService
-from zope.app.services.registration import RegistrationStatusProperty
from zope.app.services.registration import NameComponentRegistry
from zope.app.services.registration import NamedComponentRegistration
from zope.app.services.event import ServiceSubscriberEventChannel
@@ -97,8 +96,6 @@
implements(ICacheRegistration)
serviceType = 'Caching'
-
- status = RegistrationStatusProperty()
label = "Cache"
=== Zope3/src/zope/app/services/connection.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/services/connection.py:1.15 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/connection.py Sun Jun 22 20:31:31 2003
@@ -11,19 +11,20 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""
+"""Connection service
+
$Id$
"""
from persistence import Persistent
-from zope.context import ContextMethod
-
+from zope.app.component.nextservice import queryNextService
from zope.app.interfaces.rdb import IZopeDatabaseAdapter
+from zope.app.interfaces.services.connection import IConnectionRegistration
from zope.app.interfaces.services.connection import ILocalConnectionService
from zope.app.interfaces.services.service import ISimpleService
-
-from zope.app.component.nextservice import queryNextService
from zope.app.services.registration import NameComponentRegistry
+from zope.app.services.registration import NamedComponentRegistration
+from zope.context import ContextMethod
from zope.interface import implements
class ConnectionService(Persistent, NameComponentRegistry):
@@ -73,10 +74,6 @@
getAvailableConnections = ContextMethod(getAvailableConnections)
-from zope.app.interfaces.services.connection import IConnectionRegistration
-from zope.app.services.registration import NamedComponentRegistration
-from zope.app.services.registration import RegistrationStatusProperty
-
class ConnectionRegistration(NamedComponentRegistration):
__doc__ = IConnectionRegistration.__doc__
@@ -84,8 +81,6 @@
implements(IConnectionRegistration)
serviceType = 'SQLDatabaseConnections'
-
- status = RegistrationStatusProperty()
label = "Connection"
=== Zope3/src/zope/app/services/registration.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/services/registration.py:1.1 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/registration.py Sun Jun 22 20:31:31 2003
@@ -66,9 +66,6 @@
sm = getServiceManager(registration)
service = sm.queryLocalService(registration.serviceType)
- # XXX The following may fail; there's a subtle bug here when
- # the returned service isn't in the same service manager as
- # the one owning the registration.
registry = service and service.queryRegistrationsFor(registration)
if registry:
@@ -325,6 +322,9 @@
# *think* we do. :)
IAttributeAnnotatable,
)
+
+
+ status = RegistrationStatusProperty()
# Methods from IRegistration
=== Zope3/src/zope/app/services/service.py 1.26 => 1.27 ===
--- Zope3/src/zope/app/services/service.py:1.26 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/service.py Sun Jun 22 20:31:31 2003
@@ -53,7 +53,6 @@
# (used as 2nd argument to isinstance() in method resolve() below)
ModuleType = type(IModuleService), PersistentModule
-from zope.app.services.registration import RegistrationStatusProperty
from zope.app.services.registration import NameComponentRegistry
from zope.app.services.registration import NamedComponentRegistration
from zope.app.services.folder import SiteManagementFolders
@@ -124,8 +123,9 @@
# This is rather tricky. Normally, getting a service requires
# the use of other services, like the adapter service. We
# need to be careful not to get into an infinate recursion by
- # getting out getService to be called while looking up
- # services, so we'll
+ # getting our getService to be called while looking up
+ # services, so we'll use _v_calling to prevent recursive
+ # getService calls.
if name == 'Services':
return wrapped_self # We are the service service
@@ -302,8 +302,6 @@
implements(IServiceRegistration)
serviceType = 'Services'
-
- status = RegistrationStatusProperty()
label = "Service"
=== Zope3/src/zope/app/services/utility.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/services/utility.py:1.11 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/utility.py Sun Jun 22 20:31:31 2003
@@ -26,7 +26,6 @@
from zope.app.interfaces.services.utility import IUtilityRegistration
from zope.app.interfaces.services.utility import ILocalUtilityService
from zope.app.services.registration import RegistrationStack
-from zope.app.services.registration import RegistrationStatusProperty
from zope.app.services.registration import ComponentRegistration
from zope.component.exceptions import ComponentLookupError
from zope.interface.implementor import ImplementorRegistry
@@ -115,8 +114,6 @@
"""
serviceType = 'Utilities'
-
- status = RegistrationStatusProperty()
implements(IUtilityRegistration)
=== Zope3/src/zope/app/services/view.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/services/view.py:1.24 Sat Jun 21 17:22:12 2003
+++ Zope3/src/zope/app/services/view.py Sun Jun 22 20:31:31 2003
@@ -29,7 +29,6 @@
from zope.app.services.registration import SimpleRegistration
from zope.app.context import ContextWrapper
from zope.context import ContextMethod
-from zope.app.services.registration import RegistrationStatusProperty
from zope.app.component.nextservice import getNextService
from zope.component import getSkin
from zope.interface import implements
@@ -220,8 +219,6 @@
implements(IViewRegistration)
serviceType = 'Views'
-
- status = RegistrationStatusProperty()
_what = "View" # For usageSummary(); subclass may override