[gentoo-commits] repo/gentoo:master commit in: dev-python/eventlet/files/, dev-python/eventlet/
commit: cecbd8454f54589199074601e96945f3c2335f6e Author: Michał Górny gentoo org> AuthorDate: Sun Apr 11 10:35:18 2021 + Commit: Michał Górny gentoo org> CommitDate: Sun Apr 11 10:47:03 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cecbd845 dev-python/eventlet: Increase test timeouts Closes: https://bugs.gentoo.org/781905 Signed-off-by: Michał Górny gentoo.org> dev-python/eventlet/eventlet-0.30.2-r1.ebuild | 10 +++--- .../files/eventlet-0.30.2-test-timeout.patch | 39 ++ 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/dev-python/eventlet/eventlet-0.30.2-r1.ebuild b/dev-python/eventlet/eventlet-0.30.2-r1.ebuild index 89b99f95ed1..f8d57c28dd0 100644 --- a/dev-python/eventlet/eventlet-0.30.2-r1.ebuild +++ b/dev-python/eventlet/eventlet-0.30.2-r1.ebuild @@ -29,8 +29,9 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}/${PN}-0.25.1-tests.patch" - "${FILESDIR}/${PN}-0.30.0-tests-socket.patch" + "${FILESDIR}/eventlet-0.25.1-tests.patch" + "${FILESDIR}/eventlet-0.30.0-tests-socket.patch" + "${FILESDIR}/eventlet-0.30.2-test-timeout.patch" ) distutils_enable_sphinx doc @@ -45,16 +46,13 @@ python_prepare_all() { sed -i "s|'https://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" doc/conf.py || die fi - # Prevent file collisions from teestsuite - sed -e "s:'tests', :'tests', 'tests.*', :" -i setup.py || die - distutils-r1_python_prepare_all } python_test() { unset PYTHONPATH export TMPDIR="${T}" - nosetests -v || die + nosetests -v -x || die } python_install_all() { diff --git a/dev-python/eventlet/files/eventlet-0.30.2-test-timeout.patch b/dev-python/eventlet/files/eventlet-0.30.2-test-timeout.patch new file mode 100644 index 000..d31b3738bc1 --- /dev/null +++ b/dev-python/eventlet/files/eventlet-0.30.2-test-timeout.patch @@ -0,0 +1,39 @@ +From 0b8fd069386354d2d7e5464ce0b0d5b7d1795376 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 11 Apr 2021 12:20:09 +0200 +Subject: [PATCH] Force test timeouts to 60 s + +The upstream test timeouts are far too low for a busy system, and there +is no point in pursuing such low values anyway. Force 60 s that should +be reasonably safe for our test runs. +--- + tests/__init__.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/__init__.py b/tests/__init__.py +index 82cd247..3a943c4 100644 +--- a/tests/__init__.py b/tests/__init__.py +@@ -170,8 +170,8 @@ class LimitedTestCase(unittest.TestCase): + + def setUp(self): + self.previous_alarm = None +-self.timer = eventlet.Timeout(self.TEST_TIMEOUT, +- TestIsTakingTooLong(self.TEST_TIMEOUT)) ++self.timer = eventlet.Timeout(60, ++ TestIsTakingTooLong(60)) + + def reset_timeout(self, new_timeout): + """Changes the timeout duration; only has effect during one test. +@@ -350,7 +350,7 @@ def run_python(path, env=None, args=None, timeout=None, pythonpath_extend=None, + stdout=subprocess.PIPE, + ) + if timeout is None: +-timeout = 10 ++timeout = 60 + try: + output, _ = p.communicate(timeout=timeout) + except subprocess.TimeoutExpired: +-- +2.31.1 +
[gentoo-commits] repo/gentoo:master commit in: dev-python/eventlet/files/, dev-python/eventlet/
commit: d43b59b286707365170dded20261e7e0a9f9942e Author: Sam James gentoo org> AuthorDate: Sun Dec 6 18:24:34 2020 + Commit: Sam James gentoo org> CommitDate: Sun Dec 6 18:24:42 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d43b59b2 dev-python/eventlet: bump to 0.29.1 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Sam James gentoo.org> dev-python/eventlet/Manifest | 1 + dev-python/eventlet/eventlet-0.29.1.ebuild | 64 +++ .../eventlet/files/eventlet-0.29.1-tests.patch | 71 ++ 3 files changed, 136 insertions(+) diff --git a/dev-python/eventlet/Manifest b/dev-python/eventlet/Manifest index 2f77ed84d94..9ba86992d66 100644 --- a/dev-python/eventlet/Manifest +++ b/dev-python/eventlet/Manifest @@ -1 +1,2 @@ DIST eventlet-0.26.1.tar.gz 398200 BLAKE2B f14024d0825fb5530929766c63dceea7446057d9ad5dfb98ab013e96cab9b0eef5440f2d4d7ceeef17691c8a2a9055cac2b93fb23653a6facba4967c4e7cb0b3 SHA512 55b9b214130d0482ea005ea570a5aa3eafdf66e6d315a95c5ba60186a2d9a9df5c2638c86d886968954ce39e5ac2153e1f9e11631e6aef237078c3776af7d6c5 +DIST eventlet-0.29.1.tar.gz 400673 BLAKE2B 2b317e0c445a7b9c7f96147c033b1a6b4b4d27eeaebe0d40102b4e25d7825861db15e9d77cf6c9e6795e1bc946b1a613d5bb4ffa60a7077c39d575f01bdd8506 SHA512 194544e8fafeb0847673abd84c8fbc876bb407bb76cb86c5a8a92fdb7571d3585e895f0063375e43b74de81b47e49cd6002f5b7a4f266d37bacc1b23e9ce4ef3 diff --git a/dev-python/eventlet/eventlet-0.29.1.ebuild b/dev-python/eventlet/eventlet-0.29.1.ebuild new file mode 100644 index 000..c1a6a203dce --- /dev/null +++ b/dev-python/eventlet/eventlet-0.29.1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_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-tests.patch" + "${FILESDIR}/${P}-tests.patch" +) + +distutils_enable_sphinx doc +distutils_enable_tests nose + +python_prepare_all() { + 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 + + # Prevent file collisions from teestsuite + sed -e "s:'tests', :'tests', 'tests.*', :" -i setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + unset PYTHONPATH + nosetests -v || die +} + +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 +} diff --git a/dev-python/eventlet/files/eventlet-0.29.1-tests.patch b/dev-python/eventlet/files/eventlet-0.29.1-tests.patch new file mode 100644 index 000..3cd20823899 --- /dev/null +++ b/dev-python/eventlet/files/eventlet-0.29.1-tests.patch @@ -0,0 +1,71 @@ +https://github.com/eventlet/eventlet/issues/646 +From 087ba743c7af8a40ac1e4e2ec89409eee3b4233e Mon Sep 17 00:00:00 2001 +From: Tim Burke +Date: Mon, 2 Nov 2020 16:09:46 -0800 +Subject: [PATCH] py39: Add _at_fork_reinit method to Semaphores + +CPython expects to be able to call such a method on RLocks, Conditions, +and Events in threading; since we may monkey-patch threading to use +Semaphores as locks, they need the method, too. + +Addresses #646 +--- + eventlet/semaphore.py | 5 + + tests/semaphore_test.py | 21 + + 2 files changed, 26 insertions(+) + +diff --git a/eventlet/semaphore.py b/eventlet/semaphore.py +index 18b5b05f4..5e2b5e32f 100644 +--- a/eventlet/semaphore.py b/eventlet/semaphore.py +@@ -39,6 +39,7 @@ def __init__(self, value=1): + if value < 0: + msg = 'Semaphore() expect value >= 0, actual: {0}'.format(repr(value)) + raise ValueError(msg) ++self._original_value =
[gentoo-commits] repo/gentoo:master commit in: dev-python/eventlet/files/, dev-python/eventlet/
commit: 57a3ce0e7a157968eea135f44eea948867f67551 Author: Michał Górny gentoo org> AuthorDate: Wed Sep 23 10:59:18 2020 + Commit: Michał Górny gentoo org> CommitDate: Wed Sep 23 11:07:47 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57a3ce0e dev-python/eventlet: Remove old Signed-off-by: Michał Górny gentoo.org> dev-python/eventlet/Manifest | 1 - dev-python/eventlet/eventlet-0.25.1-r1.ebuild | 68 .../eventlet/files/eventlet-0.25.1-sparc.patch | 118 - 3 files changed, 187 deletions(-) diff --git a/dev-python/eventlet/Manifest b/dev-python/eventlet/Manifest index 6e8f112415e..2f77ed84d94 100644 --- a/dev-python/eventlet/Manifest +++ b/dev-python/eventlet/Manifest @@ -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 diff --git a/dev-python/eventlet/eventlet-0.25.1-r1.ebuild b/dev-python/eventlet/eventlet-0.25.1-r1.ebuild deleted file mode 100644 index 8f3f5197f91..000 --- a/dev-python/eventlet/eventlet-0.25.1-r1.ebuild +++ /dev/null @@ -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 -} diff --git a/dev-python/eventlet/files/eventlet-0.25.1-sparc.patch b/dev-python/eventlet/files/eventlet-0.25.1-sparc.patch deleted file mode 100644 index c7f6a75b4f3..000 --- a/dev-python/eventlet/files/eventlet-0.25.1-sparc.patch +++ /dev/null @@ -1,118 +0,0 @@ -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(-) -
[gentoo-commits] repo/gentoo:master commit in: dev-python/eventlet/files/, dev-python/eventlet/
commit: b7574fb8cd61e2454615ccfc19383c7ff0633aec Author: Michał Górny gentoo org> AuthorDate: Fri May 29 07:30:58 2020 + Commit: Michał Górny gentoo org> CommitDate: Fri May 29 07:44:33 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7574fb8 dev-python/eventlet: Fix test failures on SPARC Reported by Dakon. Signed-off-by: Michał Górny gentoo.org> dev-python/eventlet/eventlet-0.25.1-r1.ebuild | 1 + .../eventlet/files/eventlet-0.25.1-sparc.patch | 118 + 2 files changed, 119 insertions(+) diff --git a/dev-python/eventlet/eventlet-0.25.1-r1.ebuild b/dev-python/eventlet/eventlet-0.25.1-r1.ebuild index 10c950a9b76..3055e3ca809 100644 --- a/dev-python/eventlet/eventlet-0.25.1-r1.ebuild +++ b/dev-python/eventlet/eventlet-0.25.1-r1.ebuild @@ -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 000..c7f6a75b4f3 --- /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 ==