diff --git a/tarantool/response.py b/tarantool/response.py index 9516cd39..5e485dae 100644 --- a/tarantool/response.py +++ b/tarantool/response.py @@ -50,16 +50,19 @@ def __init__(self, conn, response): # created in the __new__(). # super(Response, self).__init__() + kwargs = dict(use_list=True) + if msgpack.version >= (1, 0, 0): + # XXX: Explain why it is necessary. + kwargs['strict_map_key'] = False if msgpack.version >= (0, 5, 2) and conn.encoding == 'utf-8': # Get rid of the following warning. # > PendingDeprecationWarning: encoding is deprecated, # > Use raw=False instead. - unpacker = msgpack.Unpacker(use_list=True, raw=False) + kwargs['raw'] = False elif conn.encoding is not None: - unpacker = msgpack.Unpacker(use_list=True, encoding=conn.encoding) - else: - unpacker = msgpack.Unpacker(use_list=True) + kwargs['encoding'] = conn.encoding + unpacker = msgpack.Unpacker(**kwargs) unpacker.feed(response) header = unpacker.unpack()