@@ -159,7 +159,7 @@ cdef inline int get_data_from_buffer(object obj,
159
159
160
160
def unpackb (object packed , object object_hook = None , object list_hook = None ,
161
161
bint use_list = True , bint raw = True ,
162
- encoding = None , unicode_errors = " strict " ,
162
+ encoding = None , unicode_errors = None ,
163
163
object_pairs_hook = None , ext_hook = ExtType,
164
164
Py_ssize_t max_str_len = 2147483647 , # 2**32-1
165
165
Py_ssize_t max_bin_len = 2147483647 ,
@@ -193,7 +193,6 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
193
193
cenc = PyBytes_AsString(encoding)
194
194
195
195
if unicode_errors is not None :
196
- PyErr_WarnEx(PendingDeprecationWarning , " unicode_errors is deprecated" , 1 )
197
196
if isinstance (unicode_errors, unicode ):
198
197
unicode_errors = unicode_errors.encode(' ascii' )
199
198
elif not isinstance (unicode_errors, bytes):
@@ -304,8 +303,7 @@ cdef class Unpacker(object):
304
303
If it is None (default), msgpack raw is deserialized to Python bytes.
305
304
306
305
:param str unicode_errors:
307
- Deprecated. Used for decoding msgpack raw with *encoding*.
308
- (default: `'strict'`)
306
+ Error handler used for decoding str type. (default: `'strict'`)
309
307
310
308
311
309
Example of streaming deserialize from file-like object::
@@ -347,7 +345,7 @@ cdef class Unpacker(object):
347
345
def __init__ (self , file_like = None , Py_ssize_t read_size = 0 ,
348
346
bint use_list = True , bint raw = True ,
349
347
object object_hook = None , object object_pairs_hook = None , object list_hook = None ,
350
- encoding = None , unicode_errors = ' strict ' , int max_buffer_size = 0 ,
348
+ encoding = None , unicode_errors = None , int max_buffer_size = 0 ,
351
349
object ext_hook = ExtType,
352
350
Py_ssize_t max_str_len = 2147483647 , # 2**32-1
353
351
Py_ssize_t max_bin_len = 2147483647 ,
@@ -394,7 +392,6 @@ cdef class Unpacker(object):
394
392
cenc = PyBytes_AsString(self .encoding)
395
393
396
394
if unicode_errors is not None :
397
- PyErr_WarnEx(PendingDeprecationWarning , " unicode_errors is deprecated" , 1 )
398
395
if isinstance (unicode_errors, unicode ):
399
396
self .unicode_errors = unicode_errors.encode(' ascii' )
400
397
elif isinstance (unicode_errors, bytes):
0 commit comments