Mercurial > hg
comparison mercurial/keepalive.py @ 48895:62baa61efe8f
keepalive: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12298
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 10:32:45 -0700 |
parents | 6000f5b25c9b |
children | dea766fca7e1 |
comparison
equal
deleted
inserted
replaced
48894:5917dc5d1e52 | 48895:62baa61efe8f |
---|---|
396 # although read() never adds to the buffer. | 396 # although read() never adds to the buffer. |
397 # Both readline and readlines have been stolen with almost no | 397 # Both readline and readlines have been stolen with almost no |
398 # modification from socket.py | 398 # modification from socket.py |
399 | 399 |
400 def __init__(self, sock, debuglevel=0, strict=0, method=None): | 400 def __init__(self, sock, debuglevel=0, strict=0, method=None): |
401 extrakw = {} | |
402 if not pycompat.ispy3: | |
403 extrakw['strict'] = True | |
404 extrakw['buffering'] = True | |
405 httplib.HTTPResponse.__init__( | 401 httplib.HTTPResponse.__init__( |
406 self, sock, debuglevel=debuglevel, method=method, **extrakw | 402 self, sock, debuglevel=debuglevel, method=method |
407 ) | 403 ) |
408 self.fileno = sock.fileno | 404 self.fileno = sock.fileno |
409 self.code = None | 405 self.code = None |
410 self.receivedbytescount = 0 | 406 self.receivedbytescount = 0 |
411 self._rbuf = b'' | 407 self._rbuf = b'' |