Skip to content

Commit

Permalink
Disable for python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
DifferentialOrange committed Mar 16, 2022
1 parent b335adf commit 6efb9de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tarantool/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Request types definitions
'''

import sys
import collections
import msgpack
import hashlib
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6efb9de

Please sign in to comment.