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-10-20 16:03:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 Oct 20 16:03:33 2022 rev:23 rq:1030158 version:0.7.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-osc-tiny/python-osc-tiny.changes
2022-10-08 01:23:36.406006966 +0200
+++
/work/SRC/openSUSE:Factory/.python-osc-tiny.new.2275/python-osc-tiny.changes
2022-10-20 16:03:33.971236529 +0200
@@ -1,0 +2,9 @@
+Thu Oct 20 08:12:01 UTC 2022 - Andreas Hasenkopf <[email protected]>
+
+- Release 0.7.6
+ * Treat `deleted` and `expand` parameters of `/source/<project>/`
+ as boolean (despite not being documented as such)
+ * Do not send the `deleted` parameter, when the `view` parameter
+ is present
+
+-------------------------------------------------------------------
Old:
----
osc-tiny-0.7.5.tar.gz
New:
----
osc-tiny-0.7.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-osc-tiny.spec ++++++
--- /var/tmp/diff_new_pack.Tcwvuj/_old 2022-10-20 16:03:34.507237365 +0200
+++ /var/tmp/diff_new_pack.Tcwvuj/_new 2022-10-20 16:03:34.515237377 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-osc-tiny
-Version: 0.7.5
+Version: 0.7.6
Release: 0
Summary: Client API for openSUSE BuildService
License: MIT
++++++ osc-tiny-0.7.5.tar.gz -> osc-tiny-0.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.7.5/PKG-INFO new/osc-tiny-0.7.6/PKG-INFO
--- old/osc-tiny-0.7.5/PKG-INFO 2022-10-07 16:09:26.133109000 +0200
+++ new/osc-tiny-0.7.6/PKG-INFO 2022-10-20 10:11:09.238565700 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osc-tiny
-Version: 0.7.5
+Version: 0.7.6
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.5/osc_tiny.egg-info/PKG-INFO
new/osc-tiny-0.7.6/osc_tiny.egg-info/PKG-INFO
--- old/osc-tiny-0.7.5/osc_tiny.egg-info/PKG-INFO 2022-10-07
16:09:26.000000000 +0200
+++ new/osc-tiny-0.7.6/osc_tiny.egg-info/PKG-INFO 2022-10-20
10:11:09.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osc-tiny
-Version: 0.7.5
+Version: 0.7.6
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.5/osctiny/__init__.py
new/osc-tiny-0.7.6/osctiny/__init__.py
--- old/osc-tiny-0.7.5/osctiny/__init__.py 2022-10-07 16:09:17.000000000
+0200
+++ new/osc-tiny-0.7.6/osctiny/__init__.py 2022-10-20 10:10:53.000000000
+0200
@@ -6,4 +6,4 @@
__all__ = ['Osc', 'bs_requests', 'buildresults', 'comments', 'packages',
'projects', 'search', 'users']
-__version__ = "0.7.5"
+__version__ = "0.7.6"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.7.5/osctiny/extensions/packages.py
new/osc-tiny-0.7.6/osctiny/extensions/packages.py
--- old/osc-tiny-0.7.5/osctiny/extensions/packages.py 2022-10-07
16:09:17.000000000 +0200
+++ new/osc-tiny-0.7.6/osctiny/extensions/packages.py 2022-10-20
10:10:53.000000000 +0200
@@ -32,14 +32,18 @@
.. versionadded::0.7.4
"""
- if params.get("view", None) == "info":
+ view = params.get("view", "")
+ if view == "info":
# The 'info' view is strict about parameter validation
return {key: value for key, value in params.items()
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")
+ return {key: value for key, value in params.items() if key not in
["deleted"]}
return params
- def get_list(self, project: str, deleted: bool = False, expand: bool =
True, **params):
+ def get_list(self, project: str, deleted: bool = False, expand: bool =
False, **params):
"""
Get packages from project
@@ -52,6 +56,9 @@
.. versionadded:: 0.7.4
Parameter ``params``
+ .. versionchanged:: 0.7.6
+ Changed default value of ``expand`` to ``False``
+
:param project: name of project
:param deleted: Show deleted packages instead
:param expand: Include inherited packages and their project of origin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.7.5/osctiny/tests/test_basic.py
new/osc-tiny-0.7.6/osctiny/tests/test_basic.py
--- old/osc-tiny-0.7.5/osctiny/tests/test_basic.py 2022-10-07
16:09:17.000000000 +0200
+++ new/osc-tiny-0.7.6/osctiny/tests/test_basic.py 2022-10-20
10:10:53.000000000 +0200
@@ -105,17 +105,29 @@
{"view": "xml", "deleted": True},
b"view=xml&deleted"
),
- # 'expand' is no boolean param in the project endpoint
+ # 'expand' is a boolean param in the project endpoint
(
{"expand": True},
- b"expand=1",
+ b"expand",
"https://api.example.com/source/PROJECT",
),
(
{"expand": False},
- b"expand=0",
+ b"",
"https://api.example.com/source/PROJECT",
),
+ # 'deleted' is a boolean param in the project endpoint
+ (
+ {"deleted": True},
+ b"deleted",
+ "https://api.example.com/source/PROJECT",
+ ),
+ (
+ {"deleted": False},
+ b"",
+ "https://api.example.com/source/PROJECT",
+ ),
+
# 'expand' is a boolean param in the package endpoint
(
{"expand": False},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.7.5/osctiny/utils/auth.py
new/osc-tiny-0.7.6/osctiny/utils/auth.py
--- old/osc-tiny-0.7.5/osctiny/utils/auth.py 2022-10-07 16:09:17.000000000
+0200
+++ new/osc-tiny-0.7.6/osctiny/utils/auth.py 2022-10-20 10:10:53.000000000
+0200
@@ -22,6 +22,39 @@
from .errors import OscError
+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
+
+ .. versionadded:: 0.7.6
+ """
+ # pylint: disable=protected-access
+ headers = [header
+ for header in
r.raw._original_response.headers.get_all("www-authenticate")
+ if "signature" in header.lower()]
+ if headers:
+ return headers[0]
+
+ return None
+
+
+def get_auth_header_from_response(r: Response) -> typing.Optional[str]:
+ """
+ Extract the "www-authenticate" header from the response
+
+ .. versionadded:: 0.7.6
+ """
+ headers = r.headers.get("www-authenticate")
+ if headers:
+ parts = headers.split(",")
+ start = [p for p in parts if "signature" in p.lower()]
+ if start:
+ start_index = parts.index(start[0])
+ return ",".join(parts[start_index:start_index + 2]).strip()
+
+ return None
+
+
class HttpSignatureAuth(HTTPDigestAuth):
"""
Implementation of the "Signature authentication scheme"
@@ -115,22 +148,14 @@
:return: Header text
"""
try:
- # pylint: disable=protected-access
- headers = [header
- for header in
r.raw._original_response.headers.get_all("www-authenticate")
- if "signature" in header.lower()]
- if headers:
- return headers[0]
+ header = get_auth_header_from_orignal_response(r)
except AttributeError:
- headers = r.headers.get("www-authenticate")
- if headers:
- parts = headers.split(",")
- start = [p for p in parts if "signature" in p.lower()]
- if start:
- start_index = parts.index(start[0])
- return ",".join(parts[start_index:start_index + 2]).strip()
+ header = get_auth_header_from_response(r)
+ else:
+ if header is None:
+ header = get_auth_header_from_response(r)
- return ""
+ return header if header is not None else ""
def _log(self, r: Response) -> None:
logger = logging.getLogger("osctiny.request")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.7.5/osctiny/utils/conf.py
new/osc-tiny-0.7.6/osctiny/utils/conf.py
--- old/osc-tiny-0.7.5/osctiny/utils/conf.py 2022-10-07 16:09:17.000000000
+0200
+++ new/osc-tiny-0.7.6/osctiny/utils/conf.py 2022-10-20 10:10:53.000000000
+0200
@@ -29,6 +29,9 @@
'POST': ('ignoredevel', 'add_repositories', 'noaccess',
'update_path_elements',
'extend_package_names', 'extend_package_names', 'keeplink',
'repairlink')
},
+ "^/source/[^/]+/?$": {
+ 'GET': ('expand', 'deleted'),
+ },
"^/source/[^/]+/[^/]+/[^/]+$": {
'PUT': ('keeplink',)
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osc-tiny-0.7.5/setup.py new/osc-tiny-0.7.6/setup.py
--- old/osc-tiny-0.7.5/setup.py 2022-10-07 16:09:17.000000000 +0200
+++ new/osc-tiny-0.7.6/setup.py 2022-10-20 10:10:53.000000000 +0200
@@ -26,7 +26,7 @@
setup(
name='osc-tiny',
- version='0.7.5',
+ version='0.7.6',
description='Client API for openSUSE BuildService',
long_description=long_description,
long_description_content_type="text/markdown",