[Zope3-checkins] CVS: Zope3/src/zope/app/startup - requestfactory.py:1.4 requestfactoryregistry.py:1.5 servertype.py:1.3 servertyperegistry.py:1.3 simpleregistry.py:1.7 sitedefinition.py:1.17
Steve Alexander
steve@cat-box.net
Fri, 6 Jun 2003 15:43:27 -0400
Update of /cvs-repository/Zope3/src/zope/app/startup
In directory cvs.zope.org:/tmp/cvs-serv10072/src/zope/app/startup
Modified Files:
requestfactory.py requestfactoryregistry.py servertype.py
servertyperegistry.py simpleregistry.py sitedefinition.py
Log Message:
__implements__ --> implements()
=== Zope3/src/zope/app/startup/requestfactory.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/startup/requestfactory.py:1.3 Fri Feb 7 10:59:45 2003
+++ Zope3/src/zope/app/startup/requestfactory.py Fri Jun 6 15:42:56 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.5 ===
--- Zope3/src/zope/app/startup/requestfactoryregistry.py:1.4 Tue Feb 11 10:59:58 2003
+++ Zope3/src/zope/app/startup/requestfactoryregistry.py Fri Jun 6 15:42:56 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.3 ===
--- Zope3/src/zope/app/startup/servertype.py:1.2 Wed Dec 25 09:13:24 2002
+++ Zope3/src/zope/app/startup/servertype.py Fri Jun 6 15:42:56 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.3 ===
--- Zope3/src/zope/app/startup/servertyperegistry.py:1.2 Wed Dec 25 09:13:24 2002
+++ Zope3/src/zope/app/startup/servertyperegistry.py Fri Jun 6 15:42:56 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.7 ===
--- Zope3/src/zope/app/startup/simpleregistry.py:1.6 Thu May 1 15:35:36 2003
+++ Zope3/src/zope/app/startup/simpleregistry.py Fri Jun 6 15:42:56 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.17 ===
--- Zope3/src/zope/app/startup/sitedefinition.py:1.16 Tue May 20 16:24:30 2003
+++ Zope3/src/zope/app/startup/sitedefinition.py Fri Jun 6 15:42:56 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,