From f9125454bfb2cd28d78544ba41d92c028be6a277 Mon Sep 17 00:00:00 2001 From: Yuri Date: Sun, 16 Jun 2019 02:06:42 -0700 Subject: [PATCH] Lift the default size limit of 1MB that msgpack imposes on binary data. --- python/veles/proto/msgpackwrap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/veles/proto/msgpackwrap.py b/python/veles/proto/msgpackwrap.py index 63ba0779..60383900 100644 --- a/python/veles/proto/msgpackwrap.py +++ b/python/veles/proto/msgpackwrap.py @@ -14,6 +14,7 @@ import msgpack import six +import sys from veles.data.bindata import BinData from veles.compatibility import pep487 @@ -32,7 +33,7 @@ def __init__(self): self.packer = msgpack.Packer( use_bin_type=True, default=MsgpackWrapper.pack_obj) self.unpacker = msgpack.Unpacker( - encoding='utf-8', ext_hook=MsgpackWrapper.load_obj) + encoding='utf-8', ext_hook=MsgpackWrapper.load_obj, max_buffer_size=sys.maxsize) @classmethod def pack_obj(cls, obj):