From dfba9dd83db92372a2abcb4bd0e197586919aec9 Mon Sep 17 00:00:00 2001 From: Asif Saif Uddin Date: Thu, 18 Nov 2021 19:10:01 +0600 Subject: [PATCH] added experimental slots to some kombu class --- kombu/serialization.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/kombu/serialization.py b/kombu/serialization.py index 58c28717..63e1f70d 100644 --- a/kombu/serialization.py +++ b/kombu/serialization.py @@ -65,6 +65,20 @@ class SerializerRegistry: self.type_to_name = {} self.name_to_type = {} + __slots__ = ( + "_encoders", + "_decoders", + "_default_encode", + "_default_content_type", + "_default_content_encoding", + "_disabled_content_types", + "type_to_name", + "name_to_type", + # adding '__dict__' to get dynamic assignment + "__dict__", + "__weakref__", + ) + def register(self, name, encoder, decoder, content_type, content_encoding='utf-8'): """Register a new encoder/decoder.