Port to msgpec `0.4.0` imports

msgpack_lists_by_default
Tyler Goodlet 2022-02-14 14:05:32 -05:00
parent 77ddc073e8
commit 17bfa120cc
1 changed files with 2 additions and 2 deletions

View File

@ -222,8 +222,8 @@ class MsgspecTCPStream(MsgpackTCPStream):
self.prefix_size = prefix_size
# TODO: struct aware messaging coders
self.encode = msgspec.Encoder().encode
self.decode = msgspec.Decoder().decode # dict[str, Any])
self.encode = msgspec.msgpack.Encoder().encode
self.decode = msgspec.msgpack.Decoder().decode # dict[str, Any])
async def _iter_packets(self) -> AsyncGenerator[dict, None]:
'''Yield packets from the underlying stream.