diff options
| author | INADA Naoki <methane@users.noreply.github.com> | 2018-02-23 11:33:26 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-23 11:33:26 +0900 |
| commit | 3ca8eff31dd1a8a6c867f2d490f8ca26cb840124 (patch) | |
| tree | b96cce5d71c066f2cc4deee741b3a19f3b4ed1e4 /msgpack/__init__.py | |
| parent | 02c881c7cb402b37418a9bd9a3fa56daf673a71b (diff) | |
| parent | 9455fccc5283abe59868c55ee3f4cedd5bf2d14b (diff) | |
| download | msgpack-python-3ca8eff31dd1a8a6c867f2d490f8ca26cb840124.tar.gz | |
Revert "Move unpack() from each implementation to __init__." (#288)
This reverts commit da902f9c1d996fb461f1efef6487ef40d32d365a.
Diffstat (limited to 'msgpack/__init__.py')
| -rw-r--r-- | msgpack/__init__.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/msgpack/__init__.py b/msgpack/__init__.py index 70de97f..6c5ae53 100644 --- a/msgpack/__init__.py +++ b/msgpack/__init__.py @@ -19,13 +19,13 @@ class ExtType(namedtuple('ExtType', 'code data')): import os if os.environ.get('MSGPACK_PUREPYTHON'): - from msgpack.fallback import Packer, unpackb, Unpacker + from msgpack.fallback import Packer, unpack, unpackb, Unpacker else: try: from msgpack._packer import Packer - from msgpack._unpacker import unpackb, Unpacker + from msgpack._unpacker import unpack, unpackb, Unpacker except ImportError: - from msgpack.fallback import Packer, unpackb, Unpacker + from msgpack.fallback import Packer, unpack, unpackb, Unpacker def pack(o, stream, **kwargs): @@ -46,17 +46,6 @@ def packb(o, **kwargs): """ return Packer(**kwargs).pack(o) - -def unpack(stream, **kwargs): - """ - Unpack an object from `stream`. - - Raises `ExtraData` when `packed` contains extra bytes. - See :class:`Unpacker` for options. - """ - return unpackb(stream.read(), **kwargs) - - # alias for compatibility to simplejson/marshal/pickle. load = unpack loads = unpackb |
