Upgrade guide¶
To v2¶
Generally speaking, v2 broke the public API a bit, so most projects using v1 could probably work as-is with v2. However, the private API changed a lot.
Old signatures will fail
Data signed with previous versions fails with InvalidSignatureError
.
Public API changes¶
Blake2Signer|Blake2TimestampSigner|Blake2SerializerSigner.SEPARATOR
class attribute is replaced by theseparator
instance attribute and is now checked to be ASCII only and not belong to the encoder alphabet.Blake2SerializerSigner.COMPRESSION_FLAG
class attribute is replaced by thecompression_flag
instance attribute and is now checked to be ASCII only.Blake2SerializerSigner.COMPRESSION_RATIO
class attribute is replaced by thecompression_ratio
instance attribute and is now checked to be ASCII only.- The default digest size for all signers is set to 16 bytes. Previously,
Blake2Signer
andBlake2TimestampSigner
defaulted to the maximum allowed size for the hasher. - The compression parameter used in
Blake2SerializerSigner
nameduse_compression
is renamed tocompress
.
Private API changes¶
The private API changed a lot, so if you were using some private methods please review them for changes! Unfortunately I can't list them all here but mainly check these commits:
c6acaa0a
- 🏗 Split classes into own modules by type0b1d0a6c
- ✨ Allow changing encoder in every signerc9bcd173
- ✨ Make separator an instance attribute675389de
- ✨ Make comp flag and ratio an instance attribute8618e663
- ♻ Refactor serializer signer base methods40ccbd40
- ✨ Add new methods to get data and sig separatelyb2d69910
- ♻ Renameuse_compression
tocompress