You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this patch, both bytes and Unicode strings was encoded as mp_str.
It was possible to work with utf and non-utf strings, but not with
varbinary [1] (mp_bin). This patch adds varbinary support for Python 3
by default. Python 2 connector behavior remains the same.
For encoding="utf-8" (default), the following behavior is expected now:
(Python 3 -> Tarantool -> Python 3)
bytes -> mp_bin (varbinary) -> bytes
str -> mp_str (string) -> str
For encoding=None, the following behavior is expected now:
(Python 3 -> Tarantool -> Python 3)
bytes -> mp_str (string) -> bytes
This patch changes current behavior for Python 3. Now bytes objects
encoded to varbinary by default. bytes objects also supported as keys.
This patch do not adds new restrictions (like "do not permit to use
str in encoding=None mode because result may be confusing") to preserve
current behavior (for example, using space name as str in schema
get_space).
1. tarantool/tarantool#4201Closes#105
0 commit comments