dev-python/txaio: Remove redundant versions

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-03-28 09:21:28 +01:00
parent f94f5324ce
commit d3d5da671c
5 changed files with 0 additions and 190 deletions

View File

@@ -1,2 +1 @@
DIST txaio-2.7.1.tar.gz 43591 BLAKE2B 4efdcfb8ce3e8860af1efe56ae4c23efc9887a8f3a53c322444a95651f4dbb502443bdcc1d0da0ba5db8f9a832ad90b3c6dea06ca688d7120857854d3eb7c17e SHA512 d77a8b5e8fc21be0bef43f2a6795229456a351abc1a5eb6d2b7de0da0a58e67a228cb06d1a7962efcc760099ef5df94e9421875ea5628985260911efc7deb85e
DIST txaio-2.9.0.tar.gz 44195 BLAKE2B 6c62fc6f17ee860aead90cf5f5d02c7c0d9709adf7bcecbb6a7c1723abf0d8672dbc0b869dfe4683bc26c9608e94c41364add18c22e8e98678de8e10018d991c SHA512 ee07d776fa5894b716fdced36aaa6436336a1f1db97dedb0fd0575d61a7b48b12dfc90ed6078602d7a2c2a00bfa7f815ca76cd75e472a27ff7bfdb56291efa46

View File

@@ -1,48 +0,0 @@
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

View File

@@ -1,36 +0,0 @@
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

View File

@@ -1,40 +0,0 @@
try:
import asyncio
from asyncio.test_utils import run_once as _run_once
def run_once():
return _run_once(asyncio.get_event_loop())
except ImportError as e:
try:
import trollius as asyncio
except ImportError:
asyncio = None
def run_once():
'''
copied from asyncio.testutils because trollius has no
"testutils"
'''
# in Twisted, this method is a no-op
if asyncio is None:
return
# just like modern asyncio.testutils.run_once does it...
loop = asyncio.get_event_loop()
loop.stop()
loop.run_forever()
asyncio.gather(*asyncio.Task.all_tasks())
try:
# XXX fixme hack better way to detect twisted
# (has to work on py3 where asyncio exists always, though)
import twisted # noqa
def await(_):
return
except ImportError:
def await(future):
asyncio.get_event_loop().run_until_complete(future)

View File

@@ -1,65 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_6 )
inherit distutils-r1
DESCRIPTION="Compatibility API between asyncio/Twisted/Trollius"
HOMEPAGE="https://github.com/crossbario/txaio https://pypi.org/project/txaio/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm x86"
IUSE="doc test"
RESTRICT="!test? ( test )"
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/mock-1.3.0[${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=( docs/_build/html/. )
distutils-r1_python_install_all
}