commit: 266574a5385388ba66ead33541dcdbe22d1f9f53
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 6 23:31:45 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue May 16 02:07:09 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=266574a5
dev-python/txaio: Version bump
Update Homepage in 2.3.1, update metadata.xml.
Package-Manager: Portage-2.3.5, Repoman-2.3.2_p30
dev-python/txaio/Manifest | 1 +
.../txaio/files/txaio-2.7.1.chained-callback.patch | 48 ++++++++++++++++++++++
dev-python/txaio/files/txaio-2.7.1.f._result.patch | 36 ++++++++++++++++
dev-python/txaio/metadata.xml | 10 ++++-
dev-python/txaio/txaio-2.3.1.ebuild | 2 +-
dev-python/txaio/txaio-2.5.1-r1.ebuild | 5 ++-
.../{txaio-2.5.1-r1.ebuild => txaio-2.7.1.ebuild} | 9 +++-
7 files changed, 107 insertions(+), 4 deletions(-)
diff --git a/dev-python/txaio/Manifest b/dev-python/txaio/Manifest
index 09ed69ee9ea..89eba1b96d8 100644
--- a/dev-python/txaio/Manifest
+++ b/dev-python/txaio/Manifest
@@ -1,2 +1,3 @@
DIST txaio-2.3.1.tar.gz 36755 SHA256
1111c87bff73e22c2067318cbb267781e2f651c485d21783b25e1e768eabab67 SHA512
019d686102c862ec308e8ffdfbca25cda1b495adef73ee8b817a465a8054a24590ab0f1e3322df92d0a528152fc5b987b98b039dcd87308e81854d3c6a9fb146
WHIRLPOOL
c5f550788f669237d24c5194348a84f5e6e8ca5206bd647ff8e5dee80705809601b798c4eecca260defa69d3276c77adbee6599529b48a325ec7865902c77d89
DIST txaio-2.5.1.tar.gz 41577 SHA256
625076477182e2dde78b79d0b2b0d6b3cecb0e24fe0ea7eaf2abd26a4c0dd1de SHA512
921b4f6738a91923cffe00eed30237e0a2a12dbd42476587b4902675d3d7d8ecbf3b6fbf47afa5648836f779f1c22f7edf9bd94d44dcacee86d03a1dd16450a5
WHIRLPOOL
24286b510c7f1911dd2a315362c76aff77bc2246164a4a1ba50573d87408db9e0e384e5063cfdbee96501b3d03decc9f4198aae9f8cd375d8c49de817d0eda63
+DIST txaio-2.7.1.tar.gz 43591 SHA256
9eea85c27ff8ac28049a29b55383f5c162351f855860e5081ff4632d65a5b4d2 SHA512
d77a8b5e8fc21be0bef43f2a6795229456a351abc1a5eb6d2b7de0da0a58e67a228cb06d1a7962efcc760099ef5df94e9421875ea5628985260911efc7deb85e
WHIRLPOOL
2acff5b81fd17afd7b7d986812d742a6e09781f8f6f960ae6c08a52c6535156736492ecaca0c8026192289ab28e3cceb40e03aa4512922bc64ece7c900abd25c
diff --git a/dev-python/txaio/files/txaio-2.7.1.chained-callback.patch
b/dev-python/txaio/files/txaio-2.7.1.chained-callback.patch
new file mode 100644
index 00000000000..f72ccb03918
--- /dev/null
+++ b/dev-python/txaio/files/txaio-2.7.1.chained-callback.patch
@@ -0,0 +1,48 @@
+From f27f2945c8ca06e2eb0c2b95366a7a4c1363d857 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <[email protected]>
+Date: Mon, 8 May 2017 21:20:01 +0300
+Subject: [PATCH] Removed the test for the chained callback feature
+
+---
+ test/test_callback.py | 25 -------------------------
+ 1 file changed, 25 deletions(-)
+
+diff --git a/test/test_callback.py b/test/test_callback.py
+index 08d31e3..9c8ab99 100644
+--- a/test/test_callback.py
++++ b/test/test_callback.py
+@@ -59,31 +59,6 @@ def test_callback(framework):
+ assert results[0] == "it worked"
+
+
+-def test_chained_callback(framework):
+- """
+- Chain two callbacks where the first one alters the value.
+- """
+- calls = []
+-
+- def callback0(arg):
+- calls.append(arg)
+- return arg + " pray I do not alter it futher"
+-
+- def callback1(arg):
+- calls.append(arg)
+-
+- f = txaio.create_future()
+- txaio.add_callbacks(f, callback0, None)
+- txaio.add_callbacks(f, callback1, None)
+- txaio.resolve(f, "the deal")
+-
+- run_once()
+-
+- assert len(calls) == 2
+- assert calls[0] == "the deal"
+- assert calls[1] == "the deal pray I do not alter it futher"
+-
+-
+ def test_immediate_result(framework):
+ f = txaio.create_future_success("it worked")
+ results = []
+--
+2.13.0
+
diff --git a/dev-python/txaio/files/txaio-2.7.1.f._result.patch
b/dev-python/txaio/files/txaio-2.7.1.f._result.patch
new file mode 100644
index 00000000000..8c72b45e48d
--- /dev/null
+++ b/dev-python/txaio/files/txaio-2.7.1.f._result.patch
@@ -0,0 +1,36 @@
+From 7ecd9cbb4e7202f7c583f9080ac13db94672bc4b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <[email protected]>
+Date: Thu, 4 May 2017 21:47:02 +0300
+Subject: [PATCH] Removed code that sets f._result
+
+This stopped working from Python 3.6 onwards, as the Future implementation is
now written in C.
+---
+ txaio/aio.py | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/txaio/aio.py b/txaio/aio.py
+index 55d3ca5..becfba5 100644
+--- a/txaio/aio.py
++++ b/txaio/aio.py
+@@ -437,17 +437,12 @@ class _AsyncioApi(object):
+ """
+ callback or errback may be None, but at least one must be
+ non-None.
+-
+- XXX beware the "f._result" hack to get "chainable-callback" type
+- behavior.
+ """
+ def done(f):
+ try:
+ res = f.result()
+ if callback:
+- x = callback(res)
+- if x is not None:
+- f._result = x
++ callback(res)
+ except Exception:
+ if errback:
+ errback(create_failure())
+--
+2.13.0
+
diff --git a/dev-python/txaio/metadata.xml b/dev-python/txaio/metadata.xml
index 76992e2db5f..ef48c740e2e 100644
--- a/dev-python/txaio/metadata.xml
+++ b/dev-python/txaio/metadata.xml
@@ -5,8 +5,16 @@
<email>[email protected]</email>
<name>Python</name>
</maintainer>
+ <maintainer type="person">
+ <email>[email protected]</email>
+ <description>maintainer</description>
+ </maintainer>
<upstream>
+ <maintainer>
+ <email>[email protected]</email>
+ <name>Crossbar.io Technologies GmbH</name>
+ </maintainer>
<remote-id type="pypi">txaio</remote-id>
- <remote-id type="github">tavendo/txaio</remote-id>
+ <remote-id type="github">crossbario/txaio</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-python/txaio/txaio-2.3.1.ebuild
b/dev-python/txaio/txaio-2.3.1.ebuild
index 6895c0d2dde..053c2fc4dfb 100644
--- a/dev-python/txaio/txaio-2.3.1.ebuild
+++ b/dev-python/txaio/txaio-2.3.1.ebuild
@@ -9,7 +9,7 @@ RESTRICT="test"
inherit distutils-r1
DESCRIPTION="a helper library for writing code unmodified on both Twisted and
asyncio"
-HOMEPAGE="https://github.com/tavendo/txaio"
+HOMEPAGE="https://github.com/crossbario/txaio"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
diff --git a/dev-python/txaio/txaio-2.5.1-r1.ebuild
b/dev-python/txaio/txaio-2.5.1-r1.ebuild
index 0bb36268276..c59dea17c9a 100644
--- a/dev-python/txaio/txaio-2.5.1-r1.ebuild
+++ b/dev-python/txaio/txaio-2.5.1-r1.ebuild
@@ -2,7 +2,10 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+# test failure with py3.6 upstream bug:
+# https://github.com/crossbario/txaio/issues/83
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
inherit distutils-r1
diff --git a/dev-python/txaio/txaio-2.5.1-r1.ebuild
b/dev-python/txaio/txaio-2.7.1.ebuild
similarity index 87%
copy from dev-python/txaio/txaio-2.5.1-r1.ebuild
copy to dev-python/txaio/txaio-2.7.1.ebuild
index 0bb36268276..eadf4123fca 100644
--- a/dev-python/txaio/txaio-2.5.1-r1.ebuild
+++ b/dev-python/txaio/txaio-2.7.1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
inherit distutils-r1
@@ -21,6 +21,7 @@ RDEPEND="
"
DEPEND="app-arch/unzip
dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
doc? (
>=dev-python/sphinx-1.2.3[${PYTHON_USEDEP}]
>=dev-python/sphinxcontrib-spelling-2.1.2[${PYTHON_USEDEP}]
@@ -36,6 +37,12 @@ DEPEND="app-arch/unzip
)
"
+# py 3.6 upstream bug fixes applied just after the release
+PATCHES=(
+ "${FILESDIR}/txaio-2.7.1.f._result.patch"
+ "${FILESDIR}/txaio-2.7.1.chained-callback.patch"
+)
+
src_prepare() {
default_src_prepare
# Take out failing tests known to pass when run manually