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 self.prefix_size = prefix_size
# TODO: struct aware messaging coders # TODO: struct aware messaging coders
self.encode = msgspec.Encoder().encode self.encode = msgspec.msgpack.Encoder().encode
self.decode = msgspec.Decoder().decode # dict[str, Any]) self.decode = msgspec.msgpack.Decoder().decode # dict[str, Any])
async def _iter_packets(self) -> AsyncGenerator[dict, None]: async def _iter_packets(self) -> AsyncGenerator[dict, None]:
'''Yield packets from the underlying stream. '''Yield packets from the underlying stream.