@@ -101,12 +101,9 @@ def _get_data_from_buffer(obj):
101101
102102
103103def unpack (stream , ** kwargs ):
104- """
105- Unpack an object from `stream`.
106-
107- Raises `ExtraData` when `packed` contains extra bytes.
108- See :class:`Unpacker` for options.
109- """
104+ warnings .warn (
105+ "Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead." ,
106+ PendingDeprecationWarning )
110107 data = stream .read ()
111108 return unpackb (data , ** kwargs )
112109
@@ -224,11 +221,7 @@ def __init__(self, file_like=None, read_size=0, use_list=True, raw=True,
224221 "encoding is deprecated, Use raw=False instead." ,
225222 PendingDeprecationWarning )
226223
227- if unicode_errors is not None :
228- warnings .warn (
229- "unicode_errors is deprecated." ,
230- PendingDeprecationWarning )
231- else :
224+ if unicode_errors is None :
232225 unicode_errors = 'strict'
233226
234227 if file_like is None :
@@ -713,7 +706,7 @@ class Packer(object):
713706 (deprecated) Convert unicode to bytes with this encoding. (default: 'utf-8')
714707
715708 :param str unicode_errors:
716- (deprecated) Error handler for encoding unicode. (default: 'strict')
709+ Error handler for encoding unicode. (default: 'strict')
717710 """
718711 def __init__ (self , default = None , encoding = None , unicode_errors = None ,
719712 use_single_float = False , autoreset = True , use_bin_type = False ,
@@ -727,10 +720,6 @@ def __init__(self, default=None, encoding=None, unicode_errors=None,
727720
728721 if unicode_errors is None :
729722 unicode_errors = 'strict'
730- else :
731- warnings .warn (
732- "unicode_errors is deprecated." ,
733- PendingDeprecationWarning )
734723
735724 self ._strict_types = strict_types
736725 self ._use_float = use_single_float
0 commit comments