Hello community,
here is the log from the commit of package python-osc-tiny for openSUSE:Factory
checked in at 2020-09-15 16:33:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-osc-tiny (Old)
and /work/SRC/openSUSE:Factory/.python-osc-tiny.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-osc-tiny"
Tue Sep 15 16:33:59 2020 rev:7 rq:834590 version:0.2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-osc-tiny/python-osc-tiny.changes
2020-06-29 21:18:02.909725175 +0200
+++
/work/SRC/openSUSE:Factory/.python-osc-tiny.new.4249/python-osc-tiny.changes
2020-09-15 16:34:36.234959474 +0200
@@ -1,0 +2,8 @@
+Tue Sep 15 10:52:18 UTC 2020 - Andreas Hasenkopf <[email protected]>
+
+- version update to 0.2.4
+ * Added osctiny.extensions.buildresults.Build.get_binary()
+ * Added osctiny.extensions.buildresults.Build.get_package_list()
+ * Changed osctiny.osc.Osc.get_objectified_xml() to accept request objects
and strings
+
+-------------------------------------------------------------------
Old:
----
osc-tiny-0.2.3.tar.gz
New:
----
osc-tiny-0.2.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-osc-tiny.spec ++++++
--- /var/tmp/diff_new_pack.ezl0U4/_old 2020-09-15 16:34:36.750959968 +0200
+++ /var/tmp/diff_new_pack.ezl0U4/_new 2020-09-15 16:34:36.750959968 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-osc-tiny
-Version: 0.2.3
+Version: 0.2.4
Release: 0
Summary: Client API for openSUSE BuildService
License: MIT
++++++ osc-tiny-0.2.3.tar.gz -> osc-tiny-0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.2.3/PKG-INFO new/osc-tiny-0.2.4/PKG-INFO
--- old/osc-tiny-0.2.3/PKG-INFO 2020-06-15 16:20:25.000000000 +0200
+++ new/osc-tiny-0.2.4/PKG-INFO 2020-09-09 16:48:09.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osc-tiny
-Version: 0.2.3
+Version: 0.2.4
Summary: Client API for openSUSE BuildService
Home-page: http://github.com/crazyscientist/osc-tiny
Author: Andreas Hasenkopf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.2.3/osc_tiny.egg-info/PKG-INFO
new/osc-tiny-0.2.4/osc_tiny.egg-info/PKG-INFO
--- old/osc-tiny-0.2.3/osc_tiny.egg-info/PKG-INFO 2020-06-15
16:20:24.000000000 +0200
+++ new/osc-tiny-0.2.4/osc_tiny.egg-info/PKG-INFO 2020-09-09
16:48:09.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osc-tiny
-Version: 0.2.3
+Version: 0.2.4
Summary: Client API for openSUSE BuildService
Home-page: http://github.com/crazyscientist/osc-tiny
Author: Andreas Hasenkopf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.2.3/osctiny/__init__.py
new/osc-tiny-0.2.4/osctiny/__init__.py
--- old/osc-tiny-0.2.3/osctiny/__init__.py 2020-06-15 16:20:04.000000000
+0200
+++ new/osc-tiny-0.2.4/osctiny/__init__.py 2020-09-09 16:47:47.000000000
+0200
@@ -6,4 +6,4 @@
__all__ = ['Osc', 'bs_requests', 'buildresults', 'comments', 'packages',
'projects', 'search', 'users']
-__version__ = "0.2.3"
+__version__ = "0.2.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.2.3/osctiny/extensions/buildresults.py
new/osc-tiny-0.2.4/osctiny/extensions/buildresults.py
--- old/osc-tiny-0.2.3/osctiny/extensions/buildresults.py 2020-06-15
16:20:04.000000000 +0200
+++ new/osc-tiny-0.2.4/osctiny/extensions/buildresults.py 2020-09-09
16:47:47.000000000 +0200
@@ -45,6 +45,27 @@
return self.osc.get_objectified_xml(response)
+ def get_package_list(self, project, repo, arch):
+ """
+ Get a list of packages for which build results exist
+
+ :param project: Project name
+ :param repo: Repository name
+ :param arch: Architecture name
+ :return: Objectified XML element
+ :rtype: lxml.objectify.ObjectifiedElement
+
+ .. versionadded:: 0.2.4
+ """
+ response = self.osc.request(
+ method="GET",
+ url=urljoin(self.osc.url, "{}/{}/{}/{}".format(
+ self.base_path, project, repo, arch
+ ))
+ )
+
+ return self.osc.get_objectified_xml(response)
+
def get_binary_list(self, project, repo, arch, package, **params):
"""
Get a list of built RPMs
@@ -68,3 +89,27 @@
)
return self.osc.get_objectified_xml(response)
+
+ # pylint: disable=too-many-arguments
+ def get_binary(self, project, repo, arch, package, filename):
+ """
+ Get the build binary file
+
+ :param project: Project name
+ :param repo: Repository name
+ :param arch: Architecture name
+ :param package: Package name
+ :param filename: File name
+ :return: Raw response
+ :rtype: str
+
+ .. versionadded:: 0.2.4
+ """
+ response = self.osc.request(
+ method="GET",
+ url=urljoin(self.osc.url, "{}/{}/{}/{}/{}/{}".format(
+ self.base_path, project, repo, arch, package, filename
+ )),
+ )
+
+ return response.text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.2.3/osctiny/osc.py
new/osc-tiny-0.2.4/osctiny/osc.py
--- old/osc-tiny-0.2.3/osctiny/osc.py 2020-06-15 16:20:04.000000000 +0200
+++ new/osc-tiny-0.2.4/osctiny/osc.py 2020-09-09 16:47:47.000000000 +0200
@@ -269,21 +269,31 @@
Return API response as an XML object
.. versionchanged:: 0.1.6
+
Allow parsing of "huge" XML inputs
- :param response: An API response
+ .. versionchanged:: 0.2.4
+
+ Allow ``response`` to be a string
+
+ :param response: An API response or XML string
:rtype response: :py:class:`requests.Response`
:return: :py:class:`lxml.objectify.ObjectifiedElement`
"""
+ if isinstance(response, text_type):
+ text = response
+ else:
+ text = response.text
+
try:
- return fromstring(response.text, self.parser)
+ return fromstring(text, self.parser)
except ValueError:
# Just in case OBS returns a Unicode string with encoding
# declaration
- if isinstance(response.text, text_type) and \
- "encoding=" in response.text:
+ if isinstance(text, text_type) and \
+ "encoding=" in text:
return fromstring(
- re.sub(r'encoding="[^"]+"', "", response.text)
+ re.sub(r'encoding="[^"]+"', "", text)
)
# This might be something else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.2.3/setup.py new/osc-tiny-0.2.4/setup.py
--- old/osc-tiny-0.2.3/setup.py 2020-06-15 16:20:04.000000000 +0200
+++ new/osc-tiny-0.2.4/setup.py 2020-09-09 16:47:47.000000000 +0200
@@ -22,7 +22,7 @@
setup(
name='osc-tiny',
- version='0.2.3',
+ version='0.2.4',
description='Client API for openSUSE BuildService',
long_description=long_description,
long_description_content_type="text/markdown",