diff --git a/shared_memory_dict/serializers.py b/shared_memory_dict/serializers.py index 18e6c36..1069180 100644 --- a/shared_memory_dict/serializers.py +++ b/shared_memory_dict/serializers.py @@ -25,6 +25,8 @@ def loads(self, data: bytes) -> dict: class JSONSerializer: + __slots__ = () + encoder = json.JSONEncoder decoder = json.JSONDecoder @@ -43,6 +45,9 @@ def loads(self, data: bytes) -> dict: class PickleSerializer: + + __slots__ = () + def dumps(self, obj: dict) -> bytes: try: return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)