Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-osc-tiny for openSUSE:Factory 
checked in at 2023-01-09 17:24:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-osc-tiny (Old)
 and      /work/SRC/openSUSE:Factory/.python-osc-tiny.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-osc-tiny"

Mon Jan  9 17:24:16 2023 rev:27 rq:1057070 version:0.7.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-osc-tiny/python-osc-tiny.changes  
2023-01-02 15:02:34.193486341 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-osc-tiny.new.32243/python-osc-tiny.changes   
    2023-01-09 17:24:18.947332699 +0100
@@ -1,0 +2,8 @@
+Mon Jan  9 08:44:37 UTC 2023 - Andreas Hasenkopf <ahasenk...@suse.com>
+
+- Release 0.7.11
+  * Make it possible to force setting meta
+  * Improved strong authentication method
+  * Support product list views honoring the `expand` parameter
+
+-------------------------------------------------------------------

Old:
----
  osc-tiny-0.7.10.tar.gz

New:
----
  osc-tiny-0.7.11.tar.gz

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

Other differences:
------------------
++++++ python-osc-tiny.spec ++++++
--- /var/tmp/diff_new_pack.TxGqSp/_old  2023-01-09 17:24:19.387335190 +0100
+++ /var/tmp/diff_new_pack.TxGqSp/_new  2023-01-09 17:24:19.391335212 +0100
@@ -18,7 +18,7 @@
 
 %define skip_python2 1
 Name:           python-osc-tiny
-Version:        0.7.10
+Version:        0.7.11
 Release:        0
 Summary:        Client API for openSUSE BuildService
 License:        MIT

++++++ osc-tiny-0.7.10.tar.gz -> osc-tiny-0.7.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/PKG-INFO new/osc-tiny-0.7.11/PKG-INFO
--- old/osc-tiny-0.7.10/PKG-INFO        2023-01-02 10:27:08.909208300 +0100
+++ new/osc-tiny-0.7.11/PKG-INFO        2023-01-09 09:43:30.914676200 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: osc-tiny
-Version: 0.7.10
+Version: 0.7.11
 Summary: Client API for openSUSE BuildService
 Home-page: http://github.com/crazyscientist/osc-tiny
 Download-URL: http://github.com/crazyscientist/osc-tiny/tarball/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osc_tiny.egg-info/PKG-INFO 
new/osc-tiny-0.7.11/osc_tiny.egg-info/PKG-INFO
--- old/osc-tiny-0.7.10/osc_tiny.egg-info/PKG-INFO      2023-01-02 
10:27:08.000000000 +0100
+++ new/osc-tiny-0.7.11/osc_tiny.egg-info/PKG-INFO      2023-01-09 
09:43:30.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: osc-tiny
-Version: 0.7.10
+Version: 0.7.11
 Summary: Client API for openSUSE BuildService
 Home-page: http://github.com/crazyscientist/osc-tiny
 Download-URL: http://github.com/crazyscientist/osc-tiny/tarball/master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osctiny/__init__.py 
new/osc-tiny-0.7.11/osctiny/__init__.py
--- old/osc-tiny-0.7.10/osctiny/__init__.py     2023-01-02 10:26:59.000000000 
+0100
+++ new/osc-tiny-0.7.11/osctiny/__init__.py     2023-01-09 09:43:21.000000000 
+0100
@@ -6,4 +6,4 @@
 
 __all__ = ['Osc', 'bs_requests', 'buildresults', 'comments', 'packages',
            'projects', 'search', 'users']
-__version__ = "0.7.10"
+__version__ = "0.7.11"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osctiny/extensions/packages.py 
new/osc-tiny-0.7.11/osctiny/extensions/packages.py
--- old/osc-tiny-0.7.10/osctiny/extensions/packages.py  2023-01-02 
10:26:59.000000000 +0100
+++ new/osc-tiny-0.7.11/osctiny/extensions/packages.py  2023-01-09 
09:43:21.000000000 +0100
@@ -43,9 +43,9 @@
                     if key in ["parse", "arch", "repository", "view"]}
         if "productlist" in view:
             # The "deleted" parameter seems to have precedence over other 
acceptable parameters
-            # (e.g. "view")
-            # Also, in views boolean params are not recognized as such
-            return f"view={view}&expand=0"
+            # (e.g. "view").
+            # Product list views now honor the `expand` parameter.
+            return f"view={view}&expand={'1' if params.get('expand') else '0'}"
         return params
 
     def get_list(self, project: str, deleted: bool = False, expand: bool = 
False, **params):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osctiny/extensions/projects.py 
new/osc-tiny-0.7.11/osctiny/extensions/projects.py
--- old/osc-tiny-0.7.10/osctiny/extensions/projects.py  2023-01-02 
10:26:59.000000000 +0100
+++ new/osc-tiny-0.7.11/osctiny/extensions/projects.py  2023-01-09 
09:43:21.000000000 +0100
@@ -90,7 +90,7 @@
 
     # pylint: disable=too-many-arguments
     def set_meta(self, project, metafile=None, title=None, description=None,
-                 bugowner=None, maintainer=None, comment=None):
+                 bugowner=None, maintainer=None, comment=None, force=False):
         """
         Edit project meta data or create a new project
 
@@ -102,6 +102,11 @@
 
            Added an optional ``comment`` argument to be used as commit message
 
+        .. versionchanged:: 0.7.11
+
+            Added an optional ``force`` argument to allow changing the meta 
even when IBS reports
+            repository dependency problems
+
         :param project: name of project
         :param metafile: Complete metafile
         :type metafile: str or ElementTree
@@ -110,6 +115,7 @@
         :param bugowner: Bugowner for meta file
         :param maintainer: Maintainer for meta file
         :param comment: Optional comment to use as commit message
+        :param force:  Whether to force a meta change, even if there are repo 
dependency errors
         :return: ``True``, if successful. Otherwise API response
         :rtype: bool or lxml.objectify.ObjectifiedElement
         """
