Skip to content

Commit

Permalink
Drop msgpack pre-0.5.2 compat code (#3977)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jakirkham authored Jul 27, 2020
1 parent c4df1a3 commit 907452b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions distributed/protocol/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import struct
import msgpack

from ..utils import nbytes

Expand All @@ -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:
Expand Down

0 comments on commit 907452b

Please sign in to comment.