8000 more stern warning · msgpack/msgpack-python@4d40e65 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d40e65

Browse files
committed
more stern warning
1 parent 6dd4afe commit 4d40e65

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

msgpack/_unpacker.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ cdef inline int get_data_from_buffer(object obj,
140140
new_protocol[0] = 0
141141
if PyObject_AsReadBuffer(obj, <const void**> buf, buffer_len) == -1:
142142
raise BufferError("could not get memoryview")
143-
PyErr_WarnEx(DeprecationWarning,
144-
"using old buffer interface to read from %s, which "
143+
PyErr_WarnEx(RuntimeWarning,
144+
"using old buffer interface to unpack %s; "
145+
"this leads to unpacking errors if slicing is used and "
145146
"will be removed in a future version" % type(obj),
146147
1)
147148
success = 1

msgpack/fallback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def feed(self, next_bytes):
260260
if not PY3:
261261
view = memoryview(buffer(next_bytes))
262262
warnings.warn("using old buffer interface to unpack %s; "
263-
"this can cause problems which sliced data and"
263+
"this leads to unpacking errors if slicing is used and "
264264
"will be removed in a future version" % type(next_bytes),
265265
RuntimeWarning)
266266
else:

0 commit comments

Comments
 (0)
0