diff options
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r-- | lib/sqlalchemy/util.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 43df0ec68..88245945e 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -218,24 +218,6 @@ def flatten_iterator(x): else: yield elem -class ArgSingleton(type): - instances = weakref.WeakValueDictionary() - - def dispose(cls): - for key in list(ArgSingleton.instances): - if key[0] is cls: - del ArgSingleton.instances[key] - dispose = staticmethod(dispose) - - def __call__(self, *args): - hashkey = (self, args) - try: - return ArgSingleton.instances[hashkey] - except KeyError: - instance = type.__call__(self, *args) - ArgSingleton.instances[hashkey] = instance - return instance - def get_cls_kwargs(cls): """Return the full set of inherited kwargs for the given `cls`. |