Python 2.7 broken on 0.4.8
Opened this issue · 1 comments
KennyChenBasis commented
The commit to handle object arrays broke Python 2.7 support for object and void arrays:
Traceback (most recent call last):
File "tests.py", line 259, in test_numpy_structured_array
x_rec = self.encode_decode(x)
File "tests.py", line 30, in encode_decode
x_enc = msgpack.packb(x)
File "/home/user/git/msgpack-numpy/msgpack_numpy.py", line 269, in packb
return Packer(**kwargs).pack(o)
File "/home/user/git/msgpack-numpy/.tox/py27/lib/python2.7/site-packages/msgpack/fallback.py", line 883, in pack
self._pack(obj)
File "/home/user/git/msgpack-numpy/.tox/py27/lib/python2.7/site-packages/msgpack/fallback.py", line 872, in _pack
obj = self._default(obj)
File "/home/user/git/msgpack-numpy/msgpack_numpy.py", line 63, in encode
kind = bytes(obj.dtype.kind, 'ascii')
TypeError: str() takes at most 1 argument (2 given)
On the other hand, it might be time to drop support for Python 2 and old msgpack versions.
lebedov commented
Yeah, I'd prefer to drop support for Py2.7 at this point.