Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/request.py @ 36858:e3f809e0fe8e
hgweb: remove wsgirequest.__iter__
This was added in d0db3462d568 in 2006. I can't find a justification
for this method in PEP 3333. I suspect we were originally intending
to use this type as the WSGI application (which should be iterable)?
The tests all pass without this method. So let's nuke it.
Differential Revision: https://phab.mercurial-scm.org/D2749
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 08 Mar 2018 18:00:04 -0800 |
parents | d6cd1451212e |
children | 290fc4c3d1e0 |
comparison
equal
deleted
inserted
replaced
36857:d6cd1451212e | 36858:e3f809e0fe8e |
---|---|
244 keep_blank_values=1)) | 244 keep_blank_values=1)) |
245 self._start_response = start_response | 245 self._start_response = start_response |
246 self.server_write = None | 246 self.server_write = None |
247 self.headers = [] | 247 self.headers = [] |
248 | 248 |
249 def __iter__(self): | |
250 return iter([]) | |
251 | |
252 def drain(self): | 249 def drain(self): |
253 '''need to read all data from request, httplib is half-duplex''' | 250 '''need to read all data from request, httplib is half-duplex''' |
254 length = int(self.env.get('CONTENT_LENGTH') or 0) | 251 length = int(self.env.get('CONTENT_LENGTH') or 0) |
255 for s in util.filechunkiter(self.inp, limit=length): | 252 for s in util.filechunkiter(self.inp, limit=length): |
256 pass | 253 pass |