If the following code is triggered, then you will be told that there is a TypeError: can't set attributes of built-in/extension type 'object'. I guess it should be setattr(instance, key, value).
def set_python_instance_state(self, instance, state):
......
for key, value in slotstate.items():
setattr(object, key, value)
If the following code is triggered, then you will be told that there is a TypeError: can't set attributes of built-in/extension type 'object'. I guess it should be setattr(instance, key, value).