diff --git a/VERSION.txt b/VERSION.txt index a5c4c76..6bd1074 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.9.0 +3.9.1 diff --git a/rpcq/_base.py b/rpcq/_base.py index 36e68c0..ac35a76 100644 --- a/rpcq/_base.py +++ b/rpcq/_base.py @@ -109,7 +109,7 @@ def __eq__(self, other): def __hash__(self): return hash((self.__class__, astuple(self))) - _types = None + _types = {} @staticmethod def types(): @@ -120,13 +120,12 @@ def types(): :return: A dictionary of ``Message`` types. :rtype: Dict[str,type] """ - if Message._types is None: - Message._types = {} - classes_to_process = [Message] - while classes_to_process: - atom = classes_to_process.pop() - classes_to_process += atom.__subclasses__() - Message._types[atom.__name__] = (atom, inspect.getfullargspec(atom.__init__).args) + classes_to_process = [Message] + while classes_to_process: + atom = classes_to_process.pop() + classes_to_process += atom.__subclasses__() + Message._types[atom.__name__] = (atom, inspect.getfullargspec(atom.__init__).args) + return Message._types