Hello community,

here is the log from the commit of package python-subprocrunner for 
openSUSE:Factory checked in at 2020-03-23 12:50:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-subprocrunner (Old)
 and      /work/SRC/openSUSE:Factory/.python-subprocrunner.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-subprocrunner"

Mon Mar 23 12:50:15 2020 rev:4 rq:786977 version:1.2.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-subprocrunner/python-subprocrunner.changes    
    2020-03-17 13:12:24.865903506 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-subprocrunner.new.3160/python-subprocrunner.changes
      2020-03-23 12:51:01.723974057 +0100
@@ -1,0 +2,9 @@
+Fri Mar 20 16:52:01 UTC 2020 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.2.0
+  * Add follow_symlinks argument to Which constructor
+  * Improve path existence check for Which
+  * Modify an error handling when a command not specified for Which
+  * Fix to include py.typed to the package
+
+-------------------------------------------------------------------

Old:
----
  subprocrunner-1.1.0.tar.gz

New:
----
  subprocrunner-1.2.0.tar.gz

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

Other differences:
------------------
++++++ python-subprocrunner.spec ++++++
--- /var/tmp/diff_new_pack.GQJCXP/_old  2020-03-23 12:51:05.163976217 +0100
+++ /var/tmp/diff_new_pack.GQJCXP/_new  2020-03-23 12:51:05.171976222 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-subprocrunner
-Version:        1.1.0
+Version:        1.2.0
 Release:        0
 Summary:        A Python wrapper library for subprocess module
 License:        MIT

++++++ subprocrunner-1.1.0.tar.gz -> subprocrunner-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/MANIFEST.in 
new/subprocrunner-1.2.0/MANIFEST.in
--- old/subprocrunner-1.1.0/MANIFEST.in 2019-12-30 00:54:16.000000000 +0100
+++ new/subprocrunner-1.2.0/MANIFEST.in 2020-03-20 13:37:52.000000000 +0100
@@ -2,6 +2,7 @@
 include README.rst
 include setup.cfg
 include tox.ini
+include */py.typed
 
 recursive-include requirements *
 recursive-include test *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/PKG-INFO 
new/subprocrunner-1.2.0/PKG-INFO
--- old/subprocrunner-1.1.0/PKG-INFO    2020-02-15 15:40:19.317512000 +0100
+++ new/subprocrunner-1.2.0/PKG-INFO    2020-03-20 15:43:11.178614100 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: subprocrunner
-Version: 1.1.0
+Version: 1.2.0
 Summary: A Python wrapper library for subprocess module.
 Home-page: https://github.com/thombashi/subprocrunner
 Author: Tsuyoshi Hombashi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/setup.py 
new/subprocrunner-1.2.0/setup.py
--- old/subprocrunner-1.1.0/setup.py    2020-02-11 08:48:35.000000000 +0100
+++ new/subprocrunner-1.2.0/setup.py    2020-03-20 13:38:54.000000000 +0100
@@ -55,7 +55,7 @@
     long_description=long_description,
     long_description_content_type="text/x-rst",
     packages=setuptools.find_packages(exclude=["test*"]),
-    package_data={"subprocrunner": ["py.typed"]},
+    package_data={MODULE_NAME: ["py.typed"]},
     project_urls={"Source": REPOSITORY_URL, "Tracker": 
"{:s}/issues".format(REPOSITORY_URL)},
     python_requires=">=3.5",
     install_requires=SETUPTOOLS_REQUIRES + install_requires,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/subprocrunner/__version__.py 
new/subprocrunner-1.2.0/subprocrunner/__version__.py
--- old/subprocrunner-1.1.0/subprocrunner/__version__.py        2020-02-15 
03:20:37.000000000 +0100
+++ new/subprocrunner-1.2.0/subprocrunner/__version__.py        2020-03-20 
15:38:24.000000000 +0100
@@ -1,6 +1,6 @@
 __author__ = "Tsuyoshi Hombashi"
 __copyright__ = "Copyright 2016, {}".format(__author__)
 __license__ = "MIT License"
