borg2: cleanup msgpack related str/bytes mess#6704
Merged
ThomasWaldmann merged 14 commits intoborgbackup:borg2from Jun 9, 2022
Merged
borg2: cleanup msgpack related str/bytes mess#6704ThomasWaldmann merged 14 commits intoborgbackup:borg2from
ThomasWaldmann merged 14 commits intoborgbackup:borg2from
Conversation
7f1b0e0 to
01bdae6
Compare
see ticket and borg.helpers.msgpack docstring.
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.
update_internal() makes sure they have the desired type already.
also: fixed Item.xattrs to be StableDict (not just a dict, as the msgpack unpacker gives us)
Item.xattrs is now always a StableDict mapping bytes keys -> bytes values. The special casing of empty values (b'') getting replaced by None was removed.
If we do not know the value, just do not have that key/value pair in the item.
4f2768f to
08228fb
Compare
also, some type conversions are now done in update_internal once, not in the decode methods of the classes in item.pyx.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
based on #6703, see the last commits.