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
This is a breaking change.
Before this patch, both bytes and str were encoded as mp_str. It was
possible to work with utf and non-utf strings, but not with
varbinary (mp_bin) [1]. This patch adds varbinary support for Python 3
by default. Python 2 connector behavior remains the same.
Before this patch:
* encoding="utf-8" (default)
Python 3 -> Tarantool -> Python 3
str -> mp_str (string) -> str
bytes -> mp_str (string) -> str
mp_bin (varbinary) -> bytes
* encoding=None
Python 3 -> Tarantool -> Python 3
bytes -> mp_str (string) -> bytes
str -> mp_str (string) -> bytes
mp_bin (varbinary) -> bytes
Using bytes as key was not supported by several methods (delete,
update, select).
After this patch:
* encoding="utf-8" (default)
Python 3 -> Tarantool -> Python 3
str -> mp_str (string) -> str
bytes -> mp_bin (varbinary) -> bytes
* encoding=None
Python 3 -> Tarantool -> Python 3
bytes -> mp_str (string) -> bytes
str -> mp_str (string) -> bytes
mp_bin (varbinary) -> bytes
Using bytes as key are now supported by all methods.
Thus, encoding="utf-8" connection may be used to work with
utf-8 strings and varbinary and encodine=None connection
may be used to work with non-utf-8 strings.
This patch does not add 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