Make strict_map_key default to True (#392)

This commit is contained in:
Inada Naoki 2019-12-06 22:23:15 +09:00 committed by GitHub
parent 0fc0eb2f16
commit d8e3cf0563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 20 deletions

View file

@ -175,9 +175,7 @@ class Unpacker(object):
Otherwise, unpack to Python str by decoding with UTF-8 encoding (default).
:param bool strict_map_key:
If true, only str or bytes are accepted for map (dict) keys.
It's False by default for backward-compatibility.
But it will be True from msgpack 1.0.
If true (default), only str or bytes are accepted for map (dict) keys.
:param callable object_hook:
When specified, it should be callable.
@ -249,7 +247,7 @@ class Unpacker(object):
read_size=0,
use_list=True,
raw=False,
strict_map_key=False,
strict_map_key=True,
object_hook=None,
object_pairs_hook=None,
list_hook=None,