summaryrefslogtreecommitdiff
path: root/msgpack/fallback.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-01-25 21:27:46 +0900
committerInada Naoki <songofacandy@gmail.com>2019-01-25 21:27:46 +0900
commit280308e8ced50322414fd4f7426d56093a57dbf1 (patch)
tree272b1a01f5f0e0640802bb64e60c53c5e86e6b7e /msgpack/fallback.py
parent9951b894555e4f9c7120375028e686f7420de92a (diff)
downloadmsgpack-python-280308e8ced50322414fd4f7426d56093a57dbf1.tar.gz
Recommend max_buffer_len instead of max_(str|bin|ext)_len
Diffstat (limited to 'msgpack/fallback.py')
-rw-r--r--msgpack/fallback.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/msgpack/fallback.py b/msgpack/fallback.py
index 7524448..1aa3bdf 100644
--- a/msgpack/fallback.py
+++ b/msgpack/fallback.py
@@ -208,12 +208,12 @@ class Unpacker(object):
You should set this parameter when unpacking data from untrusted source.
:param int max_str_len:
- (deprecated) Limits max length of str.
- (default: max_buffer_size or 1024*1024)
+ Deprecated, use *max_buffer_size* instead.
+ Limits max length of str. (default: max_buffer_size or 1024*1024)
:param int max_bin_len:
- (deprecated) Limits max length of bin.
- (default: max_buffer_size or 1024*1024)
+ Deprecated, use *max_buffer_size* instead.
+ Limits max length of bin. (default: max_buffer_size or 1024*1024)
:param int max_array_len:
Limits max length of array.
@@ -224,18 +224,18 @@ class Unpacker(object):
(default: max_buffer_size//2 or 32*1024)
:param int max_ext_len:
- (deprecated) Limits max size of ext type.
- (default: max_buffer_size or 1024*1024)
+ Deprecated, use *max_buffer_size* instead.
+ Limits max size of ext type. (default: max_buffer_size or 1024*1024)
- example of streaming deserialize from file-like object::
+ Example of streaming deserialize from file-like object::
- unpacker = Unpacker(file_like, raw=False)
+ unpacker = Unpacker(file_like, raw=False, max_buffer_size=10*1024*1024)
for o in unpacker:
process(o)
- example of streaming deserialize from socket::
+ Example of streaming deserialize from socket::
- unpacker = Unpacker(raw=False)
+ unpacker = Unpacker(raw=False, max_buffer_size=10*1024*1024)
while True:
buf = sock.recv(1024**2)
if not buf: