From 907452b1bc0f7876a01de5ff39cc2dc64eb3c4a4 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 27 Jul 2020 14:35:30 -0700 Subject: [PATCH] Drop msgpack pre-0.5.2 compat code (#3977) As we require msgpack 0.6.0+, there is no need for msgpack compat code for versions prior to 0.6.0. So drop this compat code. --- distributed/protocol/utils.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/distributed/protocol/utils.py b/distributed/protocol/utils.py index 8dc75a28c63..578a34e4164 100644 --- a/distributed/protocol/utils.py +++ b/distributed/protocol/utils.py @@ -1,5 +1,4 @@ import struct -import msgpack from ..utils import nbytes @@ -10,13 +9,7 @@ ("max_%s_len" % x): 2 ** 31 - 1 for x in ["str", "bin", "array", "map", "ext"] } msgpack_opts["strict_map_key"] = False - -try: - msgpack.loads(msgpack.dumps(""), raw=False, **msgpack_opts) - msgpack_opts["raw"] = False -except TypeError: - # Backward compat with old msgpack (prior to 0.5.2) - msgpack_opts["encoding"] = "utf-8" +msgpack_opts["raw"] = False def frame_split_size(frame, n=BIG_BYTES_SHARD_SIZE) -> list: