Deprecate PackExceptions

This commit is contained in:
INADA Naoki 2016-02-14 11:54:01 +09:00
parent d90008d4f5
commit 3dad39811d
2 changed files with 14 additions and 8 deletions

View File

@ -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

View File

@ -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.
"""