diff --git a/tarantool/request.py b/tarantool/request.py index 8564ec18..c4f8fc22 100644 --- a/tarantool/request.py +++ b/tarantool/request.py @@ -4,6 +4,7 @@ Request types definitions ''' +import sys import collections import msgpack import hashlib @@ -101,7 +102,7 @@ def __init__(self, conn): # connection encoding is not None. If encoding is None, # pack bytes as mp_str and unpack mp_str to bytes. mp_bin is # unsupported in this mode. - if conn.encoding is None: + if conn.encoding is None or sys.version_info.major == 2: packer_kwargs['use_bin_type'] = False else: packer_kwargs['use_bin_type'] = True