From e89589762ef6c180b8314aa4431ec696e4b29e0c Mon Sep 17 00:00:00 2001 From: vakarisz Date: Mon, 2 May 2022 14:52:46 +0300 Subject: [PATCH] Common: Rever singleton from WeakValueDictionary to simple dictionary --- monkey/common/utils/code_utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monkey/common/utils/code_utils.py b/monkey/common/utils/code_utils.py index fce8453bf..810fbb0d7 100644 --- a/monkey/common/utils/code_utils.py +++ b/monkey/common/utils/code_utils.py @@ -1,8 +1,3 @@ -# abstract, static method decorator -# noinspection PyPep8Naming -from weakref import WeakValueDictionary - - class abstractstatic(staticmethod): __slots__ = () @@ -14,7 +9,7 @@ class abstractstatic(staticmethod): class Singleton(type): - _instances = WeakValueDictionary() + _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: