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

Fix deprecation warning for MsgPack Unpacker encoding #206

Merged
merged 1 commit into from Dec 12, 2018

Conversation

DavidAntliff
Copy link

MsgPack is deprecating Unpacker(encoding='utf-8') - use 'raw=True' as recommended by MsgPack docs: https://pypi.org/project/msgpack/

Deprecating encoding option
encoding and unicode_errors options are deprecated.

In case of packer, use UTF-8 always. Storing other than UTF-8 is not recommended.

For backward compatibility, you can use use_bin_type=False and pack bytes object into msgpack raw type.

In case of unpacker, there is new raw option. It is True by default for backward compatibility, but it is changed to False in near future. You can use raw=False instead of encoding='utf-8'.

Relevant warning:

/home/dantliff/.pyenv/versions/sptest-3.7.1/lib/python3.7/site-packages/zerorpc/events.py:213: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead.
    unpacker = msgpack.Unpacker(encoding='utf-8')

@bombela bombela merged commit c8b2f64 into 0rpc:master Dec 12, 2018
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.

None yet

2 participants