Merged revisions 85420 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85420 | antoine.pitrou | 2010-10-13 18:17:14 +0200 (mer., 13 oct. 2010) | 5 lines

  Issue #10041: The signature of optional arguments in socket.makefile()
  didn't match that of io.open(), and they also didn't get forwarded
  properly to TextIOWrapper in text mode.  Patch by Kai Zhu.
........
diff --git a/Lib/socket.py b/Lib/socket.py
index f94c469..d035061 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -121,7 +121,7 @@
         return socket(self.family, self.type, self.proto, fileno=fd), addr
 
     def makefile(self, mode="r", buffering=None, *,
-                 encoding=None, newline=None):
+                 encoding=None, errors=None, newline=None):
         """makefile(...) -> an I/O stream connected to the socket
 
         The arguments are as for io.open() after the filename,
@@ -159,7 +159,7 @@
             buffer = io.BufferedWriter(raw, buffering)
         if binary:
             return buffer
-        text = io.TextIOWrapper(buffer, encoding, newline)
+        text = io.TextIOWrapper(buffer, encoding, errors, newline)
         text.mode = mode
         return text