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 2022-11-03 19:14:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-osc-tiny (Old) and /work/SRC/openSUSE:Factory/.python-osc-tiny.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-osc-tiny" Thu Nov 3 19:14:01 2022 rev:24 rq:1032915 version:0.7.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-osc-tiny/python-osc-tiny.changes 2022-10-20 16:03:33.971236529 +0200 +++ /work/SRC/openSUSE:Factory/.python-osc-tiny.new.2275/python-osc-tiny.changes 2022-11-03 19:14:28.724111325 +0100 @@ -1,0 +2,7 @@ +Wed Nov 2 12:07:32 UTC 2022 - Andreas Hasenkopf <ahasenk...@suse.com> + +- Release 0.7.7 + * Support for Python 3.11 + * Workaround for another parameter inconsistency in the API + +------------------------------------------------------------------- Old: ---- osc-tiny-0.7.6.tar.gz New: ---- osc-tiny-0.7.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-osc-tiny.spec ++++++ --- /var/tmp/diff_new_pack.QpwL7Q/_old 2022-11-03 19:14:29.244114383 +0100 +++ /var/tmp/diff_new_pack.QpwL7Q/_new 2022-11-03 19:14:29.252114430 +0100 @@ -16,10 +16,9 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-osc-tiny -Version: 0.7.6 +Version: 0.7.7 Release: 0 Summary: Client API for openSUSE BuildService License: MIT @@ -41,6 +40,7 @@ Requires: python-python-dateutil Requires: python-pytz Requires: python-requests +Requires: (python-cached-property if python-base < 3.8) Suggests: openssh BuildArch: noarch # Using 'if' instead of 'with' because the latter requires rpm >= 4.14 @@ -49,7 +49,6 @@ %else BuildRequires: %{python_module cached-property} %endif -Requires: (python-cached-property if python-base < 3.8) %python_subpackages %description @@ -78,6 +77,7 @@ %files %{python_files} %doc README.md %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/osctiny +%{python_sitelib}/osc_tiny-%{version}*-info %changelog ++++++ osc-tiny-0.7.6.tar.gz -> osc-tiny-0.7.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.7.6/PKG-INFO new/osc-tiny-0.7.7/PKG-INFO --- old/osc-tiny-0.7.6/PKG-INFO 2022-10-20 10:11:09.238565700 +0200 +++ new/osc-tiny-0.7.7/PKG-INFO 2022-11-02 13:06:41.584857200 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: osc-tiny -Version: 0.7.6 +Version: 0.7.7 Summary: Client API for openSUSE BuildService Home-page: http://github.com/crazyscientist/osc-tiny Download-URL: http://github.com/crazyscientist/osc-tiny/tarball/master @@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Description-Content-Type: text/markdown License-File: LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.7.6/osc_tiny.egg-info/PKG-INFO new/osc-tiny-0.7.7/osc_tiny.egg-info/PKG-INFO --- old/osc-tiny-0.7.6/osc_tiny.egg-info/PKG-INFO 2022-10-20 10:11:09.000000000 +0200 +++ new/osc-tiny-0.7.7/osc_tiny.egg-info/PKG-INFO 2022-11-02 13:06:41.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: osc-tiny -Version: 0.7.6 +Version: 0.7.7 Summary: Client API for openSUSE BuildService Home-page: http://github.com/crazyscientist/osc-tiny Download-URL: http://github.com/crazyscientist/osc-tiny/tarball/master @@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Description-Content-Type: text/markdown License-File: LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.7.6/osctiny/__init__.py new/osc-tiny-0.7.7/osctiny/__init__.py --- old/osc-tiny-0.7.6/osctiny/__init__.py 2022-10-20 10:10:53.000000000 +0200 +++ new/osc-tiny-0.7.7/osctiny/__init__.py 2022-11-02 13:06:32.000000000 +0100 @@ -6,4 +6,4 @@ __all__ = ['Osc', 'bs_requests', 'buildresults', 'comments', 'packages', 'projects', 'search', 'users'] -__version__ = "0.7.6" +__version__ = "0.7.7" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.7.6/osctiny/extensions/packages.py new/osc-tiny-0.7.7/osctiny/extensions/packages.py --- old/osc-tiny-0.7.6/osctiny/extensions/packages.py 2022-10-20 10:10:53.000000000 +0200 +++ new/osc-tiny-0.7.7/osctiny/extensions/packages.py 2022-11-02 13:06:32.000000000 +0100 @@ -3,6 +3,7 @@ ------------------ """ import os +import typing from urllib.parse import urljoin from lxml.etree import tounicode, SubElement, Element @@ -20,7 +21,7 @@ new_package_meta_templ = "<package><title/><description/></package>" @staticmethod - def cleanup_params(**params) -> dict: + def cleanup_params(**params) -> typing.Union[dict, str]: """ Prepare query parameters @@ -30,7 +31,10 @@ :param params: Query parameters :return: The original dictionary of query parameters or a subset of it - .. versionadded::0.7.4 + .. versionadded:: 0.7.4 + + .. versionchanged:: 0.7.7 + Handle more inconsistencies in the API endpoints """ view = params.get("view", "") if view == "info": @@ -40,7 +44,8 @@ if "productlist" in view: # The "deleted" parameter seems to have precedence over other acceptable parameters # (e.g. "view") - return {key: value for key, value in params.items() if key not in ["deleted"]} + # Also, in views boolean params are not recognized as such + return f"view={view}&expand=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.6/osctiny/osc.py new/osc-tiny-0.7.7/osctiny/osc.py --- old/osc-tiny-0.7.6/osctiny/osc.py 2022-10-20 10:10:53.000000000 +0200 +++ new/osc-tiny-0.7.7/osctiny/osc.py 2022-11-02 13:06:32.000000000 +0100 @@ -373,7 +373,9 @@ return () - def handle_params(self, url, method, params): + def handle_params(self, url: str, method: str, + params: typing.Union[bytes, str, StringIO, BytesIO, BufferedReader, dict]) \ + -> bytes: """ Translate request parameters to API conform format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.7.6/osctiny/tests/test_packages.py new/osc-tiny-0.7.7/osctiny/tests/test_packages.py --- old/osc-tiny-0.7.6/osctiny/tests/test_packages.py 2022-10-20 10:10:53.000000000 +0200 +++ new/osc-tiny-0.7.7/osctiny/tests/test_packages.py 2022-11-02 13:06:32.000000000 +0100 @@ -394,7 +394,6 @@ comment=the_comment) self.assertEqual(received_params[-1]["comment"], [the_comment]) - @responses.activate def test_aggregate(self): put_called = [] @@ -479,3 +478,28 @@ "test:project2:exists", "test.pkg", ) self.assertEqual(len(put_called), old_len + 1) + + def test_cleanup_params(self): + with self.subTest("No view"): + params = {"deleted": True, "expand": True} + self.assertEqual(params, self.osc.packages.cleanup_params(**params)) + + with self.subTest("view=info"): + self.assertEqual({"view": "info"}, + self.osc.packages.cleanup_params(view="info", deleted=True)) + + with self.subTest("view=productlist"): + expected = "view=productlist&expand=0" + self.assertEqual(expected, + self.osc.packages.cleanup_params(view="productlist", deleted=True)) + self.assertEqual(expected, + self.osc.packages.cleanup_params(view="productlist", expand=True)) + + with self.subTest("view=verboseproductlist"): + expected = "view=verboseproductlist&expand=0" + self.assertEqual(expected, + self.osc.packages.cleanup_params(view="verboseproductlist", + deleted=True)) + self.assertEqual(expected, + self.osc.packages.cleanup_params(view="verboseproductlist", + expand=True)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.7.6/setup.py new/osc-tiny-0.7.7/setup.py --- old/osc-tiny-0.7.6/setup.py 2022-10-20 10:10:53.000000000 +0200 +++ new/osc-tiny-0.7.7/setup.py 2022-11-02 13:06:32.000000000 +0100 @@ -26,7 +26,7 @@ setup( name='osc-tiny', - version='0.7.6', + version='0.7.7', description='Client API for openSUSE BuildService', long_description=long_description, long_description_content_type="text/markdown", @@ -48,5 +48,6 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] )