Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc/veles: Fix runtime crash due to change in msgpack python module …
…interface
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- workaround for the incompatibility with newer python's msgpack package: | ||
- TypeError: __init__() got an unexpected keyword argument 'encoding' | ||
|
||
--- python/veles/proto/msgpackwrap.py.orig 2021-04-01 00:13:20 UTC | ||
+++ python/veles/proto/msgpackwrap.py | ||
@@ -33,7 +33,7 @@ class MsgpackWrapper(pep487.NewObject): | ||
self.packer = msgpack.Packer( | ||
use_bin_type=True, default=MsgpackWrapper.pack_obj) | ||
self.unpacker = msgpack.Unpacker( | ||
- encoding='utf-8', ext_hook=MsgpackWrapper.load_obj, max_buffer_size=sys.maxsize) | ||
+ ext_hook=MsgpackWrapper.load_obj, max_buffer_size=sys.maxsize) | ||
|
||
@classmethod | ||
def pack_obj(cls, obj): |