[python-eventlet] fix breakage with python subprocess with timeout params

Pádraig Brady pbrady at fedoraproject.org
Wed Nov 9 15:27:01 UTC 2011


commit e7db6dcaca3fd79985958b159a0be8ad15587bdb
Author: Pádraig Brady <P at draigBrady.com>
Date:   Wed Nov 9 15:20:33 2011 +0000

    fix breakage with python subprocess with timeout params
    
    RHEL >= 6.1 has backported support for a timeout parameter
    in subprocess methods.  This needs handling as detailed here:
    https://bitbucket.org/which_linden/eventlet/issue/89/add-a-timeout-argument-to-subprocesspopen

 python-eventlet.spec     |   12 +++++++++++-
 subprocess_timeout.patch |   14 ++++++++++++++
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/python-eventlet.spec b/python-eventlet.spec
index b4b833d..253a3e4 100644
--- a/python-eventlet.spec
+++ b/python-eventlet.spec
@@ -4,12 +4,17 @@
 
 Name:           python-eventlet
 Version:        0.9.16
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Highly concurrent networking library
 Group:          Development/Libraries
 License:        MIT
 URL:            http://eventlet.net
 Source0:        http://pypi.python.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
+
+# From https://bitbucket.org/which_linden/eventlet/issue/89/add-a-timeout-argument-to-subprocesspopen
+# Required on RHEL >= 6.1 where python 2.6 has the backported timeout support
+Patch1:         subprocess_timeout.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  python2-devel
@@ -42,6 +47,7 @@ Documentation for the python-eventlet package.
 find -name '.*' -type f -exec rm {} \;
 sed -i -e 's/
//g' tests/mock.py
 sed -i -e '1d' eventlet/support/greendns.py
+%patch1 -p1 -b .subprocess_timeout
 
 %build
 %{__python} setup.py build
@@ -74,6 +80,10 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
+* Wed Nov 09 2011 Pádraig Brady <P at draigBrady.com - 0.9.16-2
+- Apply a patch to support subprocess.Popen implementations
+  that accept the timeout parameter, which is the case on RHEL >= 6.1
+
 * Sat Aug 27 2011 Kevin Fenzi <kevin at scrye.com> - 0.9.16-1
 - Update to 0.9.16
 
diff --git a/subprocess_timeout.patch b/subprocess_timeout.patch
new file mode 100644
index 0000000..bc32afe
--- /dev/null
+++ b/subprocess_timeout.patch
@@ -0,0 +1,14 @@
+https://bitbucket.org/which_linden/eventlet/issue/89/add-a-timeout-argument-to-subprocesspopen
+
+diff -r 6e6a02e7ac7c eventlet/green/subprocess.py
+--- a/eventlet/green/subprocess.py	Tue Apr 19 09:51:35 2011 -0700
++++ b/eventlet/green/subprocess.py	Thu May 26 09:56:14 2011 +1000
+@@ -32,7 +32,7 @@
+                     setattr(self, attr, wrapped_pipe)
+         __init__.__doc__ = subprocess_orig.Popen.__init__.__doc__
+ 
+-    def wait(self, check_interval=0.01):
++    def wait(self, check_interval=0.01, timeout=None):
+         # Instead of a blocking OS call, this version of wait() uses logic
+         # borrowed from the eventlet 0.2 processes.Process.wait() method.
+         try:


More information about the scm-commits mailing list