commit python-osc-tiny for openSUSE:Factory
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 2024-06-29 15:16:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-osc-tiny (Old) and /work/SRC/openSUSE:Factory/.python-osc-tiny.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-osc-tiny" Sat Jun 29 15:16:55 2024 rev:35 rq:1183868 version:0.10.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-osc-tiny/python-osc-tiny.changes 2024-06-28 15:51:23.487491514 +0200 +++ /work/SRC/openSUSE:Factory/.python-osc-tiny.new.18349/python-osc-tiny.changes 2024-06-29 15:17:19.916016916 +0200 @@ -1,0 +2,6 @@ +Fri Jun 28 14:49:52 UTC 2024 - Chen Huang <chhuang@suse.com> + +- Release 0.10.1 + * Include description in request creation + +------------------------------------------------------------------- Old: ---- osc-tiny-0.10.0.tar.gz New: ---- osc-tiny-0.10.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-osc-tiny.spec ++++++ --- /var/tmp/diff_new_pack.tyCTlo/_old 2024-06-29 15:17:20.464036857 +0200 +++ /var/tmp/diff_new_pack.tyCTlo/_new 2024-06-29 15:17:20.464036857 +0200 @@ -19,7 +19,7 @@ %define skip_python2 1 %{?sle15allpythons} Name: python-osc-tiny -Version: 0.10.0 +Version: 0.10.1 Release: 0 Summary: Client API for openSUSE BuildService License: MIT ++++++ osc-tiny-0.10.0.tar.gz -> osc-tiny-0.10.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.10.0/PKG-INFO new/osc-tiny-0.10.1/PKG-INFO --- old/osc-tiny-0.10.0/PKG-INFO 2024-06-27 13:00:45.511684400 +0200 +++ new/osc-tiny-0.10.1/PKG-INFO 2024-06-28 15:50:04.036332400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: osc-tiny -Version: 0.10.0 +Version: 0.10.1 Summary: Client API for openSUSE BuildService Home-page: https://github.com/SUSE/osc-tiny Author: Andreas Hasenkopf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.10.0/osc_tiny.egg-info/PKG-INFO new/osc-tiny-0.10.1/osc_tiny.egg-info/PKG-INFO --- old/osc-tiny-0.10.0/osc_tiny.egg-info/PKG-INFO 2024-06-27 13:00:45.000000000 +0200 +++ new/osc-tiny-0.10.1/osc_tiny.egg-info/PKG-INFO 2024-06-28 15:50:04.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: osc-tiny -Version: 0.10.0 +Version: 0.10.1 Summary: Client API for openSUSE BuildService Home-page: https://github.com/SUSE/osc-tiny Author: Andreas Hasenkopf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.10.0/osctiny/__init__.py new/osc-tiny-0.10.1/osctiny/__init__.py --- old/osc-tiny-0.10.0/osctiny/__init__.py 2024-06-27 13:00:41.000000000 +0200 +++ new/osc-tiny-0.10.1/osctiny/__init__.py 2024-06-28 15:50:00.000000000 +0200 @@ -6,4 +6,4 @@ __all__ = ['Osc', 'bs_requests', 'buildresults', 'comments', 'packages', 'projects', 'search', 'users'] -__version__ = "0.10.0" +__version__ = "0.10.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.10.0/osctiny/extensions/bs_requests.py new/osc-tiny-0.10.1/osctiny/extensions/bs_requests.py --- old/osc-tiny-0.10.0/osctiny/extensions/bs_requests.py 2024-06-27 13:00:41.000000000 +0200 +++ new/osc-tiny-0.10.1/osctiny/extensions/bs_requests.py 2024-06-28 15:50:00.000000000 +0200 @@ -31,6 +31,7 @@ # pylint: disable=too-many-arguments def create(self, actions: typing.Iterable[Action], reviewers: typing.Optional[typing.Iterable[Review]] = None, + description: typing.Optional[str] = None, addrevision: bool = False, ignore_delegate: bool = False, ignore_build_state: bool = False) -> int: """ @@ -38,6 +39,7 @@ :param actions: Actions to be included in request :param reviewers: Reviewers to be assigned + :param description: Description text :param addrevision: Ask the server to add revisions of the current sources to the request. :param ignore_delegate: Enforce a new package instance in a project which has ``OBS:DelegateRequestTarget`` set @@ -45,9 +47,16 @@ :return: Request ID .. versionadded:: 0.10.0 + + .. versionchanged:: 0.10.1 + Added the ``description`` parameter. """ - request = E.request(*(action.asxml() for action in actions), - *(review.asxml() for review in reviewers or [])) + sub_elements = [action.asxml() for action in actions] + if reviewers: + sub_elements += [review.asxml() for review in reviewers] + if description: + sub_elements.append(E.description(description)) + request = E.request(*sub_elements) response = self.osc.request( url=urljoin(self.osc.url, self.base_path), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.10.0/osctiny/tests/test_requests.py new/osc-tiny-0.10.1/osctiny/tests/test_requests.py --- old/osc-tiny-0.10.0/osctiny/tests/test_requests.py 2024-06-27 13:00:41.000000000 +0200 +++ new/osc-tiny-0.10.1/osctiny/tests/test_requests.py 2024-06-28 15:50:00.000000000 +0200 @@ -374,6 +374,9 @@ self.assertEqual(42, self.osc.requests.create(actions=actions, reviewers=reviewers)) + with self.subTest("HTTP Request, with description"): + self.assertEqual(42, self.osc.requests.create(actions=actions, description="Foo")) + mock_response = Response() mock_response.status_code = 200 mock_response._content = b"""<request id="42"/>""" @@ -433,6 +436,26 @@ b'</request>' ) + with self.subTest("XML content, with description"), \ + mock.patch.object(self.osc.session, "send", + return_value=mock_response) as mock_session: + self.osc.requests.create(actions=actions, description="Foo") + self.assertEqual( + mock_session.call_args[0][0].body, + b"<?xml version='1.0' encoding='utf-8'?>\n" + b'<request>' + b'<action type="submit">' + b'<target project="Foo:Bar:Factory" package="hello-world"/>' + b'<source project="Foo:Bar" package="hello-world"/>' + b'</action>' + b'<action type="delete">' + b'<target project="Foo:Bar:Factory" package="hello-world"/>' + b'</action>' + b'<description>Foo</description>' + b'</request>' + ) + + @responses.activate def test_get_list(self): response = self.osc.requests.get_list() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-tiny-0.10.0/setup.py new/osc-tiny-0.10.1/setup.py --- old/osc-tiny-0.10.0/setup.py 2024-06-27 13:00:41.000000000 +0200 +++ new/osc-tiny-0.10.1/setup.py 2024-06-28 15:50:00.000000000 +0200 @@ -26,7 +26,7 @@ setup( name='osc-tiny', - version='0.10.0', + version='0.10.1', description='Client API for openSUSE BuildService', long_description=long_description, long_description_content_type="text/markdown",
participants (1)
-
Source-Sync