diff --git a/mercurial/utils/compression.py b/mercurial/utils/compression.py --- a/mercurial/utils/compression.py +++ b/mercurial/utils/compression.py @@ -185,7 +185,7 @@ class compressormanager: """ assert role in (SERVERROLE, CLIENTROLE) - attr = b'serverpriority' if role == SERVERROLE else b'clientpriority' + attr = 'serverpriority' if role == SERVERROLE else 'clientpriority' engines = [self._engines[e] for e in self._wiretypes.values()] if onlyavailable: diff --git a/mercurial/wireprototypes.py b/mercurial/wireprototypes.py --- a/mercurial/wireprototypes.py +++ b/mercurial/wireprototypes.py @@ -367,9 +367,7 @@ def supportedcompengines(ui, role): # No explicit config. Filter out the ones that aren't supposed to be # advertised and return default ordering. if not configengines: - attr = ( - b'serverpriority' if role == util.SERVERROLE else b'clientpriority' - ) + attr = 'serverpriority' if role == util.SERVERROLE else 'clientpriority' return [ e for e in compengines if getattr(e.wireprotosupport(), attr) > 0 ]