8000 PendingDeprecationWarning -> DeprecationWarning (#321) · loude/msgpack-python@1bf62ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 1bf62ba

Browse files
authored
PendingDeprecationWarning -> DeprecationWarning (msgpack#321)
1 parent 9e210bf commit 1bf62ba

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

msgpack/_packer.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ cdef class Packer(object):
121121
bint use_single_float=False, bint autoreset=True, bint use_bin_type=False,
122122
bint strict_types=False):
123123
if encoding is not None:
124-
PyErr_WarnEx(PendingDeprecationWarning, "encoding is deprecated.", 1)
124+
PyErr_WarnEx(DeprecationWarning, "encoding is deprecated.", 1)
125125
self.use_float = use_single_float
126126
self.strict_types = strict_types
127127
self.autoreset = autoreset

msgpack/_unpacker.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
186186
cdef int new_protocol = 0
187187

188188
if encoding is not None:
189-
PyErr_WarnEx(PendingDeprecationWarning, "encoding is deprecated, Use raw=False instead.", 1)
189+
PyErr_WarnEx(DeprecationWarning, "encoding is deprecated, Use raw=False instead.", 1)
190190
cenc = encoding
191191

192192
if unicode_errors is not None:
@@ -213,7 +213,7 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
213213

214214
def unpack(object stream, **kwargs):
215215
PyErr_WarnEx(
216-
PendingDeprecationWarning,
216+
DeprecationWarning,
217217
"Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.", 1)
218218
data = stream.read()
219219
return unpackb(data, **kwargs)
@@ -360,7 +360,7 @@ cdef class Unpacker(object):
360360
self.stream_offset = 0
361361

362362
if encoding is not None:
363-
PyErr_WarnEx(PendingDeprecationWarning, "encoding is deprecated, Use raw=False instead.", 1)
363+
PyErr_WarnEx(DeprecationWarning, "encoding is deprecated, Use raw=False instead.", 1)
364364
self.encoding = encoding
365365
cenc = encoding
366366

msgpack/fallback.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _get_data_from_buffer(obj):
103103
def unpack(stream, **kwargs):
104104
warnings.warn(
105105
"Direct calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.",
106-
PendingDeprecationWarning)
106+
DeprecationWarning)
107107
data = stream.read()
108108
return unpackb(data, **kwargs)
109109

@@ -229,7 +229,7 @@ def __init__(self, file_like=None, read_size=0, use_list=True, raw=True,
229229
if encoding is not None:
230230
warnings.warn(
231231
"encoding is deprecated, Use raw=False instead.",
232-
PendingDeprecationWarning)
232+
DeprecationWarning)
233233

234234
if unicode_errors is None:
235235
unicode_errors = 'strict'
@@ -727,7 +727,7 @@ def __init__(self, default=None, encoding=None, unicode_errors=None,
727727
else:
728728
warnings.warn(
729729
"encoding is deprecated, Use raw=False instead.",
< 5AEA div aria-hidden="true" style="left:-2px" class="position-absolute top-0 d-flex user-select-none DiffLineTableCellParts-module__in-progress-comment-indicator--hx3m3">
730-
PendingDeprecationWarning)
730+
DeprecationWarning)
731731

732732
if unicode_errors is None:
733733
unicode_errors = 'strict'

0 commit comments

Comments
 (0)
0