-__version__ = "1.1.0"
+__version__ = "1.2.0"
 __maintainer__ = __author__
 __email__ = "tsuyoshi.homba...@gmail.com"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/subprocrunner-1.1.0/subprocrunner/_logger/_null_logger.py 
new/subprocrunner-1.2.0/subprocrunner/_logger/_null_logger.py
--- old/subprocrunner-1.1.0/subprocrunner/_logger/_null_logger.py       
2020-02-14 12:27:31.000000000 +0100
+++ new/subprocrunner-1.2.0/subprocrunner/_logger/_null_logger.py       
2020-02-23 03:10:07.000000000 +0100
@@ -4,7 +4,7 @@
     def remove(self, handler_id=None):  # pragma: no cover
         pass
 
-    def add(self, **kwargs):  # pragma: no cover
+    def add(self, sink, **kwargs):  # pragma: no cover
         pass
 
     def disable(self, name):  # pragma: no cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/subprocrunner/_which.py 
new/subprocrunner-1.2.0/subprocrunner/_which.py
--- old/subprocrunner-1.1.0/subprocrunner/_which.py     2020-02-11 
07:49:50.000000000 +0100
+++ new/subprocrunner-1.2.0/subprocrunner/_which.py     2020-03-20 
15:07:37.000000000 +0100
@@ -2,8 +2,8 @@
 .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.homba...@gmail.com>
 """
 
-
 import errno
+import os
 import shutil
 from typing import Optional
 
@@ -15,17 +15,20 @@
     def command(self):
         return self.__command
 
-    def __init__(self, command: str) -> None:
+    def __init__(self, command: str, follow_symlinks: bool = False) -> None:
         if not command:
-            raise CommandError(
-                "invalid command {}: ".format(command), cmd=command, 
errno=errno.EINVAL
-            )
+            raise ValueError("require a command")
 
         self.__command = command
+        self.__follow_symlinks = follow_symlinks
         self.__abspath = None  # type: Optional[str]
 
     def __repr__(self) -> str:
-        item_list = ["command={}".format(self.command), 
"is_exist={}".format(self.is_exist())]
+        item_list = [
+            "command={}".format(self.command),
+            "is_exist={}".format(self.is_exist()),
+            "follow_symlinks={}".format(self.__follow_symlinks),
+        ]
 
         if self.is_exist():
             item_list.append("abspath={}".format(self.abspath()))
@@ -33,7 +36,7 @@
         return ", ".join(item_list)
 
     def is_exist(self) -> bool:
-        return self.abspath() is not None
+        return self.abspath() is not None and 
os.path.exists(str(self.abspath()))
 
     def verify(self) -> None:
         if not self.is_exist():
@@ -46,5 +49,10 @@
             return self.__abspath
 
         self.__abspath = shutil.which(self.command)
+        if self.__abspath is None:
+            return self.__abspath
+
+        if self.__follow_symlinks and os.path.islink(self.__abspath):
+            self.__abspath = os.path.realpath(self.__abspath)
 
         return self.__abspath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/subprocrunner.egg-info/PKG-INFO 
new/subprocrunner-1.2.0/subprocrunner.egg-info/PKG-INFO
--- old/subprocrunner-1.1.0/subprocrunner.egg-info/PKG-INFO     2020-02-15 
15:40:19.000000000 +0100
+++ new/subprocrunner-1.2.0/subprocrunner.egg-info/PKG-INFO     2020-03-20 
15:43:11.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: subprocrunner
-Version: 1.1.0
+Version: 1.2.0
 Summary: A Python wrapper library for subprocess module.
 Home-page: https://github.com/thombashi/subprocrunner
 Author: Tsuyoshi Hombashi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/subprocrunner-1.1.0/subprocrunner.egg-info/SOURCES.txt 
new/subprocrunner-1.2.0/subprocrunner.egg-info/SOURCES.txt
--- old/subprocrunner-1.1.0/subprocrunner.egg-info/SOURCES.txt  2020-02-15 
15:40:19.000000000 +0100
+++ new/subprocrunner-1.2.0/subprocrunner.egg-info/SOURCES.txt  2020-03-20 
15:43:11.000000000 +0100
@@ -11,6 +11,7 @@
 subprocrunner/_subprocess_runner.py
 subprocrunner/_which.py
 subprocrunner/error.py
+subprocrunner/py.typed
 subprocrunner.egg-info/PKG-INFO
 subprocrunner.egg-info/SOURCES.txt
 subprocrunner.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/test/test_subproc_runner.py 
new/subprocrunner-1.2.0/test/test_subproc_runner.py
--- old/subprocrunner-1.1.0/test/test_subproc_runner.py 2020-02-14 
12:29:55.000000000 +0100
+++ new/subprocrunner-1.2.0/test/test_subproc_runner.py 2020-03-20 
15:32:33.000000000 +0100
@@ -74,7 +74,7 @@
         assert runner.stdout.strip() == expected
         assert is_null_string(runner.stderr)
 
-    @pytest.mark.skipif(platform.system() == "Windows", reason="platform 
dependent tests")
+    @pytest.mark.skip
     @pytest.mark.parametrize(
         ["command", "ignore_stderr_regexp", "out_regexp", "expected"],
         [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/test/test_which.py 
new/subprocrunner-1.2.0/test/test_which.py
--- old/subprocrunner-1.1.0/test/test_which.py  2020-02-12 07:54:18.000000000 
+0100
+++ new/subprocrunner-1.2.0/test/test_which.py  2020-03-20 15:37:33.000000000 
+0100
@@ -5,6 +5,7 @@
 
 import platform
 import re
+import sys
 
 import pytest
 from typepy import is_not_null_string
@@ -15,12 +16,7 @@
 
 class Test_Which_constructor:
     @pytest.mark.parametrize(
-        ["value", "expected"],
-        [
-            [0, subprocrunner.CommandError],
-            ["", subprocrunner.CommandError],
-            [None, subprocrunner.CommandError],
-        ],
+        ["value", "expected"], [[0, ValueError], ["", ValueError], [None, 
ValueError],],
     )
     def test_exception(self, value, expected):
         with pytest.raises(expected):
@@ -32,15 +28,22 @@
     @pytest.mark.parametrize(
         ["value", "expected_regexp"],
         [
-            ["ls", re.compile("^command=ls, is_exist=True, 
abspath=.*?bin/ls$")],
+            [
+                "ls",
+                re.compile("^command=ls, is_exist=True, follow_symlinks=False, 
abspath=.*?bin/ls$"),
+            ],
             [
                 "__not_exist_command__",
-                re.compile("^command=__not_exist_command__, is_exist=False$"),
+                re.compile(
+                    "^command=__not_exist_command__, is_exist=False, 
follow_symlinks=False$"
+                ),
             ],
         ],
     )
     def test_normal(self, value, expected_regexp):
-        assert expected_regexp.search(str(Which(value))) is not None
+        actual = str(Which(value))
+        print(actual, file=sys.stderr)
+        assert expected_regexp.search(actual) is not None
 
 
 class Test_Which_is_exist:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/subprocrunner-1.1.0/tox.ini 
new/subprocrunner-1.2.0/tox.ini
--- old/subprocrunner-1.1.0/tox.ini     2020-02-14 13:40:57.000000000 +0100
+++ new/subprocrunner-1.2.0/tox.ini     2020-03-20 04:12:39.000000000 +0100
@@ -30,7 +30,7 @@
 deps =
     cleanpy
 commands =
-    cleanpy --all .
+    cleanpy --all --exclude-envs .
 
 [testenv:cov]
 deps =
@@ -45,7 +45,7 @@
 deps =
     autoflake
     black
-    isort
+    isort[pyproject]
 commands =
     autoflake --in-place --recursive --remove-all-unused-imports 
--ignore-init-module-imports --exclude ".pytype" .
     isort --apply --recursive
@@ -68,6 +68,6 @@
 [testenv:release]
 basepython = python3.8
 deps =
-    releasecmd>=0.2.0
+    releasecmd>=0.3.1,<1
 commands =
     python setup.py release --sign {posargs}


Reply via email to