dev-python/eventlet: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-09-23 12:59:18 +02:00
parent 8b065ae97b
commit 57a3ce0e7a
3 changed files with 0 additions and 187 deletions

View File

@@ -1,2 +1 @@
DIST eventlet-0.25.1.tar.gz 392719 BLAKE2B 7dbc23e63e9dc8b8bb0b4a53fc07cb467661bd695b6c778b973bd690bd24f3dd0f867d7ed803e1a89ffd36e5597fd244ef2c616c663d3d9130033f5f5928e816 SHA512 936aac45e24b2797cc8b6cd6238d493ce5eb60a47096e13827b8be145bd8dd14503f5ae624485c87b163718a85733b2317688366ef5fdf347f7d367fbf4d521d
DIST eventlet-0.26.1.tar.gz 398200 BLAKE2B f14024d0825fb5530929766c63dceea7446057d9ad5dfb98ab013e96cab9b0eef5440f2d4d7ceeef17691c8a2a9055cac2b93fb23653a6facba4967c4e7cb0b3 SHA512 55b9b214130d0482ea005ea570a5aa3eafdf66e6d315a95c5ba60186a2d9a9df5c2638c86d886968954ce39e5ac2153e1f9e11631e6aef237078c3776af7d6c5

View File

@@ -1,68 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit distutils-r1
DESCRIPTION="Highly concurrent networking library"
HOMEPAGE="https://pypi.org/project/eventlet/ https://github.com/eventlet/eventlet/"
SRC_URI="mirror://pypi/e/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm arm64 ppc ppc64 ~s390 sparc x86"
IUSE="doc examples test"
RDEPEND="
>=dev-python/dnspython-1.15.0[${PYTHON_USEDEP}]
>=dev-python/greenlet-0.3[${PYTHON_USEDEP}]
>=dev-python/monotonic-1.4[${PYTHON_USEDEP}]
>=dev-python/six-1.10.0[${PYTHON_USEDEP}]"
DEPEND="doc? ( >=dev-python/python-docs-2.7.6-r1:2.7 )
test? ( ${RDEPEND}
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}] )"
PATCHES=(
"${FILESDIR}/eventlet-0.25.1-sparc.patch"
"${FILESDIR}/eventlet-0.25.1-tests.patch"
)
distutils_enable_sphinx doc
distutils_enable_tests nose
python_prepare_all() {
# provided by virtual/python-enum34
sed -i '/enum-compat/d' setup.py || die
if use doc; then
local PYTHON_DOC_ATOM=$(best_version -b dev-python/python-docs:2.7)
local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
sed -i "s|'https://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" doc/conf.py || die
fi
if use test; then
# sed -i '/This is a Python 3 module/d' eventlet/green/http/__init__.py || die
# sed -i 's/^import/from OpenSSL import/g' eventlet/green/OpenSSL/__init__.py || die
# sed -i 's/^from version/from OpenSSL.version/' eventlet/green/OpenSSL/__init__.py || die
sed -i 's/TEST_TIMEOUT = 1/TEST_TIMEOUT = 10/' tests/__init__.py || die
fi
# Prevent file collisions from teestsuite
sed -e "s:'tests', :'tests', 'tests.*', :" -i setup.py || die
distutils-r1_python_prepare_all
}
python_install_all() {
if use examples; then
docompress -x "/usr/share/doc/${PF}/examples"
docinto examples
dodoc -r examples/.
fi
distutils-r1_python_install_all
}

View File

