mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-13 19:04:16 +00:00
Drop Python 2 support from _cmsgpack (#376)
This commit is contained in:
parent
b458e9a6a2
commit
891f2d8743
9 changed files with 36 additions and 55 deletions
|
|
@ -2,6 +2,8 @@
|
|||
from ._version import version
|
||||
from .exceptions import *
|
||||
|
||||
import os
|
||||
import sys
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
|
|
@ -17,8 +19,7 @@ class ExtType(namedtuple('ExtType', 'code data')):
|
|||
return super(ExtType, cls).__new__(cls, code, data)
|
||||
|
||||
|
||||
import os
|
||||
if os.environ.get('MSGPACK_PUREPYTHON'):
|
||||
if os.environ.get('MSGPACK_PUREPYTHON') or sys.version_info[0] == 2:
|
||||
from .fallback import Packer, unpackb, Unpacker
|
||||
else:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue