summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2016-02-14 11:54:01 +0900
committerINADA Naoki <songofacandy@gmail.com>2016-02-14 14:29:34 +0900
commit3dad39811d93a58c5d3de874193290b935da1446 (patch)
tree5883be97938bee80c57fb66e0dc925e4f4548cad
parentd90008d4f57ec83a15b84cf2db2edc36e9504ac1 (diff)
downloadmsgpack-python-3dad39811d93a58c5d3de874193290b935da1446.tar.gz
Deprecate PackExceptions
-rw-r--r--msgpack/_unpacker.pyx10
-rw-r--r--msgpack/exceptions.py12
2 files changed, 14 insertions, 8 deletions
diff --git a/msgpack/_unpacker.pyx b/msgpack/_unpacker.pyx
index 90ebf7d..0443505 100644
--- a/msgpack/_unpacker.pyx
+++ b/msgpack/_unpacker.pyx
@@ -11,11 +11,11 @@ from libc.string cimport *
from libc.limits cimport *
from msgpack.exceptions import (
- BufferFull,
- OutOfData,
- UnpackValueError,
- ExtraData,
- )
+ BufferFull,
+ OutOfData,
+ UnpackValueError,
+ ExtraData,
+)
from msgpack import ExtType
diff --git a/msgpack/exceptions.py b/msgpack/exceptions.py
index bb12264..73010b7 100644
--- a/msgpack/exceptions.py
+++ b/msgpack/exceptions.py
@@ -24,12 +24,18 @@ class ExtraData(UnpackValueError):
class PackException(Exception):
- pass
+ """Deprecated. Use Exception instead to catch all exception during packing."""
class PackValueError(PackException, ValueError):
- pass
+ """PackValueError is raised when type of input data is supported but it's value is unsupported.
+
+ Deprecated. Use ValueError instead.
+ """
class PackOverflowError(PackValueError, OverflowError):
- pass
+ """PackOverflowError is raised when integer value is out of range of msgpack support [-2**31, 2**32).
+
+ Deprecated. Use ValueError instead.
+ """