summaryrefslogtreecommitdiff
path: root/msgpack/_unpacker.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'msgpack/_unpacker.pyx')
-rw-r--r--msgpack/_unpacker.pyx9
1 files changed, 3 insertions, 6 deletions
diff --git a/msgpack/_unpacker.pyx b/msgpack/_unpacker.pyx
index 3843e92..d7fa5bc 100644
--- a/msgpack/_unpacker.pyx
+++ b/msgpack/_unpacker.pyx
@@ -212,12 +212,9 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
def unpack(object stream, **kwargs):
- """
- Unpack an object from `stream`.
-
- Raises `ValueError` when `stream` has extra bytes.
- See :class:`Unpacker` for options.
- """
+ PyErr_WarnEx(
+ PendingDeprecationWarning,
+ "Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.", 1)
data = stream.read()
return unpackb(data, **kwargs)