@@ -150,7 +156,7 @@
                         "/".join((self.base_path, project, "_meta"))),
             method="PUT",
             data=tounicode(metafile),
-            params={"comment": comment}
+            params={"comment": comment, "force": force}
         )
 
         parsed = self.osc.get_objectified_xml(response)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osctiny/tests/test_packages.py 
new/osc-tiny-0.7.11/osctiny/tests/test_packages.py
--- old/osc-tiny-0.7.10/osctiny/tests/test_packages.py  2023-01-02 
10:26:59.000000000 +0100
+++ new/osc-tiny-0.7.11/osctiny/tests/test_packages.py  2023-01-09 
09:43:21.000000000 +0100
@@ -507,18 +507,16 @@
                              self.osc.packages.cleanup_params(view="info", 
deleted=True))
 
         with self.subTest("view=productlist"):
-            expected = "view=productlist&expand=0"
-            self.assertEqual(expected,
+            self.assertEqual("view=productlist&expand=0",
                              
self.osc.packages.cleanup_params(view="productlist", deleted=True))
-            self.assertEqual(expected,
+            self.assertEqual("view=productlist&expand=1",
                              
self.osc.packages.cleanup_params(view="productlist", expand=True))
 
         with self.subTest("view=verboseproductlist"):
-            expected = "view=verboseproductlist&expand=0"
-            self.assertEqual(expected,
+            self.assertEqual("view=verboseproductlist&expand=0",
                              
self.osc.packages.cleanup_params(view="verboseproductlist",
                                                               deleted=True))
-            self.assertEqual(expected,
+            self.assertEqual("view=verboseproductlist&expand=1",
                              
self.osc.packages.cleanup_params(view="verboseproductlist",
                                                               expand=True))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osctiny/tests/test_projects.py 
new/osc-tiny-0.7.11/osctiny/tests/test_projects.py
--- old/osc-tiny-0.7.10/osctiny/tests/test_projects.py  2023-01-02 
10:26:59.000000000 +0100
+++ new/osc-tiny-0.7.11/osctiny/tests/test_projects.py  2023-01-09 
09:43:21.000000000 +0100
@@ -185,6 +185,19 @@
                                                        comment="Test"))
             self.assertEqual(responses.calls[-1].request.params["comment"], 
"Test")
 
+        with self.subTest("Valid Metafile with force=True"):
+            meta = fromstring(TEMPLATE_META)
+            meta.set("name", "project:foo")
+            meta.title._setText("Hello World")
+            self.assertTrue(self.osc.projects.set_meta(project="project:foo", 
metafile=meta,
+                                                       force=True))
+            self.assertEqual(responses.calls[-1].request.params["force"], "1")
+
+            # just to make sure try and check that omitting the force 
parameter don't get it set to
+            # True
+            self.assertTrue(self.osc.projects.set_meta(project="project:foo", 
metafile=meta))
+            self.assertEqual(responses.calls[-1].request.params["force"], "0")
+
     @responses.activate
     def test_get_files(self):
         def callback(headers, params, request):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/osctiny/utils/auth.py 
new/osc-tiny-0.7.11/osctiny/utils/auth.py
--- old/osc-tiny-0.7.10/osctiny/utils/auth.py   2023-01-02 10:26:59.000000000 
+0100
+++ new/osc-tiny-0.7.11/osctiny/utils/auth.py   2023-01-09 09:43:21.000000000 
+0100
@@ -7,6 +7,7 @@
 import typing
 from base64 import b64decode, b64encode
 import logging
+import os
 from pathlib import Path
 from subprocess import Popen, PIPE, DEVNULL
 import re
@@ -21,6 +22,12 @@
 from .errors import OscError
 
 
+SSH_ENV = os.environ.copy()
+for env_var in ("SSH_AUTH_SOCK", "SSH_AGENT_PID"):
+    if env_var in SSH_ENV:
+        del SSH_ENV[env_var]
+
+
 def get_auth_header_from_orignal_response(r: Response) -> typing.Optional[str]:
     """
     Extract the "www-authenticate" header from the private original response 
attribute of a response
@@ -77,7 +84,8 @@
     if password:
         cmd += ['-P', password]
 
-    with Popen(cmd, stdin=DEVNULL, stderr=PIPE, stdout=DEVNULL) as proc:
+    with Popen(cmd, stdin=DEVNULL, stderr=PIPE, stdout=DEVNULL,
+               env=SSH_ENV if password else os.environ) as proc:
         _, error = proc.communicate()
         if proc.returncode == 0:
             return True, None
@@ -149,7 +157,8 @@
             cmd += ['-P', self.password]
 
         encoding = sys.getdefaultencoding()
-        with Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE) as proc:
+        with Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE,
+                   env=SSH_ENV if self.password else os.environ) as proc:
             signature, error = proc.communicate(data.encode(encoding))
             if proc.returncode:
                 raise OscError(f"ssh-keygen returned {proc.returncode}: 
{error}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-tiny-0.7.10/setup.py new/osc-tiny-0.7.11/setup.py
--- old/osc-tiny-0.7.10/setup.py        2023-01-02 10:26:59.000000000 +0100
+++ new/osc-tiny-0.7.11/setup.py        2023-01-09 09:43:21.000000000 +0100
@@ -26,7 +26,7 @@
 
 setup(
     name='osc-tiny',
-    version='0.7.10',
+    version='0.7.11',
     description='Client API for openSUSE BuildService',
     long_description=long_description,
     long_description_content_type="text/markdown",

Reply via email to