summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/sqlalchemy')
-rw-r--r--dev-python/sqlalchemy/ChangeLog8
-rw-r--r--dev-python/sqlalchemy/files/lru_cache_timestamping.patch33
-rw-r--r--dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild6
3 files changed, 43 insertions, 4 deletions
diff --git a/dev-python/sqlalchemy/ChangeLog b/dev-python/sqlalchemy/ChangeLog
index acbbb3b6f455..eaf8afff1c0d 100644
--- a/dev-python/sqlalchemy/ChangeLog
+++ b/dev-python/sqlalchemy/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/sqlalchemy
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/ChangeLog,v 1.69 2011/12/24 09:48:00 patrick Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/ChangeLog,v 1.70 2012/01/19 19:17:04 klausman Exp $
+
+ 19 Jan 2012; Tobias Klausmann <klausman@gentoo.org>
+ +files/lru_cache_timestamping.patch, sqlalchemy-0.7.4.ebuild:
+ Add patch to make test suite pass on arches with low-precision time.time()
*sqlalchemy-0.7.4 (24 Dec 2011)
diff --git a/dev-python/sqlalchemy/files/lru_cache_timestamping.patch b/dev-python/sqlalchemy/files/lru_cache_timestamping.patch
new file mode 100644
index 000000000000..41cd3915669f
--- /dev/null
+++ b/dev-python/sqlalchemy/files/lru_cache_timestamping.patch
@@ -0,0 +1,33 @@
+diff -r d1c7b3df098a lib/sqlalchemy/util/_collections.py
+
+Index: lib/sqlalchemy/util/_collections.py
+===================================================================
+--- a/lib/sqlalchemy/util/_collections.py Wed Jan 18 12:42:54 2012 -0500
++++ b/lib/sqlalchemy/util/_collections.py Thu Jan 19 10:01:28 2012 -0500
+@@ -769,10 +769,15 @@
+ def __init__(self, capacity=100, threshold=.5):
+ self.capacity = capacity
+ self.threshold = threshold
++ self._counter = 0
++
++ def _inc_counter(self):
++ self._counter += 1
++ return self._counter
+
+ def __getitem__(self, key):
+ item = dict.__getitem__(self, key)
+- item[2] = time_func()
++ item[2] = self._inc_counter()
+ return item[1]
+
+ def values(self):
+@@ -788,7 +793,7 @@
+ def __setitem__(self, key, value):
+ item = dict.get(self, key)
+ if item is None:
+- item = [key, value, time_func()]
++ item = [key, value, self._inc_counter()]
+ dict.__setitem__(self, key, item)
+ else:
+ item[1] = value
+
diff --git a/dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild b/dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild
index 334ce90fd88b..cbe59ab12500 100644
--- a/dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild
+++ b/dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild
@@ -1,11 +1,12 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild,v 1.1 2011/12/24 09:48:00 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.7.4.ebuild,v 1.2 2012/01/19 19:17:04 klausman Exp $
EAPI="3"
SUPPORT_PYTHON_ABIS="1"
inherit distutils
+inherit eutils
MY_PN="SQLAlchemy"
MY_P="${MY_PN}-${PV/_}"
@@ -44,6 +45,7 @@ PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
PYTHON_MODNAME="sqlalchemy"
src_prepare() {
+ epatch "${FILESDIR}/lru_cache_timestamping.patch"
distutils_src_prepare
# Disable tests hardcoding function call counts specific to Python versions.