mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-09 14:01:03 +00:00
Add missing params to unpack()
This commit is contained in:
parent
de3c2b99f7
commit
f7d3715f2c
1 changed files with 12 additions and 2 deletions
|
|
@ -148,7 +148,12 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
|
|||
|
||||
def unpack(object stream, object object_hook=None, object list_hook=None,
|
||||
bint use_list=1, encoding=None, unicode_errors="strict",
|
||||
object_pairs_hook=None, ext_hook=ExtType
|
||||
object_pairs_hook=None, ext_hook=ExtType,
|
||||
Py_ssize_t max_str_len=2147483647, # 2**32-1
|
||||
Py_ssize_t max_bin_len=2147483647,
|
||||
Py_ssize_t max_array_len=2147483647,
|
||||
Py_ssize_t max_map_len=2147483647,
|
||||
Py_ssize_t max_ext_len=2147483647):
|
||||
):
|
||||
"""
|
||||
Unpack an object from `stream`.
|
||||
|
|
@ -159,7 +164,12 @@ def unpack(object stream, object object_hook=None, object list_hook=None,
|
|||
"""
|
||||
return unpackb(stream.read(), use_list=use_list,
|
||||
object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook,
|
||||
encoding=encoding, unicode_errors=unicode_errors, ext_hook=ext_hook
|
||||
encoding=encoding, unicode_errors=unicode_errors, ext_hook=ext_hook,
|
||||
max_str_len=max_str_len,
|
||||
max_bin_len=max_bin_len,
|
||||
max_array_len=max_array_len,
|
||||
max_map_len=max_map_len,
|
||||
max_ext_len=max_ext_len,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue