Hello community,

here is the log from the commit of package python3-EasyProcess for 
openSUSE:Factory checked in at 2016-02-17 10:26:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-EasyProcess (Old)
 and      /work/SRC/openSUSE:Factory/.python3-EasyProcess.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-EasyProcess"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-EasyProcess/python3-EasyProcess.changes  
2015-11-02 12:55:30.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python3-EasyProcess.new/python3-EasyProcess.changes 
    2016-02-17 12:23:24.000000000 +0100
@@ -1,0 +2,13 @@
+Wed Feb 17 03:51:14 UTC 2016 - [email protected]
+
+- specfile:
+  * update copyright year
+
+- update to version 0.2.2:
+  * fix travis
+  * cleanup
+  * cleanup, format code
+  * support for environment variables (#8)
+  * doc
+
+-------------------------------------------------------------------

Old:
----
  EasyProcess-0.2.1.tar.gz

New:
----
  EasyProcess-0.2.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-EasyProcess.spec ++++++
--- /var/tmp/diff_new_pack.eIHCYU/_old  2016-02-17 12:23:25.000000000 +0100
+++ /var/tmp/diff_new_pack.eIHCYU/_new  2016-02-17 12:23:25.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-EasyProcess
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python3-EasyProcess
-Version:        0.2.1
+Version:        0.2.2
 Release:        0
 Url:            https://github.com/ponty/easyprocess
 Summary:        Easy to use python subprocess interface

++++++ EasyProcess-0.2.1.tar.gz -> EasyProcess-0.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/EasyProcess.egg-info/PKG-INFO 
new/EasyProcess-0.2.2/EasyProcess.egg-info/PKG-INFO
--- old/EasyProcess-0.2.1/EasyProcess.egg-info/PKG-INFO 2015-10-30 
09:34:46.000000000 +0100
+++ new/EasyProcess-0.2.2/EasyProcess.egg-info/PKG-INFO 2016-02-15 
07:03:32.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: EasyProcess
-Version: 0.2.1
+Version: 0.2.2
 Summary: Easy to use python subprocess interface.
 Home-page: https://github.com/ponty/easyprocess
 Author: ponty
@@ -31,6 +31,7 @@
          - stop() does not kill whole subprocess tree 
          - unicode support
          - supported python versions: 2.6, 2.7, 3.3, 3.4, 3.5
+         - Method chaining_
          
         Similar projects:
          * execute (http://pypi.python.org/pypi/execute)
@@ -231,6 +232,7 @@
          
         .. _pip: http://pip.openplans.org/
         .. _subprocess: http://docs.python.org/library/subprocess.html
+        .. _chaining: https://en.wikipedia.org/wiki/Method_chaining#Python
         
         .. |Travis| image:: http://img.shields.io/travis/ponty/EasyProcess.svg
            :target: https://travis-ci.org/ponty/EasyProcess/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/EasyProcess.egg-info/SOURCES.txt 
new/EasyProcess-0.2.2/EasyProcess.egg-info/SOURCES.txt
--- old/EasyProcess-0.2.1/EasyProcess.egg-info/SOURCES.txt      2015-10-30 
09:34:46.000000000 +0100
+++ new/EasyProcess-0.2.2/EasyProcess.egg-info/SOURCES.txt      2016-02-15 
07:03:32.000000000 +0100
@@ -1,7 +1,6 @@
 LICENSE.txt
 MANIFEST.in
 README.rst
-pavement.py
 setup.py
 EasyProcess.egg-info/PKG-INFO
 EasyProcess.egg-info/SOURCES.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/PKG-INFO 
new/EasyProcess-0.2.2/PKG-INFO
--- old/EasyProcess-0.2.1/PKG-INFO      2015-10-30 09:34:46.000000000 +0100
+++ new/EasyProcess-0.2.2/PKG-INFO      2016-02-15 07:03:32.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: EasyProcess
-Version: 0.2.1
+Version: 0.2.2
 Summary: Easy to use python subprocess interface.
 Home-page: https://github.com/ponty/easyprocess
 Author: ponty
@@ -31,6 +31,7 @@
          - stop() does not kill whole subprocess tree 
          - unicode support
          - supported python versions: 2.6, 2.7, 3.3, 3.4, 3.5
+         - Method chaining_
          
         Similar projects:
          * execute (http://pypi.python.org/pypi/execute)
@@ -231,6 +232,7 @@
          
         .. _pip: http://pip.openplans.org/
         .. _subprocess: http://docs.python.org/library/subprocess.html
+        .. _chaining: https://en.wikipedia.org/wiki/Method_chaining#Python
         
         .. |Travis| image:: http://img.shields.io/travis/ponty/EasyProcess.svg
            :target: https://travis-ci.org/ponty/EasyProcess/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/README.rst 
new/EasyProcess-0.2.2/README.rst
--- old/EasyProcess-0.2.1/README.rst    2015-10-30 09:32:54.000000000 +0100
+++ new/EasyProcess-0.2.2/README.rst    2016-02-13 11:08:49.000000000 +0100
@@ -23,6 +23,7 @@
  - stop() does not kill whole subprocess tree 
  - unicode support
  - supported python versions: 2.6, 2.7, 3.3, 3.4, 3.5
+ - Method chaining_
  
 Similar projects:
  * execute (http://pypi.python.org/pypi/execute)
@@ -223,6 +224,7 @@
  
 .. _pip: http://pip.openplans.org/
 .. _subprocess: http://docs.python.org/library/subprocess.html
+.. _chaining: https://en.wikipedia.org/wiki/Method_chaining#Python
 
 .. |Travis| image:: http://img.shields.io/travis/ponty/EasyProcess.svg
    :target: https://travis-ci.org/ponty/EasyProcess/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/easyprocess/__init__.py 
new/EasyProcess-0.2.2/easyprocess/__init__.py
--- old/EasyProcess-0.2.1/easyprocess/__init__.py       2015-10-28 
06:24:43.000000000 +0100
+++ new/EasyProcess-0.2.2/easyprocess/__init__.py       2016-02-13 
11:08:49.000000000 +0100
@@ -1,6 +1,4 @@
-'''
-Easy to use python subprocess interface.
-'''
+"""Easy to use python subprocess interface."""
 
 from easyprocess.unicodeutil import split_command, unidecode, uniencode
 import logging
@@ -11,24 +9,20 @@
 import tempfile
 import threading
 import time
-# import ConfigParser
 
 from easyprocess.about import __version__
 
 log = logging.getLogger(__name__)
-# log=logging
 
 log.debug('version=%s', __version__)
 
-# CONFIG_FILE = '.easyprocess.cfg'
 SECTION_LINK = 'link'
 POLL_TIME = 0.1
 USE_POLL = 0
 
 
 class EasyProcessError(Exception):
-    """
-    """
+
     def __init__(self, easy_process, msg=''):
         self.easy_process = easy_process
         self.msg = msg
@@ -42,9 +36,11 @@
 
 
 class EasyProcessCheckInstalledError(Exception):
+
     """This exception is raised when a process run by check() returns
     a non-zero exit status or OSError is raised.
     """
+
     def __init__(self, easy_process):
         self.easy_process = easy_process
 
@@ -62,6 +58,7 @@
 
 
 class EasyProcess(object):
+
     '''
     .. module:: easyprocess
 
@@ -80,13 +77,17 @@
                            stdout and stderr,
                            pipes can cause deadlock in some cases
                            (see unit tests)
-    '''
-#     config = None
 
-    def __init__(self, cmd, ubuntu_package=None, url=None, cwd=None, 
use_temp_files=True):
+    :param env: If *env* is not ``None``, it must be a mapping that defines 
the environment
+                   variables for the new process; these are used instead of 
inheriting the current
+                   process' environment, which is the default behavior. 
+                   (check :mod:`subprocess`  for more information)
+    '''
+    def __init__(self, cmd, ubuntu_package=None, url=None, cwd=None, 
use_temp_files=True, env=None):
         self.use_temp_files = use_temp_files
         self._outputs_processed = False
 
+        self.env = env
         self.popen = None
         self.stdout = None
         self.stderr = None
@@ -113,35 +114,15 @@
         if not len(cmd):
             raise EasyProcessError(self, 'empty command!')
 
-#         if not Proc.config:
-#             conf_file = os.path.join(os.path.expanduser('~'), CONFIG_FILE)
-#             log.debug('reading config: %s', conf_file)
-#             Proc.config = ConfigParser.RawConfigParser()
-#             Proc.config.read(conf_file)
-
-#         self.alias = None
-#         try:
-#             self.alias = Proc.config.get(SECTION_LINK, self.cmd[0])
-#         except ConfigParser.NoSectionError:
-#             pass
-#         except ConfigParser.NoOptionError:
-#             pass
-
-#         if self.alias:
-#             log.debug('alias found: %s', self.alias)
-#             self.cmd[0] = self.alias
-
     def __repr__(self):
         msg = '<%s cmd_param=%s cmd=%s oserror=%s returncode=%s stdout="%s" 
stderr="%s" timeout=%s>' % (
             self.__class__.__name__,
             self.cmd_param,
             self.cmd,
             self.oserror,
-            #                            alias=self.alias,
             self.return_code,
             self.stdout,
             self.stderr,
-            #                            scmd=' '.join(self.cmd),
             self.timeout_happened,
         )
         return msg
@@ -167,22 +148,14 @@
             return self.popen.returncode
 
     def check(self, return_code=0):
-        '''
-        Run command with arguments. Wait for command to complete.
-        If the exit code was as expected and there is no exception then return,
+        """Run command with arguments. Wait for command to complete. If the
+        exit code was as expected and there is no exception then return,
         otherwise raise EasyProcessError.
 
         :param return_code: int, expected return code
         :rtype: self
-        '''
-#        try:
-#            ret = self.call().return_code
-#            ok = ret == return_code
-#        except Exception , e:
-#            log.debug('OSError exception:' + str(oserror))
-#            ok = False
-#            self.oserror = oserror
 
+        """
         ret = self.call().return_code
         ok = ret == return_code
         if not ok:
@@ -191,8 +164,7 @@
         return self
 
     def check_installed(self):
-        '''
-        Used for testing if program is installed.
+        """Used for testing if program is installed.
 
         Run command with arguments. Wait for command to complete.
         If OSError raised, then raise :class:`EasyProcessCheckInstalledError`
@@ -200,18 +172,16 @@
 
         :param return_code: int, expected return code
         :rtype: self
-        '''
+
+        """
         try:
             self.call()
         except Exception:
-            # log.debug('exception:' + str(e))
-            # self.oserror = oserror
             raise EasyProcessCheckInstalledError(self)
         return self
 
     def call(self, timeout=None):
-        '''
-        Run command with arguments. Wait for command to complete.
+        """Run command with arguments. Wait for command to complete.
 
         same as:
          1. :meth:`start`
@@ -219,19 +189,19 @@
          3. :meth:`stop`
 
         :rtype: self
-        '''
+
+        """
         self.start().wait(timeout=timeout)
         if self.is_alive():
             self.stop()
         return self
 
     def start(self):
-        '''
-        start command in background and does not wait for it
-
+        """start command in background and does not wait for it.
 
         :rtype: self
-        '''
+
+        """
         if self.is_started:
             raise EasyProcessError(self, 'process was started twice!')
 
@@ -251,8 +221,8 @@
             self.popen = subprocess.Popen(cmd,
                                           stdout=stdout,
                                           stderr=stderr,
-                                          # shell=1,
                                           cwd=self.cwd,
+                                          env=self.env,
                                           )
         except OSError, oserror:
             log.debug('OSError exception: %s', oserror)
@@ -260,19 +230,6 @@
             raise EasyProcessError(self, 'start error')
         self.is_started = True
         log.debug('process was started (pid=%s)', self.pid)
-
-#        def target():
-#            self._wait4process()
-
-#        def shutdown():
-#            self._stop_thread = True
-#            self._thread.join()
-
-#        self._thread = threading.Thread(target=target)
-#        self._thread.daemon = 1
-#        self._thread.start()
-#        atexit.register(shutdown)
-
         return self
 
     def is_alive(self):
@@ -287,15 +244,15 @@
             return False
 
     def wait(self, timeout=None):
-        '''
-        Wait for command to complete.
+        """Wait for command to complete.
 
         Timeout:
          - discussion: 
http://stackoverflow.com/questions/1191374/subprocess-with-timeout
          - implementation: threading
 
         :rtype: self
-        '''
+
+        """
 
         if timeout is not None:
             if not self._thread:
@@ -370,16 +327,15 @@
             log.debug('stderr=%s', self.stderr)
 
     def stop(self):
-        '''
-        Kill process
-        and wait for command to complete.
+        """Kill process and wait for command to complete.
 
         same as:
          1. :meth:`sendstop`
          2. :meth:`wait`
 
         :rtype: self
-        '''
+
+        """
         return self.sendstop().wait()
 
     def sendstop(self):
@@ -461,8 +417,8 @@
 
 
 def extract_version(txt):
-    '''This function tries to extract the version from the help text of any 
program.
-    '''
+    """This function tries to extract the version from the help text of any
+    program."""
     words = txt.replace(',', ' ').split()
     version = None
     for x in reversed(words):
@@ -476,4 +432,3 @@
 
 
 Proc = EasyProcess
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/easyprocess/about.py 
new/EasyProcess-0.2.2/easyprocess/about.py
--- old/EasyProcess-0.2.1/easyprocess/about.py  2015-10-30 09:33:44.000000000 
+0100
+++ new/EasyProcess-0.2.2/easyprocess/about.py  2016-02-15 07:01:53.000000000 
+0100
@@ -1 +1 @@
-__version__ = '0.2.1'
+__version__ = '0.2.2'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/easyprocess/examples/cmd.py 
new/EasyProcess-0.2.2/easyprocess/examples/cmd.py
--- old/EasyProcess-0.2.1/easyprocess/examples/cmd.py   2015-10-28 
06:24:43.000000000 +0100
+++ new/EasyProcess-0.2.2/easyprocess/examples/cmd.py   2016-02-13 
11:08:49.000000000 +0100
@@ -1,22 +1,22 @@
 from easyprocess import EasyProcess
 
-print('-- Run program, wait for it to complete, get stdout (command is 
string):')
-s=EasyProcess('python -c "print 3"').call().stdout
+print(
+    '-- Run program, wait for it to complete, get stdout (command is string):')
+s = EasyProcess('python -c "print 3"').call().stdout
 print(s)
 
 print('-- Run program, wait for it to complete, get stdout (command is list):')
-s=EasyProcess(['python','-c','print 3']).call().stdout
+s = EasyProcess(['python', '-c', 'print 3']).call().stdout
 print(s)
 
 print('-- Run program, wait for it to complete, get stderr:')
-s=EasyProcess('python --version').call().stderr
+s = EasyProcess('python --version').call().stderr
 print(s)
 
 print('-- Run program, wait for it to complete, get return code:')
-s=EasyProcess('python --version').call().return_code
+s = EasyProcess('python --version').call().return_code
 print(s)
 
 print('-- Run program, wait 1 second, stop it, get stdout:')
-s=EasyProcess('ping localhost').start().sleep(1).stop().stdout
+s = EasyProcess('ping localhost').start().sleep(1).stop().stdout
 print(s)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/easyprocess/examples/log.py 
new/EasyProcess-0.2.2/easyprocess/examples/log.py
--- old/EasyProcess-0.2.1/easyprocess/examples/log.py   2012-12-03 
13:11:12.000000000 +0100
+++ new/EasyProcess-0.2.2/easyprocess/examples/log.py   2016-02-13 
11:08:49.000000000 +0100
@@ -10,9 +10,9 @@
 try:
     EasyProcess('bad_command').check()
 except Exception, detail:
-    print  detail
+    print detail
 
 try:
     EasyProcess('sh -c bad_command').check()
 except Exception, detail:
-    print  detail
+    print detail
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/easyprocess/unicodeutil.py 
new/EasyProcess-0.2.2/easyprocess/unicodeutil.py
--- old/EasyProcess-0.2.1/easyprocess/unicodeutil.py    2012-12-03 
13:11:12.000000000 +0100
+++ new/EasyProcess-0.2.2/easyprocess/unicodeutil.py    2016-02-13 
11:08:49.000000000 +0100
@@ -33,7 +33,7 @@
             # cmd is string
             # The shlex module currently does not support Unicode input (in
             # 2.x)!
-            if  isinstance(cmd, unicode):
+            if isinstance(cmd, unicode):
                 try:
                     cmd = unicodedata.normalize(
                         'NFKD', cmd).encode('ascii', 'strict')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/EasyProcess-0.2.1/pavement.py 
new/EasyProcess-0.2.2/pavement.py
--- old/EasyProcess-0.2.1/pavement.py   2015-10-28 06:24:43.000000000 +0100
+++ new/EasyProcess-0.2.2/pavement.py   1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-from path import Path
-from paver.doctools import cog, html
-from paver.easy import options
-from paver.options import Bunch
-from paver.setuputils import setup
-
-
-IMPORTS=[cog, html, setup]
-    
-options(
-    cog=Bunch(
-        basedir='.',
-        pattern='README.rst',
-        includedir='easyprocess',
-        beginspec='#--',
-        endspec='--#',
-        endoutput='#-#',
-    )
-)
-
-
-# get info from setup.py
-setup_py = ''.join(
-    [x for x in Path('setup.py').lines() if 'setuptools' not in x])
-exec(setup_py)
-


Reply via email to