From 17bfa120ccb17c5640c3601d054d75eb3b0aaa8e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 14 Feb 2022 14:05:32 -0500 Subject: [PATCH] Port to msgpec `0.4.0` imports --- tractor/_ipc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tractor/_ipc.py b/tractor/_ipc.py index cf4c392..9e0ced1 100644 --- a/tractor/_ipc.py +++ b/tractor/_ipc.py @@ -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.