Skip to content

Commit

Permalink
code-health: remove string encoding compatibility
Browse files Browse the repository at this point in the history
See PR [1].

1. #211

Closes #212
  • Loading branch information
DifferentialOrange committed Sep 21, 2022
1 parent 41767b6 commit 34df802
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tarantool/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ def __init__(self, conn):
# The option controls whether to pack binary (non-unicode)
# string values as mp_bin or as mp_str.
#
# The default behaviour of the Python 2 connector is to pack
# both bytes and Unicode strings as mp_str.
#
# The default behaviour of the Python 3 connector (since
# default encoding is "utf-8") is to pack bytes as mp_bin
# and Unicode strings as mp_str. encoding=None mode must
Expand Down Expand Up @@ -113,7 +110,7 @@ def __init__(self, conn):
# just always set it for all msgpack versions to get rid
# of the warning on msgpack-0.5.0 and to keep our
# behaviour on msgpack-1.0.0.
if conn.encoding is None or sys.version_info.major == 2:
if conn.encoding is None:
packer_kwargs['use_bin_type'] = False
else:
packer_kwargs['use_bin_type'] = True
Expand Down

0 comments on commit 34df802

Please sign in to comment.