[Zope3-checkins] CVS: Zope3/src/zope/publisher - base.py:1.8 browser.py:1.19 ftp.py:1.5 http.py:1.25 xmlrpc.py:1.7
Viktorija Zaksiene
ryzaja@codeworks.lt
Tue, 3 Jun 2003 10:32:37 -0400
Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv29899
Modified Files:
base.py browser.py ftp.py http.py xmlrpc.py
Log Message:
Change __implements__ to the new style.
=== Zope3/src/zope/publisher/base.py 1.7 => 1.8 ===
--- Zope3/src/zope/publisher/base.py:1.7 Thu May 22 09:58:55 2003
+++ Zope3/src/zope/publisher/base.py Tue Jun 3 10:32:06 2003
@@ -20,6 +20,7 @@
import traceback
from cStringIO import StringIO
+from zope.interface import implements
from zope.interface.common.mapping import IReadMapping, IEnumerableMapping
from zope.exceptions import NotFoundError
@@ -39,7 +40,7 @@
'_outstream', # The output stream
)
- __implements__ = IResponse
+ implements(IResponse)
def __init__(self, outstream):
@@ -82,7 +83,7 @@
class RequestDataGetter(object):
- __implements__ = IReadMapping
+ implements(IReadMapping)
def __init__(self, request):
self.__get = getattr(request, self._gettrname)
@@ -101,7 +102,7 @@
class RequestDataMapper(object):
- __implements__ = IEnumerableMapping
+ implements(IEnumerableMapping)
def __init__(self, request):
self.__map = getattr(request, self._mapname)
@@ -162,7 +163,7 @@
collection of variable to value mappings.
"""
- __implements__ = IRequest
+ implements(IRequest)
__slots__ = (
'_held', # Objects held until the request is closed
@@ -428,7 +429,7 @@
class DefaultPublication:
- __implements__ = IPublication
+ implements(IPublication)
require_docstrings = 1
=== Zope3/src/zope/publisher/browser.py 1.18 => 1.19 ===
--- Zope3/src/zope/publisher/browser.py:1.18 Thu May 22 18:48:34 2003
+++ Zope3/src/zope/publisher/browser.py Tue Jun 3 10:32:06 2003
@@ -20,6 +20,7 @@
from types import ListType, TupleType, StringType, StringTypes
from cgi import FieldStorage, escape
+from zope.interface import implements
from zope.i18n.interfaces import IUserPreferredLanguages
from zope.i18n.interfaces import IUserPreferredCharsets
from zope.publisher.interfaces.browser import IBrowserPresentation
@@ -225,10 +226,7 @@
class BrowserRequest(HTTPRequest):
- __implements__ = (HTTPRequest.__implements__,
- IBrowserRequest,
- IBrowserApplicationRequest,
- )
+ implements(IBrowserRequest, IBrowserApplicationRequest)
__slots__ = (
'form', # Form data
@@ -834,7 +832,7 @@
class BrowserLanguages:
- __implements__ = IUserPreferredLanguages
+ implements(IUserPreferredLanguages)
def __init__(self, request):
self.request = request
@@ -851,7 +849,7 @@
class BrowserView:
- __implements__ = IBrowserView
+ implements(IBrowserView)
def __init__(self, context, request):
self.context = context
=== Zope3/src/zope/publisher/ftp.py 1.4 => 1.5 ===
--- Zope3/src/zope/publisher/ftp.py:1.4 Fri Apr 11 08:55:41 2003
+++ Zope3/src/zope/publisher/ftp.py Tue Jun 3 10:32:06 2003
@@ -16,6 +16,7 @@
$Id$
"""
+from zope.interface import implements, implementedBy
from zope.publisher.interfaces.ftp import IFTPPresentation
from zope.publisher.interfaces.ftp import IFTPCredentials
from zope.publisher.base import BaseResponse, BaseRequest
@@ -36,7 +37,7 @@
self._exc = exc_info
class FTPRequest(BaseRequest):
- __implements__ = BaseRequest.__implements__, IFTPCredentials
+ implements(IFTPCredentials)
_presentation_type = IFTPPresentation
=== Zope3/src/zope/publisher/http.py 1.24 => 1.25 ===
--- Zope3/src/zope/publisher/http.py:1.24 Mon Apr 28 09:14:21 2003
+++ Zope3/src/zope/publisher/http.py Tue Jun 3 10:32:06 2003
@@ -21,6 +21,8 @@
from types import StringTypes, UnicodeType, ClassType
from cgi import escape
+from zope.interface import implements
+
from zope.publisher.interfaces.http import IHTTPCredentials
from zope.publisher.interfaces.http import IHTTPRequest
from zope.publisher.interfaces.http import IHTTPApplicationRequest
@@ -264,9 +266,7 @@
_presentation_type = IHTTPPresentation
- __implements__ = (BaseRequest.__implements__,
- IHTTPCredentials, IHTTPRequest, IHTTPApplicationRequest,
- )
+ implements(IHTTPCredentials, IHTTPRequest, IHTTPApplicationRequest)
__slots__ = (
'_auth', # The value of the HTTP_AUTHORIZATION header.
@@ -590,8 +590,7 @@
class HTTPResponse (BaseResponse):
- __implements__ = (IHTTPResponse, IHTTPApplicationResponse,
- BaseResponse.__implements__)
+ implements(IHTTPResponse, IHTTPApplicationResponse)
__slots__ = (
'_header_output', # Hook object to collaborate with a server
@@ -940,7 +939,7 @@
class DefaultPublisher:
- __implements__ = IHTTPPublisher
+ implements(IHTTPPublisher)
def publishTraverse(self, request, name):
'See IHTTPPublisher'
@@ -957,7 +956,7 @@
class HTTPCharsets:
- __implements__ = IUserPreferredCharsets
+ implements(IUserPreferredCharsets)
def __init__(self, request):
self.request = request
=== Zope3/src/zope/publisher/xmlrpc.py 1.6 => 1.7 ===
--- Zope3/src/zope/publisher/xmlrpc.py:1.6 Wed May 28 11:46:14 2003
+++ Zope3/src/zope/publisher/xmlrpc.py Tue Jun 3 10:32:06 2003
@@ -18,6 +18,7 @@
import sys
import xmlrpclib
+from zope.interface import implements
from zope.publisher.interfaces.xmlrpc import IXMLRPCPublisher
from zope.publisher.interfaces.xmlrpc import IXMLRPCPublication
from zope.publisher.interfaces.xmlrpc import IXMLRPCPresentation
@@ -44,7 +45,7 @@
class XMLRPCRequest(HTTPRequest):
- __implements__ = HTTPRequest.__implements__, IXMLRPCPublication
+ implements(IXMLRPCPublication)
# _presentation_type is overridden from the BaseRequest
# to implement IXMLRPCPublisher
@@ -99,8 +100,6 @@
"""XMLRPC response
"""
- __implements__ = HTTPResponse.__implements__
-
def setBody(self, body):
"""Sets the body of the response
@@ -168,7 +167,7 @@
class XMLRPCView:
- __implements__ = IXMLRPCView
+ implements(IXMLRPCView)
def __init__(self, context, request):
self.context = context