diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
index 7c2c7c74941136bec079ec7c541e9d950ceb2fee_bWVyY3VyaWFsL3dpcmVwcm90b2ZyYW1pbmcucHk=..d33997123ea57c598b5b9fc165152fceadb27bab_bWVyY3VyaWFsL3dpcmVwcm90b2ZyYW1pbmcucHk= 100644
--- a/mercurial/wireprotoframing.py
+++ b/mercurial/wireprotoframing.py
@@ -19,6 +19,7 @@
     cbor,
 )
 from . import (
+    encoding,
     error,
     util,
 )
@@ -142,6 +143,7 @@
     flags = attr.ib()
     payload = attr.ib()
 
+    @encoding.strmethod
     def __repr__(self):
         typename = '<unknown 0x%02x>' % self.typeid
         for name, value in FRAME_TYPES.iteritems():