Mercurial > hg
changeset 48900:5ed68dc64948
wireprotoframing: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12303
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 10:39:09 -0700 |
parents | 563eb25e079b |
children | cc0e059d2af8 |
files | mercurial/wireprotoframing.py |
diffstat | 1 files changed, 0 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/wireprotoframing.py Mon Feb 21 10:38:27 2022 -0700 +++ b/mercurial/wireprotoframing.py Mon Feb 21 10:39:09 2022 -0700 @@ -761,11 +761,6 @@ self._decompressor = zlib.decompressobj() def decode(self, data): - # Python 2's zlib module doesn't use the buffer protocol and can't - # handle all bytes-like types. - if not pycompat.ispy3 and isinstance(data, bytearray): - data = bytes(data) - return self._decompressor.decompress(data)