diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-11-09 14:17:17 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-14 18:14:45 +0900 |
commit | 1af384fa17e58d52a5b1826fa3f2ce3a5b1b260a (patch) | |
tree | 9272f223db4cc93c785bcbd8a89d20afbda3202c /tools/optional-requires | |
parent | a45c180447273ce3e7a0e7bcb16157723621bc63 (diff) |
RPC: Specify encoding to msgpack.Packer/Unpacker
Currently, RPC requests using rpc_cli.py will crash on Python 3,
because the decoded string through msgpack-rpc is not str type
when the default encoding is not specified into msgpack.Unpacker.
On Python 2, bytes type is the same as str type, and this problem
does not occur.
The old spec of msgpack had no notation of the encoding, but now,
msgpack defines "UTF-8" as the default encoding and has the explicit
type definitions for String and Binary.
https://github.com/msgpack/msgpack/blob/master/spec.md
This patch fixes to specify the encoding to msgpack.Packer/Unpacker
and enable to use Binary type when packing for the Python 3
compatibility.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'tools/optional-requires')
0 files changed, 0 insertions, 0 deletions