[Zope3-checkins] CVS: Zope3/src/zope/app/startup - bootstrap.py:1.15.14.1 requestfactory.py:1.3.22.1 requestfactoryregistry.py:1.4.22.1 servertype.py:1.2.26.1 servertyperegistry.py:1.2.26.1 simpleregistry.py:1.6.10.1 sitedefinition.py:1.16.2.1
Grégoire Weber
zope@i-con.ch
Sun, 22 Jun 2003 10:24:04 -0400
Update of /cvs-repository/Zope3/src/zope/app/startup
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/app/startup
Modified Files:
Tag: cw-mail-branch
bootstrap.py requestfactory.py requestfactoryregistry.py
servertype.py servertyperegistry.py simpleregistry.py
sitedefinition.py
Log Message:
Synced up with HEAD
=== Zope3/src/zope/app/startup/bootstrap.py 1.15 => 1.15.14.1 ===
--- Zope3/src/zope/app/startup/bootstrap.py:1.15 Sat Apr 12 07:52:18 2003
+++ Zope3/src/zope/app/startup/bootstrap.py Sun Jun 22 10:23:31 2003
@@ -24,16 +24,16 @@
from zope.app.traversing import traverse, traverseName
from zope.app.publication.zopepublication import ZopePublication
from zope.app.content.folder import RootFolder
-from zope.app.services.servicenames import EventPublication, HubIds, EventSubscription
+from zope.app.services.servicenames import HubIds
+from zope.app.services.servicenames import EventPublication, EventSubscription
from zope.app.services.servicenames import ErrorLogging
from zope.app.services.service import ServiceManager
-from zope.app.services.service import ServiceConfiguration
+from zope.app.services.service import ServiceRegistration
from zope.app.services.hub import ObjectHub
from zope.app.services.event import EventService
from zope.app.services.errorr import ErrorReportingService
from zope.app.services.principalannotation import PrincipalAnnotationService
-from zope.app.container.zopecontainer import ZopeContainerAdapter
-from zope.proxy.introspection import removeAllProxies
+from zope.proxy import removeAllProxies
from zope.app.event import publish
from zope.app.event.objectevent import ObjectCreatedEvent
@@ -102,7 +102,7 @@
"""
# The code here is complicated by the fact that the registry
# calls at the end require a fully context-wrapped
- # configuration; hence all the traverse() and traverseName() calls.
+ # registration; hence all the traverse() and traverseName() calls.
package_name = '/++etc++site/default'
package = traverse(root_folder, package_name)
name = service_type + '-1'
@@ -115,16 +115,14 @@
setattr(service, k, v)
return name
-def configureService(root_folder, service_type, name,
- initial_status='Active'):
+def configureService(root_folder, service_type, name, initial_status='Active'):
"""Configure a service in the root folder."""
package_name = '/++etc++site/default'
package = traverse(root_folder, package_name)
- configuration_manager = package.getConfigurationManager()
- configuration = ServiceConfiguration(service_type,
- package_name + '/' + name,
- root_folder)
- cm = ZopeContainerAdapter(configuration_manager)
- key = cm.setObject("", configuration)
- configuration = traverseName(configuration_manager, key)
- configuration.status = initial_status
+ registration_manager = package.getRegistrationManager()
+ registration = ServiceRegistration(service_type,
+ name,
+ registration_manager)
+ key = registration_manager.setObject("", registration)
+ registration = traverseName(registration_manager, key)
+ registration.status = initial_status
=== Zope3/src/zope/app/startup/requestfactory.py 1.3 => 1.3.22.1 ===
--- Zope3/src/zope/app/startup/requestfactory.py:1.3 Fri Feb 7 10:59:45 2003
+++ Zope3/src/zope/app/startup/requestfactory.py Sun Jun 22 10:23:31 2003
@@ -16,13 +16,14 @@
import copy
from zope.app.interfaces.startup import IRequestFactory
+from zope.interface import implements
class RequestFactory:
"""This class will generically create RequestFactories. This way I do
not have to create a method for each Server Type there is.
"""
- __implements__ = IRequestFactory
+ implements(IRequestFactory)
def __init__(self, publication, request):
"""Initialize Request Factory"""
=== Zope3/src/zope/app/startup/requestfactoryregistry.py 1.4 => 1.4.22.1 ===
--- Zope3/src/zope/app/startup/requestfactoryregistry.py:1.4 Tue Feb 11 10:59:58 2003
+++ Zope3/src/zope/app/startup/requestfactoryregistry.py Sun Jun 22 10:23:31 2003
@@ -17,6 +17,7 @@
from zope.app.interfaces.startup.simpleregistry import ISimpleRegistry
from zope.app.startup.simpleregistry import SimpleRegistry
from zope.app.interfaces.startup import IPublicationRequestFactoryFactory
+from zope.interface import implements
class IRequestFactoryRegistry(ISimpleRegistry):
@@ -32,7 +33,7 @@
class RequestFactoryRegistry(SimpleRegistry):
- __implements__ = IRequestFactoryRegistry
+ implements(IRequestFactoryRegistry)
RequestFactoryRegistry = RequestFactoryRegistry(
=== Zope3/src/zope/app/startup/servertype.py 1.2 => 1.2.26.1 ===
--- Zope3/src/zope/app/startup/servertype.py:1.2 Wed Dec 25 09:13:24 2002
+++ Zope3/src/zope/app/startup/servertype.py Sun Jun 22 10:23:31 2003
@@ -14,7 +14,7 @@
"""e.py,v 1.1.2.2 2002/04/02 02:20:40 srichter Exp $
"""
-from zope.interface import Interface
+from zope.interface import Interface, implements
from zope.app.startup.requestfactoryregistry import getRequestFactory
@@ -27,11 +27,9 @@
"""Create the server knowing the port, task dispatcher and the ZODB.
"""
-
class ServerType:
- __implements__ = IServerType
-
+ implements(IServerType)
def __init__(self, name, factory, requestFactory, logFactory,
defaultPort, defaultVerbose):
=== Zope3/src/zope/app/startup/servertyperegistry.py 1.2 => 1.2.26.1 ===
--- Zope3/src/zope/app/startup/servertyperegistry.py:1.2 Wed Dec 25 09:13:24 2002
+++ Zope3/src/zope/app/startup/servertyperegistry.py Sun Jun 22 10:23:31 2003
@@ -17,6 +17,7 @@
from zope.app.interfaces.startup.simpleregistry import ISimpleRegistry
from zope.app.startup.servertype import IServerType
from zope.app.startup.simpleregistry import SimpleRegistry
+from zope.interface import implements
class IServerTypeRegistry(ISimpleRegistry):
@@ -33,7 +34,7 @@
class ServerTypeRegistry(SimpleRegistry):
"""Registry for the various Server types"""
- __implements__ = (IServerTypeRegistry,)
+ implements(IServerTypeRegistry)
ServerTypeRegistry = ServerTypeRegistry(IServerType)
=== Zope3/src/zope/app/startup/simpleregistry.py 1.6 => 1.6.10.1 ===
--- Zope3/src/zope/app/startup/simpleregistry.py:1.6 Thu May 1 15:35:36 2003
+++ Zope3/src/zope/app/startup/simpleregistry.py Sun Jun 22 10:23:31 2003
@@ -16,6 +16,7 @@
"""
from zope.app.interfaces.startup.simpleregistry import ISimpleRegistry
from types import ListType, TupleType
+from zope.interface import implements
ListTypes = (TupleType, ListType)
@@ -51,12 +52,10 @@
"the interface " + self.interface.__name__ + ".")
-
class SimpleRegistry:
""" """
- __implements__ = (ISimpleRegistry,)
-
+ implements(ISimpleRegistry)
def __init__(self, interface):
"""Initialize registry"""
@@ -78,7 +77,6 @@
raise ZopeIllegalInterfaceError(name, self.interface)
return []
-
def get(self, name):
'''See ISimpleRegistry'''
=== Zope3/src/zope/app/startup/sitedefinition.py 1.16 => 1.16.2.1 ===
--- Zope3/src/zope/app/startup/sitedefinition.py:1.16 Tue May 20 16:24:30 2003
+++ Zope3/src/zope/app/startup/sitedefinition.py Sun Jun 22 10:23:31 2003
@@ -17,7 +17,7 @@
$Id$
"""
-from zope.interface import classProvides
+from zope.interface import classProvides, implements
import logging
import sys
@@ -55,7 +55,7 @@
class SiteDefinition:
classProvides(INonEmptyDirective)
- __implements__ = ISubdirectiveHandler
+ implements(ISubdirectiveHandler)
# Some special file names for log files
_special_log_files = {'STDERR': sys.stderr,