Patchwork D2688: hgweb: adapt to socket._fileobject changes in Python 3

login
register
mail settings
Submitter phabricator
Date March 8, 2018, 1:06 p.m.
Message ID <e66784d828d8b135890387f33dba5bbb@localhost.localdomain>
Download mbox | patch
Permalink /patch/29125/
State Not Applicable
Headers show

Comments

phabricator - March 8, 2018, 1:06 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbf9a04d78084: hgweb: adapt to socket._fileobject changes in Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2688?vs=6673&id=6726

REVISION DETAIL
  https://phab.mercurial-scm.org/D2688

AFFECTED FILES
  mercurial/hgweb/server.py

CHANGE DETAILS




To: durin42, #hg-reviewers, yuja
Cc: yuja, mercurial-devel

Patch

diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py
+++ b/mercurial/hgweb/server.py
@@ -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