From: Mike Bayer Date: Fri, 8 Dec 2006 21:40:10 +0000 (+0000) Subject: cursors needs to be weak key X-Git-Tag: rel_0_3_2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33620a16fd0a701de4a0bc2148f210ba55e3c812;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git cursors needs to be weak key --- diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py index 68ab0be47b..d13c83cac7 100644 --- a/lib/sqlalchemy/pool.py +++ b/lib/sqlalchemy/pool.py @@ -187,7 +187,7 @@ class _ConnectionFairy(object): """proxies a DBAPI connection object and provides return-on-dereference support""" def __init__(self, pool): self._threadfairy = _ThreadFairy(self) - self._cursors = {} + self._cursors = weakref.WeakKeyDictionary() self.__pool = pool self.__counter = 0 try: