Remove deprecated submodule unpack (#385)

This commit is contained in:
Inada Naoki 2019-12-05 20:47:01 +09:00 committed by GitHub
parent 9ae43709e4
commit 9f4b2d53b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 18 deletions

View file

@ -200,14 +200,6 @@ def unpackb(object packed, *, object object_hook=None, object list_hook=None,
raise ValueError("Unpack failed: error = %d" % (ret,))
def unpack(object stream, **kwargs):
PyErr_WarnEx(
DeprecationWarning,
"Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.", 1)
data = stream.read()
return unpackb(data, **kwargs)
cdef class Unpacker(object):
"""Streaming unpacker.

View file

@ -131,16 +131,6 @@ def _get_data_from_buffer(obj):
return view
def unpack(stream, **kwargs):
warnings.warn(
"Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.",
DeprecationWarning,
stacklevel=2,
)
data = stream.read()
return unpackb(data, **kwargs)
def unpackb(packed, **kwargs):
"""
Unpack an object from `packed`.