8000 Deprecate PackExceptions · sugarguo/msgpack-python@3dad398 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dad398

Browse files
committed
Deprecate PackExceptions
1 parent d90008d commit 3dad398

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

msgpack/_unpacker.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ from libc.string cimport *
1111
from libc.limits cimport *
1212

1313
from msgpack.exceptions import (
14-
BufferFull,
15-
OutOfData,
16-
UnpackValueError,
17-
ExtraData,
18-
)
14+
BufferFull,
15+
OutOfData,
16+
UnpackValueError,
17+
ExtraData,
18+
)
1919
from msgpack import ExtType
2020

2121

msgpack/exceptions.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ def __str__(self):
2424

2525

2626
class PackException(Exception):
27-
pass
27+
"""Deprecated. Use Exception instead to catch all exception during packing."""
2828

2929

3030
class PackValueError(PackException, ValueError):
31-
pass
31+
"""PackValueError is raised when type of input data is supported but it's value is unsupported.
32+
33+
Deprecated. Use ValueError instead.
34+
"""
3235

3336

3437
class PackOverflowError(PackValueError, OverflowError):
35-
pass
38+
"""PackOverflowError is raised when integer value is out of range of msgpack support [-2**31, 2**32).
39+
40+
Deprecated. Use ValueError instead.
41+
"""

0 commit comments

Comments
 (0)
0