tarantool / tarantool-python

Python client library for Tarantool
https://www.tarantool.io
BSD 2-Clause "Simplified" License
100 stars 48 forks source link

python3: make conversion to string deterministic #187

Closed ligurio closed 3 years ago

ligurio commented 3 years ago

Response object is a unpacked msgpack structure, returned by Tarantool. Nor msgpack-python [1] that used in tarantool-python nor msgpack [2] itself cannot guarantee an order of keys in unpacked dictionaries. Therefore we have different keys order with running tests under Python 2 and Python 3, for example box-py/call.test.py. To workaround a problem proposed a conversion of dictionaries in a tuple to lists before printing Response object.

  1. https://github.com/msgpack/msgpack-python/pull/164
  2. https://github.com/msgpack/msgpack/issues/215
ligurio commented 3 years ago

Discussed and decided to workaround a problem in a test itself. See https://github.com/tarantool/tarantool/issues/5538