]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
cursors needs to be weak key
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Dec 2006 21:40:10 +0000 (21:40 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Dec 2006 21:40:10 +0000 (21:40 +0000)
lib/sqlalchemy/pool.py

index 68ab0be47b298de13f8c85cee7186df62f8293e5..d13c83cac7c8686e3bdfc46ed1cc2e7d87eff82c 100644 (file)
@@ -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: