From a83bd9c60813a6d20bb297aa8f92750a1391eb95 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 11 Aug 2022 14:21:01 -0400 Subject: [PATCH] Drop `msgpack` from `marketstore` module --- piker/data/marketstore.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/piker/data/marketstore.py b/piker/data/marketstore.py index ee76ba1e..7f39ad88 100644 --- a/piker/data/marketstore.py +++ b/piker/data/marketstore.py @@ -37,7 +37,7 @@ import time from math import isnan from bidict import bidict -import msgpack +from msgspec.msgpack import encode, decode import pyqtgraph as pg import numpy as np import tractor @@ -774,12 +774,13 @@ async def stream_quotes( async with open_websocket_url(f'ws://{host}:{port}/ws') as ws: # send subs topics to server resp = await ws.send_message( - msgpack.dumps({'streams': list(tbks.values())}) + + encode({'streams': list(tbks.values())}) ) log.info(resp) async def recv() -> dict[str, Any]: - return msgpack.loads((await ws.get_message()), encoding='utf-8') + return decode((await ws.get_message()), encoding='utf-8') streams = (await recv())['streams'] log.info(f"Subscribed to {streams}")