summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/socketpool/ChangeLog6
-rw-r--r--dev-python/socketpool/files/socketpool-0.5.2-pool.patch35
-rw-r--r--dev-python/socketpool/socketpool-0.5.2-r1.ebuild8
3 files changed, 43 insertions, 6 deletions
diff --git a/dev-python/socketpool/ChangeLog b/dev-python/socketpool/ChangeLog
index 8810f05234fa..0683fd2aa40d 100644
--- a/dev-python/socketpool/ChangeLog
+++ b/dev-python/socketpool/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/socketpool
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/socketpool/ChangeLog,v 1.4 2013/02/04 16:43:04 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/socketpool/ChangeLog,v 1.5 2013/02/10 15:07:44 idella4 Exp $
+
+ 10 Feb 2013; Ian Delaney <idella4@gentoo.org>
+ +files/socketpool-0.5.2-pool.patch, socketpool-0.5.2-r1.ebuild:
+ Added -pool.patch, fixes broken test, fixes Bug #451610
04 Feb 2013; Ian Delaney <idella4@gentoo.org>
+files/socketpool-0.5.2-locale.patch, socketpool-0.5.2-r1.ebuild:
diff --git a/dev-python/socketpool/files/socketpool-0.5.2-pool.patch b/dev-python/socketpool/files/socketpool-0.5.2-pool.patch
new file mode 100644
index 000000000000..b6ce4965d041
--- /dev/null
+++ b/dev-python/socketpool/files/socketpool-0.5.2-pool.patch
@@ -0,0 +1,35 @@
+patch made from https://github.com/benoitc/socketpool/blob/06d659612f15cb4c207a2fc508b6099e09d3fde7/socketpool/pool.py
+in reply to; size is supposed to be a property. fix #20
+commit 06d659612f15cb4c207a2fc508b6099e09d3fde7.
+file included changes making the first hunk
+diff -ur socketpool-0.5.2.orig/socketpool/pool.py socketpool-0.5.2/socketpool/pool.py
+--- socketpool/pool.py 2012-08-05 12:22:13.000000000 +0800
++++ socketpool/pool.py 2013-02-10 22:51:45.607637365 +0800
+@@ -48,8 +48,12 @@
+ max_size=10, options=None,
+ reap_connections=True, backend="thread"):
+
+- self.backend_mod = load_backend(backend)
+- self.backend = backend
++ if isinstance(backend, str):
++ self.backend_mod = load_backend(backend)
++ self.backend = backend
++ else:
++ self.backend_mod = backend
++ self.backend = str(getattr(backend, '__name__', backend))
+ self.max_size = max_size
+ self.pool = getattr(self.backend_mod, 'PriorityQueue')()
+ self._free_conns = 0
+@@ -97,6 +101,7 @@
+ if conn.is_connected():
+ conn.invalidate()
+
++ @property
+ def size(self):
+ return self.pool.qsize()
+
+@@ -193,3 +198,4 @@
+ finally:
+ self.release_connection(conn)
+
++
diff --git a/dev-python/socketpool/socketpool-0.5.2-r1.ebuild b/dev-python/socketpool/socketpool-0.5.2-r1.ebuild
index 5d3895c551c5..c56c8594a106 100644
--- a/dev-python/socketpool/socketpool-0.5.2-r1.ebuild
+++ b/dev-python/socketpool/socketpool-0.5.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/socketpool/socketpool-0.5.2-r1.ebuild,v 1.2 2013/02/04 16:43:04 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/socketpool/socketpool-0.5.2-r1.ebuild,v 1.3 2013/02/10 15:07:44 idella4 Exp $
EAPI=5
PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2} pypy{1_9,2_0} )
@@ -20,10 +20,8 @@ RDEPEND="dev-python/gevent"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
-src_prepare() {
- distutils-r1_src_prepare
- epatch "${FILESDIR}"/${P}-locale.patch
-}
+PATCHES=( "${FILESDIR}"/${P}-locale.patch
+ "${FILESDIR}"/${P}-pool.patch )
src_install() {
distutils-r1_src_install