@@ -1,118 +0,0 @@
From b288e969b6a0ed24913114b7b7eaad5010db5ce1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 29 May 2020 09:04:37 +0200
Subject: [PATCH 1/4] tests: F_SETFL does not return flags, use F_GETFL again
Fix TestGreenSocket.test_skip_nonblocking() to call F_GETFL again
to get the flags for the socket. Previously, the code wrongly assumed
F_SETFL will return flags while it always returns 0 (see fcntl(2)).
---
tests/greenio_test.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/greenio_test.py b/tests/greenio_test.py
index 39d77737b..593444d07 100644
--- a/tests/greenio_test.py
+++ b/tests/greenio_test.py
@@ -634,7 +634,8 @@ def test_skip_nonblocking(self):
sock1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
fd = sock1.fd.fileno()
flags = fcntl.fcntl(fd, fcntl.F_GETFL)
- flags = fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)
+ fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)
+ flags = fcntl.fcntl(fd, fcntl.F_GETFL)
assert flags & os.O_NONBLOCK == 0
sock2 = socket.socket(sock1.fd, set_nonblocking=False)
From 803422302f5e813f1f00435d7ae943bf8513946c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 29 May 2020 09:07:17 +0200
Subject: [PATCH 2/4] tests: Unset O_NONBLOCK|O_NDELAY to fix SPARC
Fix TestGreenSocket.test_skip_nonblocking() to unset both O_NONBLOCK
and O_NDELAY. This is necessary to fix tests on SPARC where both flags
are used simultaneously, and unsetting one is ineffective (flags remain
the same). This should not affect other platforms where O_NDELAY
is an alias for O_NONBLOCK.
---
tests/greenio_test.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/greenio_test.py b/tests/greenio_test.py
index 593444d07..736c2e539 100644
--- a/tests/greenio_test.py
+++ b/tests/greenio_test.py
@@ -634,7 +634,9 @@ def test_skip_nonblocking(self):
sock1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
fd = sock1.fd.fileno()
flags = fcntl.fcntl(fd, fcntl.F_GETFL)
- fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)
+ # on SPARC, nonblocking mode sets O_NDELAY as well
+ fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~(os.O_NONBLOCK
+ | os.O_NDELAY))
flags = fcntl.fcntl(fd, fcntl.F_GETFL)
assert flags & os.O_NONBLOCK == 0
From b742b443d079ec9001a1452e138773b066ed784e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 29 May 2020 09:09:07 +0200
Subject: [PATCH 3/4] tests: Assume that nonblocking mode might set O_NDELAY to
fix SPARC
Fix test_set_nonblocking() to account for the alternative possible
outcome that enabling non-blocking mode can set both O_NONBLOCK
and O_NDELAY as it does on SPARC. Note that O_NDELAY may be a superset
of O_NONBLOCK, so we can't just filter it out of new_flags.
---
tests/greenio_test.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/greenio_test.py b/tests/greenio_test.py
index 736c2e539..a2d1ad856 100644
--- a/tests/greenio_test.py
+++ b/tests/greenio_test.py
@@ -925,7 +925,10 @@ def test_set_nonblocking():
assert orig_flags & os.O_NONBLOCK == 0
greenio.set_nonblocking(sock)
new_flags = fcntl.fcntl(fileno, fcntl.F_GETFL)
- assert new_flags == (orig_flags | os.O_NONBLOCK)
+ # on SPARC, O_NDELAY is set as well, and it might be a superset
+ # of O_NONBLOCK
+ assert (new_flags == (orig_flags | os.O_NONBLOCK)
+ or new_flags == (orig_flags | os.O_NONBLOCK | os.O_NDELAY))
def test_socket_del_fails_gracefully_when_not_fully_initialized():
From d324431b14ea57c6d7b295bd8b00f128ed4c2f5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 29 May 2020 09:17:21 +0200
Subject: [PATCH 4/4] tests: Increase timeout for
test_isolate_from_socket_default_timeout
Increase the timeout used for test_isolate_from_socket_default_timeout
from 1 second to 5 seconds. Otherwise, the test can't succeed
on hardware where Python runs slower. In particular, on our SPARC box
importing greenlet modules takes almost 2 seconds, so the test program
does not even start properly.
Fixes #614
---
tests/tpool_test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tpool_test.py b/tests/tpool_test.py
index 4826f30de..1a730dc10 100644
--- a/tests/tpool_test.py
+++ b/tests/tpool_test.py
@@ -366,7 +366,7 @@ def test_leakage_from_tracebacks(self):
def test_isolate_from_socket_default_timeout():
- tests.run_isolated('tpool_isolate_socket_default_timeout.py', timeout=1)
+ tests.run_isolated('tpool_isolate_socket_default_timeout.py', timeout=5)
def test_exception_leak():