changeset 36787:bf9a04d78084

hgweb: adapt to socket._fileobject changes in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2688
author Augie Fackler <augie@google.com>
date Sun, 04 Mar 2018 21:14:24 -0500
parents 7aae39d03139
children f3c314020beb
files mercurial/hgweb/server.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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