From cf75b87f4beceed3f37b1ff39cc577061e0a8dd4a52a2fb4addb433d10dd848d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 8 Jan 2022 12:37:17 +0000 Subject: [PATCH 1/2] Accepting request 944483 from home:bnavigator:branches:devel:languages:python - skip test_log due to flaky socket handling inside obs environments OBS-URL: https://build.opensuse.org/request/show/944483 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyzmq?expand=0&rev=100 --- less-flaky.patch | 27 +++++++++++++++++++++++++++ python-pyzmq.changes | 22 ++++++++++++++++++++++ python-pyzmq.spec | 11 +++++++++-- pyzmq-22.2.1.tar.gz | 3 --- pyzmq-22.3.0.tar.gz | 3 +++ 5 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 less-flaky.patch delete mode 100644 pyzmq-22.2.1.tar.gz create mode 100644 pyzmq-22.3.0.tar.gz diff --git a/less-flaky.patch b/less-flaky.patch new file mode 100644 index 0000000..23fcbcd --- /dev/null +++ b/less-flaky.patch @@ -0,0 +1,27 @@ +--- + zmq/tests/test_poll.py | 2 +- + zmq/tests/test_retry_eintr.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/zmq/tests/test_poll.py ++++ b/zmq/tests/test_poll.py +@@ -192,7 +192,7 @@ class TestSelect(PollZMQTestCase): + self.assertTrue(s1 not in rlist) + self.assertTrue(s2 not in rlist) + +- @mark.flaky(reruns=3) ++ @mark.flaky() + def test_timeout(self): + """make sure select timeout has the right units (seconds).""" + s1, s2 = self.create_bound_pair(zmq.PAIR, zmq.PAIR) +--- a/zmq/tests/test_retry_eintr.py ++++ b/zmq/tests/test_retry_eintr.py +@@ -60,7 +60,7 @@ class TestEINTRSysCall(BaseZMQTestCase): + self.assertRaises(zmq.Again, push.send, b('buf')) + assert self.timer_fired + +- @mark.flaky(reruns=3) ++ @mark.flaky() + def test_retry_poll(self): + x, y = self.create_bound_pair() + poller = zmq.Poller() diff --git a/python-pyzmq.changes b/python-pyzmq.changes index 28102d3..0831015 100644 --- a/python-pyzmq.changes +++ b/python-pyzmq.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Wed Jan 5 23:03:59 UTC 2022 - Ben Greiner + +- skip test_log due to flaky socket handling inside obs + environments + +------------------------------------------------------------------- +Wed Oct 13 13:26:41 UTC 2021 - Matej Cepl + +- Update to 22.3.0: + - Fix strlcpy compilation issues on alpine, freebsd. Adds new + build-time dependency on packaging. + - In event-loop integration: warn instead of raise when + triggering callback on a socket whose context has been + closed. + - Bundled libzmq in wheels backport a patch to avoid crashes + due to inappropriate closing of libsodium's random generator + when using CurveZMQ. + - New ResourceWarnings when contexts and sockets are closed by + garbage collection, which can be a source of hangs and leaks + (matches open files) + ------------------------------------------------------------------- Wed Aug 11 10:15:01 UTC 2021 - Markéta Machová diff --git a/python-pyzmq.spec b/python-pyzmq.spec index df40a40..d145508 100644 --- a/python-pyzmq.spec +++ b/python-pyzmq.spec @@ -25,13 +25,16 @@ %bcond_with tests %endif Name: python-pyzmq -Version: 22.2.1 +Version: 22.3.0 Release: 0 Summary: Python bindings for 0MQ License: BSD-3-Clause AND LGPL-3.0-or-later URL: https://github.com/zeromq/pyzmq Source: https://files.pythonhosted.org/packages/source/p/pyzmq/pyzmq-%{version}.tar.gz Source1: python-pyzmq-rpmlintrc +# PATCH-FIX-UPSTREAM less-flaky.patch bsc#[0-9]+ mcepl@suse.com +# Make test suite less flaky +Patch0: less-flaky.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel >= 3.6} BuildRequires: %{python_module setuptools} @@ -40,7 +43,9 @@ BuildRequires: python-rpm-macros BuildRequires: zeromq-devel # SECTION Test requirements BuildRequires: %{python_module gevent} +BuildRequires: %{python_module flaky} BuildRequires: %{python_module paramiko} +BuildRequires: %{python_module pytest-rerunfailures} BuildRequires: %{python_module pytest-timeout} BuildRequires: %{python_module pytest} BuildRequires: %{python_module simplejson} @@ -106,13 +111,15 @@ export LANG=en_US.UTF-8 # This test wants to build a custom cython extension, but does # not have the source files installed into the buildroot SKIPPED_TESTS+=" or test_cython" +# unreliable socket handling in obs environment +SKIPPED_TESTS+=" or test_log" %if 0%{?suse_version} < 1550 # tries to open a network connection on older distributions SKIPPED_TESTS+=" or test_null" %endif mkdir cleantest pushd cleantest -%pytest_arch --pyargs zmq -k "not (${SKIPPED_TESTS:4})" --timeout 120 -ra +%pytest_arch --pyargs zmq -k "not (${SKIPPED_TESTS:4})" --timeout 1200 popd %endif diff --git a/pyzmq-22.2.1.tar.gz b/pyzmq-22.2.1.tar.gz deleted file mode 100644 index 29b219b..0000000 --- a/pyzmq-22.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d18c76676771fd891ca8e0e68da0bbfb88e30129835c0ade748016adb3b6242 -size 1243088 diff --git a/pyzmq-22.3.0.tar.gz b/pyzmq-22.3.0.tar.gz new file mode 100644 index 0000000..4877459 --- /dev/null +++ b/pyzmq-22.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8eddc033e716f8c91c6a2112f0a8ebc5e00532b4a6ae1eb0ccc48e027f9c671c +size 1243520 From 43553bba95e45ba390f92f0195c5c239a2f70232819006338ef251ae5824e995 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 8 Jan 2022 12:46:01 +0000 Subject: [PATCH 2/2] Fix changes OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyzmq?expand=0&rev=101 --- python-pyzmq.changes | 5 +++-- python-pyzmq.spec | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pyzmq.changes b/python-pyzmq.changes index 0831015..7e146ca 100644 --- a/python-pyzmq.changes +++ b/python-pyzmq.changes @@ -1,8 +1,9 @@ ------------------------------------------------------------------- Wed Jan 5 23:03:59 UTC 2022 - Ben Greiner -- skip test_log due to flaky socket handling inside obs - environments +- Skip test_log due to flaky socket handling inside obs environments. +- Add less-flaky.patch to increase flakiness of test_retry_poll + and test_timeout. ------------------------------------------------------------------- Wed Oct 13 13:26:41 UTC 2021 - Matej Cepl diff --git a/python-pyzmq.spec b/python-pyzmq.spec index d145508..3193b61 100644 --- a/python-pyzmq.spec +++ b/python-pyzmq.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyzmq # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed