hgweb: adapt to socket._fileobject changes in Python 3
authorAugie Fackler <augie@google.com>
Sun, 04 Mar 2018 21:14:24 -0500
changeset 36779 bf9a04d78084
parent 36778 7aae39d03139
child 36780 f3c314020beb
hgweb: adapt to socket._fileobject changes in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2688
mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py	Sun Mar 04 16:20:24 2018 -0500
+++ b/mercurial/hgweb/server.py	Sun Mar 04 21:14:24 2018 -0500
@@ -257,8 +257,8 @@
 
     def setup(self):
         self.connection = self.request
-        self.rfile = socket._fileobject(self.request, "rb", self.rbufsize)
-        self.wfile = socket._fileobject(self.request, "wb", self.wbufsize)
+        self.rfile = self.request.makefile(r"rb", self.rbufsize)
+        self.wfile = self.request.makefile(r"wb", self.wbufsize)
 
 try:
     import threading