[Zope3-checkins] CVS: Zope3/src/zope/server/http - chunking.py:1.3 httprequestparser.py:1.3 httpserver.py:1.3 httpserverchannel.py:1.3 httptask.py:1.3 publisherhttpserver.py:1.3
Steve Alexander
steve@cat-box.net
Fri, 6 Jun 2003 15:29:43 -0400
Update of /cvs-repository/Zope3/src/zope/server/http
In directory cvs.zope.org:/tmp/cvs-serv7875/src/zope/server/http
Modified Files:
chunking.py httprequestparser.py httpserver.py
httpserverchannel.py httptask.py publisherhttpserver.py
Log Message:
Changed old-style __implements__ to new-style implements()
Also, fixed up some incorrect formatting.
=== Zope3/src/zope/server/http/chunking.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/chunking.py:1.2 Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/chunking.py Fri Jun 6 15:29:12 2003
@@ -18,11 +18,12 @@
from zope.server.utilities import find_double_newline
from zope.server.interfaces import IStreamConsumer
+from zope.interface import implements
class ChunkedReceiver:
- __implements__ = IStreamConsumer
+ implements(IStreamConsumer)
chunk_remainder = 0
control_line = ''
=== Zope3/src/zope/server/http/httprequestparser.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/httprequestparser.py:1.2 Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/httprequestparser.py Fri Jun 6 15:29:12 2003
@@ -25,6 +25,7 @@
from zope.server.buffers import OverflowableBuffer
from zope.server.utilities import find_double_newline
from zope.server.interfaces import IStreamConsumer
+from zope.interface import implements
try:
from cStringIO import StringIO
@@ -39,7 +40,7 @@
a server task constructor.
"""
- __implements__ = IStreamConsumer
+ implements(IStreamConsumer)
completed = 0 # Set once request is completed.
empty = 0 # Set if no request was made.
=== Zope3/src/zope/server/http/httpserver.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/httpserver.py:1.2 Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/httpserver.py Fri Jun 6 15:29:12 2003
@@ -25,8 +25,6 @@
class HTTPServer(ServerBase):
"""This is a generic HTTP Server."""
- __implements__ = ServerBase.__implements__
-
channel_class = HTTPServerChannel
SERVER_IDENT = 'zope.server.http'
=== Zope3/src/zope/server/http/httpserverchannel.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/httpserverchannel.py:1.2 Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/httpserverchannel.py Fri Jun 6 15:29:12 2003
@@ -24,7 +24,5 @@
class HTTPServerChannel(ServerChannelBase):
"""HTTP-specific Server Channel"""
- __implements__ = ServerChannelBase.__implements__
-
task_class = HTTPTask
parser_class = HTTPRequestParser
=== Zope3/src/zope/server/http/httptask.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/httptask.py:1.2 Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/httptask.py Fri Jun 6 15:29:12 2003
@@ -26,6 +26,8 @@
from zope.server.interfaces import IHeaderOutput
from zope.server.interfaces import ITask
+from zope.interface import implements
+
rename_headers = {
'CONTENT_LENGTH' : 'CONTENT_LENGTH',
'CONTENT_TYPE' : 'CONTENT_TYPE',
@@ -38,7 +40,7 @@
Subclass this and override the execute() method.
"""
- __implements__ = ITask, IHeaderOutput #, IOutputStream
+ implements(ITask, IHeaderOutput) #, IOutputStream
instream = None
close_on_finish = 1
=== Zope3/src/zope/server/http/publisherhttpserver.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/http/publisherhttpserver.py:1.2 Wed Dec 25 09:15:24 2002
+++ Zope3/src/zope/server/http/publisherhttpserver.py Fri Jun 6 15:29:12 2003
@@ -23,8 +23,6 @@
class PublisherHTTPServer(HTTPServer):
"""Zope Publisher-specific HTTP Server"""
- __implements__ = HTTPServer.__implements__
-
def __init__(self, request_factory, sub_protocol=None, *args, **kw):
sub_protocol = str(sub_protocol)