diff --git a/src/borg/constants.py b/src/borg/constants.py index 13eb8bd23..d2fa11919 100644 --- a/src/borg/constants.py +++ b/src/borg/constants.py @@ -128,7 +128,7 @@ class KeyType: # upper 4 bits are ciphersuite, 0 == legacy AES-CTR KEYFILE = 0x00 # repos with PASSPHRASE mode could not be created any more since borg 1.0, see #97. - # in borg 1.3 all of its code and also the "borg key migrate-to-repokey" command was removed. + # in borg 2. all of its code and also the "borg key migrate-to-repokey" command was removed. # if you still need to, you can use "borg key migrate-to-repokey" with borg 1.0, 1.1 and 1.2. # Nowadays, we just dispatch this to RepoKey and assume the passphrase was migrated to a repokey. PASSPHRASE = 0x01 # legacy, attic and borg < 1.0 diff --git a/src/borg/helpers/msgpack.py b/src/borg/helpers/msgpack.py index 4e79c0274..ffb87be03 100644 --- a/src/borg/helpers/msgpack.py +++ b/src/borg/helpers/msgpack.py @@ -6,7 +6,7 @@ Packing ------- -- use_bin_type = True (used by borg since borg 1.3) +- use_bin_type = True (used by borg since borg 2.0) This is used to generate output according to new msgpack 2.0 spec. This cleanly keeps bytes and str types apart. @@ -21,16 +21,17 @@ Unpacking --------- -- raw = False (used by borg since borg 1.3) - We already can use this with borg 1.3 due to the want_bytes decoder. - This decoder can be removed in future, when we do not have to deal with data any more that was packed the old way. +- raw = False (used by borg since borg 2.0) + We already can use this with borg 2.0 due to the type conversion to the desired type in item.py update_internal + methods. This type conversion code can be removed in future, when we do not have to deal with data any more + that was packed the old way. It will then unpack according to the msgpack 2.0 spec format and directly output bytes or str. - raw = True (the old way, used by borg < 1.3) - unicode_errors = 'surrogateescape' -> see description above (will be used when raw is False). -As of borg 1.3, we have fixed most of the msgpack str/bytes mess, #968. +As of borg 2.0, we have fixed most of the msgpack str/bytes mess, #968. Borg now still needs to **read** old repos, archives, keys, ... so we can not yet fix it completely. But from now on, borg only **writes** new data according to the new msgpack 2.0 spec, thus we can remove some legacy support in a later borg release (some places are marked with "legacy"). @@ -41,7 +42,7 @@ - pack with use_bin_type=True (according to msgpack 2.0 spec) - packs str -> raw and bytes -> bin - unpack with raw=False (according to msgpack 2.0 spec, using unicode_errors='surrogateescape') -- unpacks bin to bytes and raw to str (thus we need to re-encode manually if we want bytes from "raw") +- unpacks bin to bytes and raw to str (thus we need to convert to desired type if we want bytes from "raw") """ from .datastruct import StableDict