see ticket and borg.helpers.msgpack docstring.
this changeset implements the full migration to
msgpack 2.0 spec (use_bin_type=True, raw=False).
still needed compat to the past is done via want_bytes decoder in borg.item.
our data structures need strict_map_key=False, which is not the
default of msgpack 1.0.0. i made it default in our wrapper API.
call our wrapper for performance profile creation/conversion also
to avoid msgpack compat issues.
remove encoding from wrapper api, we do not use it any more.
remove raw is True check, we need false for profiles
strict_map_key is only supported for msgpack >= 1.0.0.
for the Unpacker class, our msgpack wrapper already enforced own
defaults (identical to msgpack < 0.6.0 defaults) - no problem there.
for the unpack and unpackb functions, this changeset enforces the
same defaults in the wrapper, overriding the msgpack 0.6.0+ new
defaults (which caused breakage as seen in #4220).
wrap msgpack to avoid future upstream api changes making troubles
or that we would have to globally spoil our code with extra params.
make sure the packing is always with use_bin_type=False,
thus generating "old" msgpack format (as borg always did) from
bytes objects.
make sure the unpacking is always with raw=True,
thus generating bytes objects.
note:
safe unicode encoding/decoding for some kinds of data types is done in Item
class (see item.pyx), so it is enough if we care for bytes objects on the
msgpack level.
also wrap exception handling, so borg code can catch msgpack specific
exceptions even if the upstream msgpack code raises way too generic
exceptions typed Exception, TypeError or ValueError.
We use own Exception classes for this, upstream classes are deprecated