From 8ee88a018e83396db7d4a458961f9a48229f2140 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Jan 23 2016 14:20:24 +0000 Subject: Fix rhbz#1291048: - Conditionalize dependency on python-gevent. - Disable failing test. - Drop unused patch. --- diff --git a/execnet-1.1-issue9.patch b/execnet-1.1-issue9.patch deleted file mode 100644 index ee321b1..0000000 --- a/execnet-1.1-issue9.patch +++ /dev/null @@ -1,71 +0,0 @@ -# HG changeset patch -# User Ronny Pfannschmidt -# Date 1346694793 -7200 -# Node ID 49c5934137e5f8ac9d16ea96ac2a5c01149ad190 -# Parent ec10c11ac8eb248a995c70ad2fee426315249f33 -fix issue #9 - terminate the worker threadpools in safe_terminate - -diff -r ec10c11ac8eb248a995c70ad2fee426315249f33 -r 49c5934137e5f8ac9d16ea96ac2a5c01149ad190 CHANGELOG ---- a/CHANGELOG Wed Jun 20 18:16:40 2012 +0200 -+++ b/CHANGELOG Mon Sep 03 19:53:13 2012 +0200 -@@ -23,6 +23,8 @@ - - fix issue #2 - properly reconfigure the channels string coercion for rsync, - so it can send from python2 to python3 - -+- fix issue #9 - propperly terminate the worker threadpools in safe_terminate -+ - - refactor socketserver, so it can be directly remote_exec'd for starting a socket gateway on a remote - - -diff -r ec10c11ac8eb248a995c70ad2fee426315249f33 -r 49c5934137e5f8ac9d16ea96ac2a5c01149ad190 execnet/multi.py ---- a/execnet/multi.py Wed Jun 20 18:16:40 2012 +0200 -+++ b/execnet/multi.py Mon Sep 03 19:53:13 2012 +0200 -@@ -252,6 +252,8 @@ - replylist.append(reply) - for reply in replylist: - reply.get() -+ workerpool.shutdown() -+ workerpool.join() - - - default_group = Group() -diff -r ec10c11ac8eb248a995c70ad2fee426315249f33 -r 49c5934137e5f8ac9d16ea96ac2a5c01149ad190 testing/test_multi.py ---- a/testing/test_multi.py Wed Jun 20 18:16:40 2012 +0200 -+++ b/testing/test_multi.py Mon Sep 03 19:53:13 2012 +0200 -@@ -2,6 +2,8 @@ - tests for multi channels and gateway Groups - """ - -+import threading -+from time import sleep - import execnet - import py - from execnet.gateway_base import Channel -@@ -193,6 +195,7 @@ - - - def test_safe_terminate(): -+ active = threading.active_count() - l = [] - def term(): - py.std.time.sleep(3) -@@ -200,8 +203,12 @@ - l.append(1) - safe_terminate(1, [(term, kill)] * 10) - assert len(l) == 10 -+ sleep(0.1) -+ py.std.gc.collect() -+ assert threading.active_count() == active - - def test_safe_terminate2(): -+ active = threading.active_count() - l = [] - def term(): - return -@@ -209,3 +216,6 @@ - l.append(1) - safe_terminate(3, [(term, kill)] * 10) - assert len(l) == 0 -+ sleep(0.1) -+ py.std.gc.collect() -+ assert threading.active_count() == active diff --git a/python-execnet.spec b/python-execnet.spec index 4a2554e..14aa5dc 100644 --- a/python-execnet.spec +++ b/python-execnet.spec @@ -9,7 +9,7 @@ Name: python-%{srcname} Version: 1.2.0 -Release: 4%{?dist} +Release: 4%{?dist}.1 Summary: Elastic Python Deployment Group: Development/Languages # package is now under the MIT license, (although the docs still say @@ -32,7 +32,9 @@ BuildRequires: pytest BuildRequires: python-sphinx BuildRequires: /bin/ps BuildRequires: python-eventlet +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 BuildRequires: python-gevent >= 1.0 +%endif %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -117,7 +119,7 @@ rm doc/_build/html/.buildinfo %check PYTHONPATH=$(pwd) LC_ALL="en_US.UTF-8" \ -py.test-%{python_version} -r s testing +py.test-%{python_version} -r s -k'-test_stdouterrin_setnull' testing %if 0%{?with_python3} pushd %{py3dir} PYTHONPATH=$(pwd) LC_ALL="en_US.UTF-8" \ @@ -141,6 +143,12 @@ popd %changelog +* Sat Jan 23 2016 Thomas Moschny - 1.2.0-4.1 +- Fix rhbz#1291048: + - Conditionalize dependency on python-gevent. + - Disable failing test. +- Drop unused patch. + * Wed Jun 18 2014 Orion Poplawski - 1.2.0-4 - Add patch to fix failing test with old pytest on EL7