From f516638b7fe9592837389826a6152a7e1b251c54 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 30 May 2020 11:44:06 +0100 Subject: gentoo resync : 30.05.2020 --- dev-python/eventlet/Manifest | 3 +- dev-python/eventlet/eventlet-0.25.1-r1.ebuild | 5 +- .../eventlet/files/eventlet-0.25.1-sparc.patch | 118 +++++++++++++++++++++ 3 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 dev-python/eventlet/files/eventlet-0.25.1-sparc.patch (limited to 'dev-python/eventlet') diff --git a/dev-python/eventlet/Manifest b/dev-python/eventlet/Manifest index 481dbedb0491..a2b249ef8d50 100644 --- a/dev-python/eventlet/Manifest +++ b/dev-python/eventlet/Manifest @@ -1,4 +1,5 @@ +AUX eventlet-0.25.1-sparc.patch 4901 BLAKE2B 5c2db6c09e3123c6ec655480e5f440f094071cd2bc1de3260c8443abd736d2cc52115707f0fdcffff3019ca6788287dd8249cdad5f5dad2e449ceb4067e1dfd5 SHA512 cb3f7cd7e8f0cc1c7e040bf8eb04309e98107427ba0b2a8643a18ce13f57803eaee32045e55d2e56cad45fa1dbfb33c99bb4935f153949d08f9240384d9868a2 AUX eventlet-0.25.1-tests.patch 1428 BLAKE2B be4b0e0104473e8434075175a85cb658e7257eea6bb554f92160d308649aa7faee6f4db7d2aa8a3df54e22bf6689d649dec6b74d523425a27bc1a77233b5976e SHA512 a7a413cce99def526ed63b79d1f73d270db9332ac88ff83a830fdc4106ffa20f2e14dfbf8d0dbdd071d39c4d2f161250bd8e7c0681f187fa0736d8184cccd872 DIST eventlet-0.25.1.tar.gz 392719 BLAKE2B 7dbc23e63e9dc8b8bb0b4a53fc07cb467661bd695b6c778b973bd690bd24f3dd0f867d7ed803e1a89ffd36e5597fd244ef2c616c663d3d9130033f5f5928e816 SHA512 936aac45e24b2797cc8b6cd6238d493ce5eb60a47096e13827b8be145bd8dd14503f5ae624485c87b163718a85733b2317688366ef5fdf347f7d367fbf4d521d -EBUILD eventlet-0.25.1-r1.ebuild 2190 BLAKE2B 0d24250f01b18ead73947ffad1e68796a6f24f34f75d42dd650bc3b561129a64df3862b124d80bc238288a765e50f1eece9fe1f9216640960c1a6acc81ef7f81 SHA512 3ea3dc1ab38c81098c0452b64cea74149ba6ac715b86078191675ad9933681e43aef75d16054d0bb0625f50d7c11e7553de7bf6868bb375212e585d1a71d5807 +EBUILD eventlet-0.25.1-r1.ebuild 2249 BLAKE2B b3add2a56268d66b7f70e21c5536cbf166df0ddd636749e46fb7a3eceddcff6ecd3caffdb28da299af57ef5b9deeb8d99a99060128fafef898765de3b3d5ce36 SHA512 3dfe468db0d3040ca1825da95b6878c527ed01d557fc18b4ba860e131b2be41ef5de8cb586750423a29d74c6efe147e06a189a578607192a05b64b1a285f944c MISC metadata.xml 380 BLAKE2B abdf12718464c834d63994ad012a6d47279fa6f0e5cb0d075bfbbf24167438220ec9681eac874c93dc3abd9c1498a1a7f658a622f8ebe764cb6803b1b2bb4561 SHA512 8100edfde1885122848aa543b99bbc8529b9dc2aeea3b7efb74a3d1e8e01bdd2110e4cdce2c4ddeab9fd0182f193118e876843a61a25e17355d0916d50331daa diff --git a/dev-python/eventlet/eventlet-0.25.1-r1.ebuild b/dev-python/eventlet/eventlet-0.25.1-r1.ebuild index e58857372843..bf65bac25846 100644 --- a/dev-python/eventlet/eventlet-0.25.1-r1.ebuild +++ b/dev-python/eventlet/eventlet-0.25.1-r1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_COMPAT=( python3_{6,7,8,9} ) inherit distutils-r1 @@ -12,7 +12,7 @@ SRC_URI="mirror://pypi/e/${PN}/${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 ~arm64 x86" +KEYWORDS="amd64 ~arm64 ~ppc64 ~sparc x86" IUSE="doc examples test" RDEPEND=" @@ -26,6 +26,7 @@ DEPEND="doc? ( >=dev-python/python-docs-2.7.6-r1:2.7 ) dev-python/nose[${PYTHON_USEDEP}] )" PATCHES=( + "${FILESDIR}/eventlet-0.25.1-sparc.patch" "${FILESDIR}/eventlet-0.25.1-tests.patch" ) diff --git a/dev-python/eventlet/files/eventlet-0.25.1-sparc.patch b/dev-python/eventlet/files/eventlet-0.25.1-sparc.patch new file mode 100644 index 000000000000..c7f6a75b4f3c --- /dev/null +++ b/dev-python/eventlet/files/eventlet-0.25.1-sparc.patch @@ -0,0 +1,118 @@ +From b288e969b6a0ed24913114b7b7eaad5010db5ce1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +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?= +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?= +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?= +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(): -- cgit v1.2.3