diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-01-21 20:10:23 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-01-21 20:10:23 -0500 |
commit | 07fb90c6cc14de6d02cf4be592c57d56831f59f7 (patch) | |
tree | 050ef65db988559c60f7aa40f2d0bfe24947e548 /lib/sqlalchemy/util/compat.py | |
parent | 560fd1d5ed643a1b0f95296f3b840c1963bbe67f (diff) | |
parent | ee1f4d21037690ad996c5eacf7e1200e92f2fbaa (diff) | |
download | sqlalchemy-ticket_2501.tar.gz |
Merge branch 'master' into ticket_2501ticket_2501
Conflicts:
lib/sqlalchemy/orm/mapper.py
Diffstat (limited to 'lib/sqlalchemy/util/compat.py')
-rw-r--r-- | lib/sqlalchemy/util/compat.py | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py index a89762b4e..f1346406e 100644 --- a/lib/sqlalchemy/util/compat.py +++ b/lib/sqlalchemy/util/compat.py @@ -1,5 +1,5 @@ # util/compat.py -# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> +# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php @@ -40,7 +40,7 @@ if py3k: import builtins from inspect import getfullargspec as inspect_getfullargspec - from urllib.parse import quote_plus, unquote_plus, parse_qsl + from urllib.parse import quote_plus, unquote_plus, parse_qsl, quote, unquote import configparser from io import StringIO @@ -95,7 +95,7 @@ if py3k: else: from inspect import getargspec as inspect_getfullargspec inspect_getargspec = inspect_getfullargspec - from urllib import quote_plus, unquote_plus + from urllib import quote_plus, unquote_plus, quote, unquote from urlparse import parse_qsl import ConfigParser as configparser from StringIO import StringIO @@ -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 |