[Python-modules-commits] r31329 - in packages/matplotlib/trunk/debian (4 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Thu Oct 30 23:30:52 UTC 2014
Date: Thursday, October 30, 2014 @ 23:30:51
Author: morph
Revision: 31329
* debian/patches/test_backend_with_timeout.patch
- fixed patch to correctly terminating run-away processes during backend
checks; Closes: #767210
Added:
packages/matplotlib/trunk/debian/patches/test_backend_with_timeout.patch
Modified:
packages/matplotlib/trunk/debian/changelog
packages/matplotlib/trunk/debian/patches/series
Deleted:
packages/matplotlib/trunk/debian/patches/1a182a98f76ce8c624bbaf3882e40d799e867338.patch
Modified: packages/matplotlib/trunk/debian/changelog
===================================================================
--- packages/matplotlib/trunk/debian/changelog 2014-10-30 22:39:03 UTC (rev 31328)
+++ packages/matplotlib/trunk/debian/changelog 2014-10-30 23:30:51 UTC (rev 31329)
@@ -1,3 +1,11 @@
+matplotlib (1.4.2-3) UNRELEASED; urgency=medium
+
+ * debian/patches/test_backend_with_timeout.patch
+ - fixed patch to correctly terminating run-away processes during backend
+ checks; Closes: #767210
+
+ -- Sandro Tosi <morph at debian.org> Thu, 30 Oct 2014 23:28:11 +0000
+
matplotlib (1.4.2-2) unstable; urgency=medium
* debian/patches/1a182a98f76ce8c624bbaf3882e40d799e867338.patch
Deleted: packages/matplotlib/trunk/debian/patches/1a182a98f76ce8c624bbaf3882e40d799e867338.patch
===================================================================
--- packages/matplotlib/trunk/debian/patches/1a182a98f76ce8c624bbaf3882e40d799e867338.patch 2014-10-30 22:39:03 UTC (rev 31328)
+++ packages/matplotlib/trunk/debian/patches/1a182a98f76ce8c624bbaf3882e40d799e867338.patch 2014-10-30 23:30:51 UTC (rev 31329)
@@ -1,31 +0,0 @@
-From 1a182a98f76ce8c624bbaf3882e40d799e867338 Mon Sep 17 00:00:00 2001
-From: Jens Hedegaard Nielsen <jens.nielsen at ucl.ac.uk>
-Date: Wed, 29 Oct 2014 19:32:42 +0000
-Subject: [PATCH] Use map_async and get to avoid a deadlock
-
----
- setupext.py | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
---- a/setupext.py
-+++ b/setupext.py
-@@ -1843,7 +1843,8 @@ class BackendGtk3Cairo(OptionalBackendPa
- p = multiprocessing.Pool()
- except:
- return "unknown (can not use multiprocessing to determine)"
-- success, msg = p.map(backend_gtk3cairo_internal_check, [0])[0]
-+ res = p.map_async(backend_gtk3cairo_internal_check, [0])
-+ success, msg = res.get(timeout=5)[0]
- p.close()
- p.join()
- if success:
-@@ -1979,7 +1980,8 @@ class BackendQtBase(OptionalBackendPacka
- else:
- # Multiprocessing OK
- try:
-- msg = p.map(self.callback, [self])[0]
-+ res = p.map_async(self.callback, [self])
-+ msg = res.get(timeout=5)[0]
- except:
- # If we hit an error on multiprocessing raise it
- raise
Modified: packages/matplotlib/trunk/debian/patches/series
===================================================================
--- packages/matplotlib/trunk/debian/patches/series 2014-10-30 22:39:03 UTC (rev 31328)
+++ packages/matplotlib/trunk/debian/patches/series 2014-10-30 23:30:51 UTC (rev 31329)
@@ -6,4 +6,4 @@
multiarch-tktcl.patch
gtk3agg_check_no-multiprocessing.patch
gtk3cairo_check_no-multiprocessing.patch
-1a182a98f76ce8c624bbaf3882e40d799e867338.patch
+test_backend_with_timeout.patch
Added: packages/matplotlib/trunk/debian/patches/test_backend_with_timeout.patch
===================================================================
--- packages/matplotlib/trunk/debian/patches/test_backend_with_timeout.patch (rev 0)
+++ packages/matplotlib/trunk/debian/patches/test_backend_with_timeout.patch 2014-10-30 23:30:51 UTC (rev 31329)
@@ -0,0 +1,74 @@
+From 1a182a98f76ce8c624bbaf3882e40d799e867338 Mon Sep 17 00:00:00 2001
+From: Jens Hedegaard Nielsen <jens.nielsen at ucl.ac.uk>
+Date: Wed, 29 Oct 2014 19:32:42 +0000
+Subject: [PATCH] Use map_async and get to avoid a deadlock
+
+---
+ setupext.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/setupext.py
++++ b/setupext.py
+@@ -13,7 +13,6 @@ import sys
+ import warnings
+ from textwrap import fill
+
+-
+ PY3 = (sys.version_info[0] >= 3)
+
+
+@@ -1843,12 +1842,25 @@ class BackendGtk3Cairo(OptionalBackendPa
+ p = multiprocessing.Pool()
+ except:
+ return "unknown (can not use multiprocessing to determine)"
+- success, msg = p.map(backend_gtk3cairo_internal_check, [0])[0]
+- p.close()
+- p.join()
++ try:
++ res = p.map_async(backend_gtk3cairo_internal_check, [0])
++ success, msg = res.get(timeout=10)[0]
++ except multiprocessing.TimeoutError:
++ p.terminate()
++ # No result returned. Probaly hanging, terminate the process.
++ success = False
++ raise CheckFailed("Check timed out")
++ except:
++ p.close()
++ success = False
++ raise
++ else:
++ p.close()
++ finally:
++ p.join()
++
+ if success:
+ BackendAgg.force = True
+-
+ return msg
+ else:
+ raise CheckFailed(msg)
+@@ -1979,13 +1991,21 @@ class BackendQtBase(OptionalBackendPacka
+ else:
+ # Multiprocessing OK
+ try:
+- msg = p.map(self.callback, [self])[0]
++ res = p.map_async(self.callback, [self])
++ msg = res.get(timeout=10)[0]
++ except multiprocessing.TimeoutError:
++ p.terminate()
++ # No result returned. Probaly hanging, terminate the process.
++ raise CheckFailed("Check timed out")
+ except:
+- # If we hit an error on multiprocessing raise it
++ # Some other error.
++ p.close()
+ raise
++ else:
++ # Clean exit
++ p.close()
+ finally:
+ # Tidy up multiprocessing
+- p.close()
+ p.join()
+
+ return msg
More information about the Python-modules-commits
mailing list