summaryrefslogtreecommitdiff
path: root/msgpack/fallback.py
diff options
context:
space:
mode:
Diffstat (limited to 'msgpack/fallback.py')
-rw-r--r--msgpack/fallback.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/msgpack/fallback.py b/msgpack/fallback.py
index b9ef296..04fb5b9 100644
--- a/msgpack/fallback.py
+++ b/msgpack/fallback.py
@@ -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:
@@ -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)
@@ -226,7 +226,7 @@ class Unpacker(object):
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'
@@ -712,7 +712,7 @@ class Packer(object):
else:
warnings.warn(
"encoding is deprecated, Use raw=False instead.",
- DeprecationWarning)
+ DeprecationWarning, stacklevel=2)
if unicode_errors is None:
unicode_errors = 'strict'