Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions msgpack/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _get_data_from_buffer(obj):
warnings.warn("using old buffer interface to unpack %s; "
"this leads to unpacking errors if slicing is used and "
"will be removed in a future version" % type(obj),
RuntimeWarning)
RuntimeWarning, stacklevel=3)
else:
raise
if view.itemsize != 1:
Expand All @@ -100,7 +100,7 @@ def _get_data_from_buffer(obj):
def unpack(stream, **kwargs):
warnings.warn(
"Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.",
DeprecationWarning)
DeprecationWarning, stacklevel=2)
data = stream.read()
return unpackb(data, **kwargs)

Expand Down Expand Up @@ -226,7 +226,7 @@ def __init__(self, file_like=None, read_size=0, use_list=True, raw=True,
if encoding is not None:
warnings.warn(
"encoding is deprecated, Use raw=False instead.",
DeprecationWarning)
DeprecationWarning, stacklevel=2)

if unicode_errors is None:
unicode_errors = 'strict'
Expand Down Expand Up @@ -712,7 +712,7 @@ def __init__(self, default=None, encoding=None, unicode_errors=None,
else:
warnings.warn(
"encoding is deprecated, Use raw=False instead.",
DeprecationWarning)
DeprecationWarning, stacklevel=2)

if unicode_errors is None:
unicode_errors = 'strict'
Expand Down