]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
and we don't need weakset
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 Aug 2013 20:16:25 +0000 (16:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 18 Aug 2013 20:16:25 +0000 (16:16 -0400)
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py

index c52b86f0a89af5d4538c41ff1d0dfce4977f9550..c68a64866fdff389b6f4a60dfb90e5487dfaeb03 100644 (file)
@@ -6,7 +6,7 @@
 
 from .compat import callable, cmp, reduce,  \
     threading, py3k, py33, py2k, jython, pypy, cpython, win32, \
-    pickle, dottedgetter, parse_qsl, namedtuple, next, WeakSet, reraise, \
+    pickle, dottedgetter, parse_qsl, namedtuple, next, reraise, \
     raise_from_cause, text_type, string_types, int_types, binary_type, \
     quote_plus, with_metaclass, print_, itertools_filterfalse, u, ue, b,\
     unquote_plus, b64decode, b64encode, byte_buffer, itertools_filter,\
index a89762b4e78141207c8f3326ee9c0a98ec26f404..7c2bc88d4d2d5c74e9e3e927847e24fc916cbf60 100644 (file)
@@ -149,29 +149,6 @@ else:
     itertools_imap = itertools.imap
 
 
-
-try:
-    from weakref import WeakSet
-except:
-    import weakref
-
-    class WeakSet(object):
-        """Implement the small subset of set() which SQLAlchemy needs
-        here. """
-        def __init__(self, values=None):
-            self._storage = weakref.WeakKeyDictionary()
-            if values is not None:
-                self._storage.update((value, None) for value in values)
-
-        def __iter__(self):
-            return iter(self._storage)
-
-        def union(self, other):
-            return WeakSet(set(self).union(other))
-
-        def add(self, other):
-            self._storage[other] = True
-
 import time
 if win32 or jython:
     time_func = time.clock