diff options
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r-- | lib/sqlalchemy/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 3e26217c9..463d4b8af 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -4,7 +4,7 @@ # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -import itertools, sys, warnings, sets +import itertools, sys, warnings, sets, weakref import __builtin__ from sqlalchemy import exceptions, logging @@ -113,7 +113,7 @@ def flatten_iterator(x): yield elem class ArgSingleton(type): - instances = {} + instances = weakref.WeakValueDictionary() def dispose(cls): for key in list(ArgSingleton.instances): |