Patchwork D2747: hgweb: remove unused methods on wsgirequest

login
register
mail settings
Submitter phabricator
Date March 9, 2018, 2:27 a.m.
Message ID <differential-rev-PHID-DREV-y3j6jhiaiyy7o6sosl5c-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29152/
State Superseded
Headers show

Comments

phabricator - March 9, 2018, 2:27 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  writelines() isn't used in our code base.
  
  close() was a no-op. It is an optional method per PEP 0333.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -306,16 +306,9 @@ 
                 if inst[0] != errno.ECONNRESET:
                     raise
 
-    def writelines(self, lines):
-        for line in lines:
-            self.write(line)
-
     def flush(self):
         return None
 
-    def close(self):
-        return None
-
 def wsgiapplication(app_maker):
     '''For compatibility with old CGI scripts. A plain hgweb() or hgwebdir()
     can and should now be used as a WSGI application.'''