Skip to content

Commit 2199421

Browse files
code-health: remove string encoding compatibility
See PR [1]. 1. #211 Closes #212
1 parent 8c84efc commit 2199421

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: tarantool/request.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ def __init__(self, conn):
8181
# The option controls whether to pack binary (non-unicode)
8282
# string values as mp_bin or as mp_str.
8383
#
84-
# The default behaviour of the Python 2 connector is to pack
85-
# both bytes and Unicode strings as mp_str.
86-
#
8784
# The default behaviour of the Python 3 connector (since
8885
# default encoding is "utf-8") is to pack bytes as mp_bin
8986
# and Unicode strings as mp_str. encoding=None mode must
@@ -113,7 +110,7 @@ def __init__(self, conn):
113110
# just always set it for all msgpack versions to get rid
114111
# of the warning on msgpack-0.5.0 and to keep our
115112
# behaviour on msgpack-1.0.0.
116-
if conn.encoding is None or sys.version_info.major == 2:
113+
if conn.encoding is None:
117114
packer_kwargs['use_bin_type'] = False
118115
else:
119116
packer_kwargs['use_bin_type'] = True

0 commit comments

Comments
 (0)