HomeSoftware Heritage

Use msgpack Timestamp extension type to encode datetime objects in the journal

Description

Use msgpack Timestamp extension type to encode datetime objects in the journal

The encoding of datetime objects is done using msgpack extension types
(instead of former b'swhtype" custom types).

Note that this imply that the timezone of the encoded datime is "lost in
translation": the resulting datetime will be a (tz-aware) UTC datetime
object.

Support for decoding these later is however provided for backward
compatbility.

Also make the serialization code of the journal independant from
swh.core.api.serializer.

This later move aims at making the msgpack serialization process of the
journal to be specified (and predictable). The code from swh.core is
dedicated at RPC and can thus do much more "custom types" than what is
needed for the journal. So by not using the serialization code from the
swh.core pakage, we make sure we do not inadvertently encode unspecified
objects in the journal.

Related to T2834