[Python-3000-checkins] r64765 - in python/branches/py3k/Doc/library: asynchat.rst asyncore.rst

josiah.carlson python-3000-checkins at python.org
Mon Jul 7 06:23:14 CEST 2008


Author: josiah.carlson
Date: Mon Jul  7 06:23:14 2008
New Revision: 64765

Log:
Fixed documentation to be correct for Py3k.


Modified:
   python/branches/py3k/Doc/library/asynchat.rst
   python/branches/py3k/Doc/library/asyncore.rst

Modified: python/branches/py3k/Doc/library/asynchat.rst
==============================================================================
--- python/branches/py3k/Doc/library/asynchat.rst	(original)
+++ python/branches/py3k/Doc/library/asynchat.rst	Mon Jul  7 06:23:14 2008
@@ -5,7 +5,7 @@
 .. module:: asynchat
    :synopsis: Support for asynchronous command/response protocols.
 .. moduleauthor:: Sam Rushing <rushing at nightmare.com>
-.. sectionauthor:: Steve Holden <sholden at holdenweb.com>
+.. sectionauthor:: Steve Holden <sholden at holdenweb.com>   
 
 
 This module builds on the :mod:`asyncore` infrastructure, simplifying
@@ -283,8 +283,8 @@
            self.addr = addr
            self.sessions = sessions
            self.ibuffer = []
-           self.obuffer = ""
-           self.set_terminator("\r\n\r\n")
+           self.obuffer = b""
+           self.set_terminator(b"\r\n\r\n")
            self.reading_headers = True
            self.handling = False
            self.cgi_data = None
@@ -299,7 +299,7 @@
                self.reading_headers = False
                self.parse_headers("".join(self.ibuffer))
                self.ibuffer = []
-               if self.op.upper() == "POST":
+               if self.op.upper() == b"POST":
                    clen = self.headers.getheader("content-length")
                    self.set_terminator(int(clen))
                else:
@@ -308,7 +308,7 @@
                    self.handle_request()
            elif not self.handling:
                self.set_terminator(None) # browsers sometimes over-send
-               self.cgi_data = parse(self.headers, "".join(self.ibuffer))
+               self.cgi_data = parse(self.headers, b"".join(self.ibuffer))
                self.handling = True
                self.ibuffer = []
                self.handle_request()

Modified: python/branches/py3k/Doc/library/asyncore.rst
==============================================================================
--- python/branches/py3k/Doc/library/asyncore.rst	(original)
+++ python/branches/py3k/Doc/library/asyncore.rst	Mon Jul  7 06:23:14 2008
@@ -254,7 +254,7 @@
            asyncore.dispatcher.__init__(self)
            self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
            self.connect( (host, 80) )
-           self.buffer = 'GET %s HTTP/1.0\r\n\r\n' % path
+           self.buffer = bytes('GET %s HTTP/1.0\r\n\r\n' % path, 'ascii')
 
        def handle_connect(self):
            pass


More information about the Python-3000-checkins mailing list