Cleanup code and pyproject (#608)

* use isort
* fallback: use BytesIO instead of StringIO. We had dropped Python 2
already.
This commit is contained in:
Inada Naoki 2024-05-06 11:46:31 +09:00 committed by GitHub
parent e0f0e145f1
commit 33e0e86f4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 75 additions and 80 deletions

View file

@ -1,20 +1,20 @@
from .exceptions import *
from .ext import ExtType, Timestamp
# ruff: noqa: F401
import os
from .exceptions import * # noqa: F403
from .ext import ExtType, Timestamp
version = (1, 0, 8)
__version__ = "1.0.8"
if os.environ.get("MSGPACK_PUREPYTHON"):
from .fallback import Packer, unpackb, Unpacker
from .fallback import Packer, Unpacker, unpackb
else:
try:
from ._cmsgpack import Packer, unpackb, Unpacker
from ._cmsgpack import Packer, Unpacker, unpackb
except ImportError:
from .fallback import Packer, unpackb, Unpacker
from .fallback import Packer, Unpacker, unpackb
def pack(o, stream, **kwargs):