Cereal2nd / velbus-aio

Velbus Asyncio
Apache License 2.0
15 stars 10 forks source link

Make deserializer from cache backward compatible #70

Closed niobos closed 6 months ago

niobos commented 1 year ago

The (de)serialization currently uses Pickle. This breaks when upgrading the classes of the stored objects, since the deserializer can't find the newly added fields in the file.

We need a backward compatible deserialization process. This probably means writing a (de)serializer explicitly instead of relying on pickle. (This has an added security advantage; unpickle-ing isn't very safe to do if the source is not trusted)

See also: #69