[Python-modules-commits] [parallax] 07/08: merge patched into master

Valentin Vidic vvidic-guest at moszumanska.debian.org
Sun Nov 13 21:22:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository parallax.

commit eaa2e3879905e60a7e6aead6c485acb06f6d5ae8
Merge: e915285 6473453
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Sun Nov 13 22:06:42 2016 +0100

    merge patched into master

 debian/.git-dpm                                    |  4 +-
 ...date-module-and-test-to-work-with-python3.patch | 90 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 parallax/manager.py                                |  2 +
 test/test_api.py                                   | 14 ++--
 5 files changed, 102 insertions(+), 9 deletions(-)

diff --cc debian/.git-dpm
index 620b1cd,0000000..d403224
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- eb95c8ea45b9f570ca6b6d2c11455b703a309f16
- eb95c8ea45b9f570ca6b6d2c11455b703a309f16
++647345392b6d8c778f72dccd0ad31ab2816bf71b
++647345392b6d8c778f72dccd0ad31ab2816bf71b
 +fdf17ec903babd9f496782c607826b5482fc8247
 +fdf17ec903babd9f496782c607826b5482fc8247
 +parallax_1.0.1.orig.tar.gz
 +f1633d929fc6c4565974516ddced1eccddfc40dd
 +16086
diff --cc debian/patches/0002-Update-module-and-test-to-work-with-python3.patch
index 0000000,0000000..e331523
new file mode 100644
--- /dev/null
+++ b/debian/patches/0002-Update-module-and-test-to-work-with-python3.patch
@@@ -1,0 -1,0 +1,90 @@@
++From 647345392b6d8c778f72dccd0ad31ab2816bf71b Mon Sep 17 00:00:00 2001
++From: Valentin Vidic <Valentin.Vidic at CARNet.hr>
++Date: Sun, 13 Nov 2016 22:06:32 +0100
++Subject: Update module and test to work with python3
++
++---
++ parallax/manager.py |  2 ++
++ test/test_api.py    | 14 +++++++-------
++ 2 files changed, 9 insertions(+), 7 deletions(-)
++
++diff --git a/parallax/manager.py b/parallax/manager.py
++index ed58d5d..153a369 100644
++--- a/parallax/manager.py
+++++ b/parallax/manager.py
++@@ -8,6 +8,7 @@ import signal
++ import sys
++ import threading
++ import copy
+++import fcntl
++ 
++ try:
++     import queue
++@@ -247,6 +248,7 @@ class IOMap(object):
++ 
++         # Setup the wakeup file descriptor to avoid hanging on lost signals.
++         wakeup_readfd, wakeup_writefd = os.pipe()
+++        fcntl.fcntl(wakeup_writefd, fcntl.F_SETFL, os.O_NONBLOCK)
++         self.register_read(wakeup_readfd, self.wakeup_handler)
++         # TODO: remove test when we stop supporting Python <2.5
++         if hasattr(signal, 'set_wakeup_fd'):
++diff --git a/test/test_api.py b/test/test_api.py
++index 1f75b86..9f03210 100644
++--- a/test/test_api.py
+++++ b/test/test_api.py
++@@ -11,7 +11,7 @@ import shutil
++ basedir, bin = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))
++ sys.path.insert(0, "%s" % basedir)
++ 
++-print basedir
+++print(basedir)
++ 
++ import parallax as para
++ 
++@@ -28,7 +28,7 @@ class CallTest(unittest.TestCase):
++     def testSimpleCall(self):
++         opts = para.Options()
++         opts.default_user = g_user
++-        for host, result in para.call(g_hosts, "ls -l /", opts).iteritems():
+++        for host, result in para.call(g_hosts, "ls -l /", opts).items():
++             if isinstance(result, para.Error):
++                 raise result
++             rc, out, err = result
++@@ -38,17 +38,17 @@ class CallTest(unittest.TestCase):
++     def testUptime(self):
++         opts = para.Options()
++         opts.default_user = g_user
++-        for host, result in para.call(g_hosts, "uptime", opts).iteritems():
+++        for host, result in para.call(g_hosts, "uptime", opts).items():
++             if isinstance(result, para.Error):
++                 raise result
++             rc, out, err = result
++             self.assertEqual(rc, 0)
++-            self.assert_(out.find("load average") != -1)
+++            self.assert_(out.decode("utf8").find("load average") != -1)
++ 
++     def testFailingCall(self):
++         opts = para.Options()
++         opts.default_user = g_user
++-        for host, result in para.call(g_hosts, "touch /foofoo/barbar/jfikjfdj", opts).iteritems():
+++        for host, result in para.call(g_hosts, "touch /foofoo/barbar/jfikjfdj", opts).items():
++             self.assert_(isinstance(result, para.Error))
++             self.assert_(str(result).find('with error code') != -1)
++ 
++@@ -65,14 +65,14 @@ class CopySlurpTest(unittest.TestCase):
++         opts.default_user = g_user
++         opts.localdir = self.tmpDir
++         by_host = para.copy(g_hosts, "/etc/hosts", "/tmp/para.test", opts)
++-        for host, result in by_host.iteritems():
+++        for host, result in by_host.items():
++             if isinstance(result, para.Error):
++                 raise result
++             rc, _, _ = result
++             self.assertEqual(rc, 0)
++ 
++         by_host = para.slurp(g_hosts, "/tmp/para.test", "para.test", opts)
++-        for host, result in by_host.iteritems():
+++        for host, result in by_host.items():
++             if isinstance(result, para.Error):
++                 raise result
++             rc, _, _, path = result
diff --cc debian/patches/series
index e1cde84,0000000..ffe19f9
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,1 -1,0 +1,2 @@@
 +0001-Make-testsuite-exit-with-non-zero-on-failure.patch
++0002-Update-module-and-test-to-work-with-python3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/parallax.git



More information about the Python-modules-commits mailing list