Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make msgpack.Unpacker compatible with python2 #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scorpioWalker
Copy link

hi
I used zerorpc server with python2.
with msgpack==0.5.6, invoking methods from any client would make the server end raise an exception as below:

Traceback (most recent call last):
File "/opt/work/.pyenv/versions/mtas/lib/python2.7/site-packages/zerorpc/channel.py", line 78, in _channel_dispatcher
event = self._events.recv()
File "/opt/work/.pyenv/versions/mtas/lib/python2.7/site-packages/zerorpc/events.py", line 365, in recv
event = Event.unpack(get_pyzmq_frame_buffer(blob))
File "/opt/work/.pyenv/versions/mtas/lib/python2.7/site-packages/zerorpc/events.py", line 213, in unpack
unpacker = msgpack.Unpacker(raw=False)
File "msgpack/_unpacker.pyx", line 252, in msgpack._unpacker.Unpacker.init (msgpack/_unpacker.cpp:254)
TypeError: init() got an unexpected keyword argument 'raw'

and this obviously resulted from incompatible use of msgpack.Unpacker with arg 'raw' which could only be used in python3
so I made this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant