Skip to content

Commit 6efb9de

Browse files
Disable for python 2
1 parent b335adf commit 6efb9de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tarantool/request.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Request types definitions
55
'''
66

7+
import sys
78
import collections
89
import msgpack
910
import hashlib
@@ -101,7 +102,7 @@ def __init__(self, conn):
101102
# connection encoding is not None. If encoding is None,
102103
# pack bytes as mp_str and unpack mp_str to bytes. mp_bin is
103104
# unsupported in this mode.
104-
if conn.encoding is None:
105+
if conn.encoding is None or sys.version_info.major == 2:
105106
packer_kwargs['use_bin_type'] = False
106107
else:
107108
packer_kwargs['use_bin_type'] = True

0 commit comments

Comments
 (0)