diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2017-04-06 16:31:45 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2017-05-15 19:07:09 -0700 |
commit | 266574a5385388ba66ead33541dcdbe22d1f9f53 (patch) | |
tree | d357f5f0ad628c1329d651cf89946c41d888b739 /dev-python/txaio | |
parent | dev-python/pyjade: Add python-3.5 to PYTHON_COMPAT (diff) | |
download | gentoo-266574a5385388ba66ead33541dcdbe22d1f9f53.tar.gz gentoo-266574a5385388ba66ead33541dcdbe22d1f9f53.tar.bz2 gentoo-266574a5385388ba66ead33541dcdbe22d1f9f53.zip |
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
Diffstat (limited to 'dev-python/txaio')
-rw-r--r-- | dev-python/txaio/Manifest | 1 | ||||
-rw-r--r-- | dev-python/txaio/files/txaio-2.7.1.chained-callback.patch | 48 | ||||
-rw-r--r-- | dev-python/txaio/files/txaio-2.7.1.f._result.patch | 36 | ||||
-rw-r--r-- | dev-python/txaio/metadata.xml | 10 | ||||
-rw-r--r-- | dev-python/txaio/txaio-2.3.1.ebuild | 2 | ||||
-rw-r--r-- | dev-python/txaio/txaio-2.5.1-r1.ebuild | 5 | ||||
-rw-r--r-- | dev-python/txaio/txaio-2.7.1.ebuild | 71 |
7 files changed, 170 insertions, 3 deletions
diff --git a/dev-python/txaio/Manifest b/dev-python/txaio/Manifest index 09ed69ee9ea2..89eba1b96d8f 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 000000000000..f72ccb03918b --- /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?= <alex.gronholm@nextday.fi> +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 000000000000..8c72b45e48de --- /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?= <alex.gronholm@nextday.fi> +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 76992e2db5f8..ef48c740e2ee 100644 --- a/dev-python/txaio/metadata.xml +++ b/dev-python/txaio/metadata.xml @@ -5,8 +5,16 @@ <email>python@gentoo.org</email> <name>Python</name> </maintainer> + <maintainer type="person"> + <email>dolsen@gentoo.org</email> + <description>maintainer</description> + </maintainer> <upstream> + <maintainer> + <email>autobahnws@googlegroups.com</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 6895c0d2ddec..053c2fc4dfb0 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 0bb36268276c..c59dea17c9ac 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.7.1.ebuild b/dev-python/txaio/txaio-2.7.1.ebuild new file mode 100644 index 000000000000..eadf4123fca6 --- /dev/null +++ b/dev-python/txaio/txaio-2.7.1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +inherit distutils-r1 + +DESCRIPTION="Compatibility API between asyncio/Twisted/Trollius" +HOMEPAGE="https://github.com/crossbario/txaio https://pypi.python.org/pypi/txaio" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc test" + +RDEPEND=" + $(python_gen_cond_dep '>=dev-python/trollius-2.0[${PYTHON_USEDEP}]' python2_7) + $(python_gen_cond_dep '>=dev-python/futures-3.0.3[${PYTHON_USEDEP}]' python2_7) +" +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}] + >=dev-python/sphinx_rtd_theme-0.1.9[${PYTHON_USEDEP}] + dev-python/alabaster[${PYTHON_USEDEP}] + ) + test? ( >=dev-python/pytest-2.6.4[${PYTHON_USEDEP}] + >=dev-python/pytest-cov-1.8.1[${PYTHON_USEDEP}] + ~dev-python/mock-1.3.0[${PYTHON_USEDEP}] + >=dev-python/tox-2.1.1[${PYTHON_USEDEP}] + >=dev-python/pep8-1.6.2[${PYTHON_USEDEP}] + >=dev-python/pyenchant-1.6.6[${PYTHON_USEDEP}] + ) +" + +# 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 + # we certainly don't need to test "python setup.py sdist" here + rm "${S}/test/test_packaging.py" || die +} + +python_prepare() { + # https://github.com/tavendo/txaio/issues/3 + cp -r "${FILESDIR}"/util.py test || die + + distutils-r1_python_prepare +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + py.test || die "Tests failed under ${EPYTHON}" +} + +python_install_all() { + use doc && HTML_DOCS=( doc/_build/html/. ) + distutils-r1_python_install_all +} |