From 633a86bfd4b68bb52e429f53ec34b3a47e787315 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 18 Aug 2013 16:16:25 -0400 Subject: and we don't need weakset --- lib/sqlalchemy/util/compat.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'lib/sqlalchemy/util/compat.py') diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py index a89762b4e..7c2bc88d4 100644 --- a/lib/sqlalchemy/util/compat.py +++ b/lib/sqlalchemy/util/compat.py @@ -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 -- cgit v1.2.1 From 6029496bd3fb78caeab349ef8df5b58f058db16e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 25 Nov 2013 14:46:58 -0500 Subject: - adjustment, the spec says: "Within the user and password field, any ":", "@", or "/" must be encoded." - so re-apply encoding to both password and username, don't encode spaces as plus signs, don't encode any chars outside of :, @, / on stringification - but we still parse for any %XX character (is that right?) --- lib/sqlalchemy/util/compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/util/compat.py') diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py index 7c2bc88d4..ff434df43 100644 --- a/lib/sqlalchemy/util/compat.py +++ b/lib/sqlalchemy/util/compat.py @@ -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 -- cgit v1.2.1 From f89d4d216bd7605c920b7b8a10ecde6bfea2238c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 5 Jan 2014 16:57:05 -0500 Subject: - happy new year --- lib/sqlalchemy/util/compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/util/compat.py') diff --git a/lib/sqlalchemy/util/compat.py b/lib/sqlalchemy/util/compat.py index ff434df43..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 +# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php -- cgit v1.2.1