# HG changeset patch # User Matt Harbison # Date 1729817447 14400 # Node ID 1938d72e7a16549e20117fe1f1f6ad7cd81364df # Parent 47981c4bfeeebf0faacc824e3c8aab0720db1f03 wireprotoserver: subclass the new `baseprotocolhandler` Protocol class diff -r 47981c4bfeee -r 1938d72e7a16 mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Thu Oct 24 20:47:12 2024 -0400 +++ b/mercurial/wireprotoserver.py Thu Oct 24 20:50:47 2024 -0400 @@ -19,7 +19,6 @@ wireprototypes, wireprotov1server, ) -from .interfaces import util as interfaceutil from .utils import ( compression, stringutil, @@ -56,8 +55,7 @@ return b''.join(chunks) -@interfaceutil.implementer(wireprototypes.baseprotocolhandler) -class httpv1protocolhandler: +class httpv1protocolhandler(wireprototypes.baseprotocolhandler): def __init__(self, req, ui, checkperm): self._req = req self._ui = ui @@ -65,7 +63,7 @@ self._protocaps = None @property - def name(self): + def name(self) -> bytes: return b'http-v1' def getargs(self, args): @@ -375,8 +373,7 @@ fout.flush() -@interfaceutil.implementer(wireprototypes.baseprotocolhandler) -class sshv1protocolhandler: +class sshv1protocolhandler(wireprototypes.baseprotocolhandler): """Handler for requests services via version 1 of SSH protocol.""" def __init__(self, ui, fin, fout): @@ -386,7 +383,7 @@ self._protocaps = set() @property - def name(self): + def name(self) -> bytes: return wireprototypes.SSHV1 def getargs(self, args):