Hello community, here is the log from the commit of package python-parallax for openSUSE:Factory checked in at 2017-11-04 19:29:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-parallax (Old) and /work/SRC/openSUSE:Factory/.python-parallax.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-parallax" Sat Nov 4 19:29:03 2017 rev:9 rq:538596 version:1.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-parallax/python-parallax.changes 2017-08-29 11:47:19.484886029 +0200 +++ /work/SRC/openSUSE:Factory/.python-parallax.new/python-parallax.changes 2017-11-04 19:29:11.021352363 +0100 @@ -1,0 +2,6 @@ +Fri Nov 3 08:14:07 UTC 2017 - kgronl...@suse.com + +- Release 1.0.3 +- Add to_ascii function to convert byte message to str (bsc#1066330) + +------------------------------------------------------------------- Old: ---- parallax-1.0.2.tar.gz New: ---- parallax-1.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-parallax.spec ++++++ --- /var/tmp/diff_new_pack.2KUbRj/_old 2017-11-04 19:29:11.581331902 +0100 +++ /var/tmp/diff_new_pack.2KUbRj/_new 2017-11-04 19:29:11.581331902 +0100 @@ -19,13 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-parallax -Version: 1.0.2 +Version: 1.0.3 Release: 0 Summary: Execute commands and copy files over SSH to multiple machines at once License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/krig/parallax/ -Source: https://files.pythonhosted.org/packages/34/a7/039f774fcc9d1aff6bfe21969028781b8c61bd4e4938f1b2bb96387db68b/parallax-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/1c/21/acd162b334561a1989310d149407b7d6cd2ac7d51b7fae35cd897ed72ef7/parallax-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros ++++++ parallax-1.0.2.tar.gz -> parallax-1.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/PKG-INFO new/parallax-1.0.3/PKG-INFO --- old/parallax-1.0.2/PKG-INFO 2017-08-28 14:51:12.000000000 +0200 +++ new/parallax-1.0.3/PKG-INFO 2017-11-03 09:07:18.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: parallax -Version: 1.0.2 +Version: 1.0.3 Summary: Execute commands and copy files over SSH to multiple machines at once Home-page: https://github.com/krig/parallax/ Author: Kristoffer Gronlund Author-email: k...@koru.se License: BSD +Description-Content-Type: UNKNOWN Description: Parallax SSH provides an interface to executing commands on multiple nodes at once using SSH. It also provides commands for sending and receiving files to multiple nodes using SCP. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/__init__.py new/parallax-1.0.3/parallax/__init__.py --- old/parallax-1.0.2/parallax/__init__.py 2016-12-15 14:05:44.000000000 +0100 +++ new/parallax-1.0.3/parallax/__init__.py 2017-11-03 08:59:18.000000000 +0100 @@ -41,6 +41,19 @@ basestring = str +def to_ascii(s): + """Convert the bytes string to a ASCII string + Usefull to remove accent (diacritics)""" + if s is None: + return s + if isinstance(s, str): + return s + try: + return str(s, 'utf-8') + except UnicodeDecodeError: + return s + + class Error(BaseException): """ Returned instead of a result for a host @@ -48,13 +61,14 @@ that host. """ def __init__(self, msg, task): + super().__init__(self) self.msg = msg self.task = task def __str__(self): if self.task and self.task.errorbuffer: return "%s, Error output: %s" % (self.msg, - self.task.errorbuffer) + to_ascii(self.task.errorbuffer)) return self.msg @@ -98,8 +112,7 @@ return (v[0], None, None) elif len(v) == 2: return (v[0], v[1], None) - else: - return v + return v return [expand(x) for x in lst] @@ -268,8 +281,7 @@ ret[task.host] = (task.exitstatus, task.outputbuffer or manager.outdir, task.errorbuffer or manager.errdir, - self.localdirs.get(task.host, None) -) + self.localdirs.get(task.host, None)) return ret diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/askpass_client.py new/parallax-1.0.3/parallax/askpass_client.py --- old/parallax-1.0.2/parallax/askpass_client.py 2014-10-15 15:40:04.000000000 +0200 +++ new/parallax-1.0.3/parallax/askpass_client.py 2017-11-03 08:53:41.000000000 +0100 @@ -25,14 +25,15 @@ bin_dir = os.path.dirname(os.path.abspath(sys.argv[0])) askpass_bin_path = os.path.join(bin_dir, 'parallax-askpass') ASKPASS_PATHS = (askpass_bin_path, - '/usr/bin/parallax-askpass', - '/usr/libexec/parallax/parallax-askpass', - '/usr/local/libexec/parallax/parallax-askpass', - '/usr/lib/parallax/parallax-askpass', - '/usr/local/lib/parallax/parallax-askpass') + '/usr/bin/parallax-askpass', + '/usr/libexec/parallax/parallax-askpass', + '/usr/local/libexec/parallax/parallax-askpass', + '/usr/lib/parallax/parallax-askpass', + '/usr/local/lib/parallax/parallax-askpass') _executable_path = None + def executable_path(): """Determines the value to use for SSH_ASKPASS. @@ -46,12 +47,14 @@ break else: _executable_path = '' - sys.stderr.write(textwrap.fill("Warning: could not find an" - " executable path for askpass because Parallax SSH was not" - " installed correctly. Password prompts will not work.")) + sys.stderr.write( + textwrap.fill("Warning: could not find an" + " executable path for askpass because Parallax SSH was not" + " installed correctly. Password prompts will not work.")) sys.stderr.write('\n') return _executable_path + def askpass_main(): """Connects to parallax over the socket specified at PARALLAX_ASKPASS_SOCKET.""" @@ -74,9 +77,10 @@ address = os.getenv('PARALLAX_ASKPASS_SOCKET') if not address: - sys.stderr.write(textwrap.fill("parallax error: SSH requested a password." - " Please create SSH keys or use the -A option to provide a" - " password.")) + sys.stderr.write( + textwrap.fill("parallax error: SSH requested a password." + " Please create SSH keys or use the -A option to provide a" + " password.")) sys.stderr.write('\n') sys.exit(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/askpass_server.py new/parallax-1.0.3/parallax/askpass_server.py --- old/parallax-1.0.2/parallax/askpass_server.py 2015-02-23 08:39:49.000000000 +0100 +++ new/parallax-1.0.3/parallax/askpass_server.py 2017-11-03 08:48:26.000000000 +0100 @@ -24,6 +24,7 @@ self.address = None self.socketmap = {} self.buffermap = {} + self.password = "" def start(self, iomap, backlog): """Prompts for the password, creates a socket, and starts listening. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/color.py new/parallax-1.0.3/parallax/color.py --- old/parallax-1.0.2/parallax/color.py 2014-10-15 15:40:04.000000000 +0200 +++ new/parallax-1.0.3/parallax/color.py 2017-11-03 08:55:33.000000000 +0100 @@ -1,27 +1,57 @@ # Copyright (c) 2009-2012, Andrew McNabb # Copyright (c) 2003-2008, Brent N. Chun + def with_color(string, fg, bg=49): '''Given foreground/background ANSI color codes, return a string that, when printed, will format the supplied string using the supplied colors. ''' return "\x1b[%dm\x1b[%dm%s\x1b[39m\x1b[49m" % (fg, bg, string) + def B(string): '''Returns a string that, when printed, will display the supplied string in ANSI bold. ''' return "\x1b[1m%s\x1b[22m" % string -def r(string): return with_color(string, 31) # Red -def g(string): return with_color(string, 32) # Green -def y(string): return with_color(string, 33) # Yellow -def b(string): return with_color(string, 34) # Blue -def m(string): return with_color(string, 35) # Magenta -def c(string): return with_color(string, 36) # Cyan -def w(string): return with_color(string, 37) # White -#following from Python cookbook, #475186 +def r(string): + "Red" + return with_color(string, 31) + + +def g(string): + "Green" + return with_color(string, 32) + + +def y(string): + "Yellow" + return with_color(string, 33) + + +def b(string): + "Blue" + return with_color(string, 34) + + +def m(string): + "Magenta" + return with_color(string, 35) + + +def c(string): + "Cyan" + return with_color(string, 36) + + +def w(string): + "White" + return with_color(string, 37) + + +# following from Python cookbook, #475186 def has_colors(stream): '''Returns boolean indicating whether or not the supplied stream supports ANSI color. @@ -29,7 +59,7 @@ if not hasattr(stream, "isatty"): return False if not stream.isatty(): - return False # auto color only on TTYs + return False # auto color only on TTYs try: import curses curses.setupterm() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/manager.py new/parallax-1.0.3/parallax/manager.py --- old/parallax-1.0.2/parallax/manager.py 2016-12-15 14:03:04.000000000 +0100 +++ new/parallax-1.0.3/parallax/manager.py 2017-11-03 08:50:59.000000000 +0100 @@ -179,7 +179,7 @@ Due to http://bugs.python.org/issue1068268, signals must be masked when this method is called. """ - while 0 < len(self.tasks) and len(self.running) < self.limit: + while self.tasks and len(self.running) < self.limit: task = self.tasks.pop(0) self.running.append(task) task.start(self.taskcount, self.iomap, writer, self.askpass_socket) @@ -217,8 +217,7 @@ if min_timeleft is None: return 0 - else: - return max(0, min_timeleft) + return max(0, min_timeleft) def interrupted(self): """Cleans up after a keyboard interrupt.""" @@ -306,7 +305,7 @@ errno, message = e.args if errno != EINTR: sys.stderr.write('Fatal error reading from wakeup pipe: %s\n' - % message) + % message) raise FatalError @@ -365,8 +364,7 @@ """ if hasattr(select, 'poll'): return PollIOMap() - else: - return IOMap() + return IOMap() class Writer(threading.Thread): @@ -442,4 +440,3 @@ def signal_quit(self): """Called from another thread to request the Writer to quit.""" self.queue.put((self.ABORT, None)) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/task.py new/parallax-1.0.3/parallax/task.py --- old/parallax-1.0.2/parallax/task.py 2015-04-20 09:40:47.000000000 +0200 +++ new/parallax-1.0.3/parallax/task.py 2017-11-03 08:52:25.000000000 +0100 @@ -119,7 +119,7 @@ # Create the subprocess. Since we carefully call set_cloexec() on # all open files, we specify close_fds=False. self.proc = Popen(self.cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, - close_fds=False, preexec_fn=os.setsid, env=environ) + close_fds=False, preexec_fn=os.setsid, env=environ) self.timestamp = time.time() if self.inputbuffer: self.stdin = self.proc.stdin @@ -172,8 +172,7 @@ # Set the exitstatus to what it would be if we waited. self.exitstatus = -signal.SIGKILL return False - else: - return True + return True else: if self.exitstatus < 0: message = 'Killed by signal %s' % (-self.exitstatus) @@ -268,10 +267,9 @@ if self.verbose: exc_type, exc_value, exc_traceback = sys.exc_info() exc = ("Exception: %s, %s, %s" % - (exc_type, exc_value, traceback.format_tb(exc_traceback))) + (exc_type, exc_value, traceback.format_tb(exc_traceback))) else: exc = str(e) self.failures.append(exc) # vim:ts=4:sw=4:et: - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax/version.py new/parallax-1.0.3/parallax/version.py --- old/parallax-1.0.2/parallax/version.py 2017-08-28 14:33:51.000000000 +0200 +++ new/parallax-1.0.3/parallax/version.py 2017-11-03 09:02:03.000000000 +0100 @@ -1 +1 @@ -VERSION = '1.0.2' +VERSION = '1.0.3' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.2/parallax.egg-info/PKG-INFO new/parallax-1.0.3/parallax.egg-info/PKG-INFO --- old/parallax-1.0.2/parallax.egg-info/PKG-INFO 2017-08-28 14:51:12.000000000 +0200 +++ new/parallax-1.0.3/parallax.egg-info/PKG-INFO 2017-11-03 09:07:18.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: parallax -Version: 1.0.2 +Version: 1.0.3 Summary: Execute commands and copy files over SSH to multiple machines at once Home-page: https://github.com/krig/parallax/ Author: Kristoffer Gronlund Author-email: k...@koru.se License: BSD +Description-Content-Type: UNKNOWN Description: Parallax SSH provides an interface to executing commands on multiple nodes at once using SSH. It also provides commands for sending and receiving files to multiple nodes using SCP.