Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG62baa61efe8f: keepalive: remove Python 2 support code
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
| Alphare |
| hg-reviewers |
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/keepalive.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| be961f208d7e | c00e010ca65c | Gregory Szorc | Feb 21 2022, 12:32 PM |
| # the buffer. | # the buffer. | ||||
| # the read method wraps the original to accommodate buffering, | # the read method wraps the original to accommodate buffering, | ||||
| # although read() never adds to the buffer. | # although read() never adds to the buffer. | ||||
| # Both readline and readlines have been stolen with almost no | # Both readline and readlines have been stolen with almost no | ||||
| # modification from socket.py | # modification from socket.py | ||||
| def __init__(self, sock, debuglevel=0, strict=0, method=None): | def __init__(self, sock, debuglevel=0, strict=0, method=None): | ||||
| extrakw = {} | |||||
| if not pycompat.ispy3: | |||||
| extrakw['strict'] = True | |||||
| extrakw['buffering'] = True | |||||
| httplib.HTTPResponse.__init__( | httplib.HTTPResponse.__init__( | ||||
| self, sock, debuglevel=debuglevel, method=method, **extrakw | self, sock, debuglevel=debuglevel, method=method | ||||
| ) | ) | ||||
| self.fileno = sock.fileno | self.fileno = sock.fileno | ||||
| self.code = None | self.code = None | ||||
| self.receivedbytescount = 0 | self.receivedbytescount = 0 | ||||
| self._rbuf = b'' | self._rbuf = b'' | ||||
| self._rbufsize = 8096 | self._rbufsize = 8096 | ||||
| self._handler = None # inserted by the handler later | self._handler = None # inserted by the handler later | ||||
| self._host = None # (same) | self._host = None # (same) | ||||