Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package osc for openSUSE:Factory checked in at 2023-05-25 23:52:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osc (Old) and /work/SRC/openSUSE:Factory/.osc.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc" Thu May 25 23:52:55 2023 rev:178 rq:1089016 version:1.1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/osc/osc.changes 2023-05-10 17:38:19.535278023 +0200 +++ /work/SRC/openSUSE:Factory/.osc.new.1533/osc.changes 2023-05-25 23:53:05.851808525 +0200 @@ -1,0 +2,13 @@ +Wed May 24 07:02:31 UTC 2023 - Daniel Mach <daniel.m...@suse.com> + +- 1.1.4 + - Command-line: + - Change 'review list' command to display open requests (state: new, review, declined) + - Fix running osc in an AppImage by switching to the correct working directory + - Handle ProtocolError exception + - Library: + - Add 'req_states' parameter to osc.core.get_review_list() + - Connection: + - Fix grabber to work with old urllib3 versions that do not contain URLSchemeUnknown exception + +------------------------------------------------------------------- Old: ---- osc-1.1.3.tar.gz New: ---- osc-1.1.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osc.spec ++++++ --- /var/tmp/diff_new_pack.y7Czlh/_old 2023-05-25 23:53:06.439811977 +0200 +++ /var/tmp/diff_new_pack.y7Czlh/_new 2023-05-25 23:53:06.443812001 +0200 @@ -49,7 +49,7 @@ %endif Name: osc -Version: 1.1.3 +Version: 1.1.4 Release: 0 Summary: Command-line client for the Open Build Service License: GPL-2.0-or-later ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.y7Czlh/_old 2023-05-25 23:53:06.475812189 +0200 +++ /var/tmp/diff_new_pack.y7Czlh/_new 2023-05-25 23:53:06.479812212 +0200 @@ -1,5 +1,5 @@ pkgname=osc -pkgver=1.1.3 +pkgver=1.1.4 pkgrel=0 pkgdesc="Command-line client for the Open Build Service" arch=('x86_64') ++++++ appimage.yml ++++++ --- /var/tmp/diff_new_pack.y7Czlh/_old 2023-05-25 23:53:06.511812400 +0200 +++ /var/tmp/diff_new_pack.y7Czlh/_new 2023-05-25 23:53:06.515812424 +0200 @@ -8,15 +8,18 @@ packages: - build - osc - - python-yaml + - obs-scm-bridge + - obs-service-download_files + - obs-service-format_spec_file - obs-service-obs_scm - - obs-service-tar_scm - - obs-service-set_version - obs-service-recompress + - obs-service-set_version + - obs-service-tar_scm + - obs-service-verify_file - openSUSE-release - openSUSE-release-ftp - rsync - + script: - mkdir -p $BUILD_APPDIR/usr/share/pixmaps - cp /usr/share/pixmaps/appimage.png $BUILD_APPDIR/usr/share/pixmaps @@ -27,8 +30,8 @@ - echo "Icon=appimage" >> $BUILD_APPDIR/usr/share/applications/osc.desktop - echo "Categories=Development" >> $BUILD_APPDIR/usr/share/applications/osc.desktop - echo "Type=Application" >> $BUILD_APPDIR/usr/share/applications/osc.desktop -# - sed -i -e 's,^#!/usr/bin/python,#!/usr/bin/env python,' $BUILD_APPDIR/usr/bin/osc + # /usr/bin/python3 would run system python3 with libs from the appimage + # while /usr/bin/env python3 uses the correct binary from the appimage + - sed -i -e 's,^#!/usr/bin/python3,#!/usr/bin/env python3,' $BUILD_APPDIR/usr/bin/osc - linuxdeployqt $BUILD_APPDIR/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=2 - - ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.y7Czlh/_old 2023-05-25 23:53:06.531812518 +0200 +++ /var/tmp/diff_new_pack.y7Czlh/_new 2023-05-25 23:53:06.535812541 +0200 @@ -1,4 +1,4 @@ -osc (1.1.3-0) unstable; urgency=low +osc (1.1.4-0) unstable; urgency=low * Placeholder ++++++ osc-1.1.3.tar.gz -> osc-1.1.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/NEWS new/osc-1.1.4/NEWS --- old/osc-1.1.3/NEWS 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/NEWS 2023-05-24 08:59:45.000000000 +0200 @@ -1,3 +1,13 @@ +- 1.1.4 + - Command-line: + - Change 'review list' command to display open requests (state: new, review, declined) + - Fix running osc in an AppImage by switching to the correct working directory + - Handle ProtocolError exception + - Library: + - Add 'req_states' parameter to osc.core.get_review_list() + - Connection: + - Fix grabber to work with old urllib3 versions that do not contain URLSchemeUnknown exception + - 1.1.3 - Command-line: - Backup edited messages and notify user about them when osc errors out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/osc/__init__.py new/osc-1.1.4/osc/__init__.py --- old/osc-1.1.3/osc/__init__.py 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/osc/__init__.py 2023-05-24 08:59:45.000000000 +0200 @@ -13,7 +13,7 @@ from .util import git_version -__version__ = git_version.get_version('1.1.3') +__version__ = git_version.get_version('1.1.4') # vim: sw=4 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/osc/babysitter.py new/osc-1.1.4/osc/babysitter.py --- old/osc-1.1.3/osc/babysitter.py 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/osc/babysitter.py 2023-05-24 08:59:45.000000000 +0200 @@ -193,6 +193,8 @@ print(e, file=sys.stderr) except urllib3.exceptions.MaxRetryError as e: print(e.reason, file=sys.stderr) + except urllib3.exceptions.ProtocolError as e: + print(e.args[0], file=sys.stderr) except CpioError as e: print(e, file=sys.stderr) except oscerr.OscBaseError as e: @@ -224,6 +226,13 @@ sys.stdout = os.fdopen(sys.stdout.fileno(), sys.stdout.mode, 1) sys.stderr = os.fdopen(sys.stderr.fileno(), sys.stderr.mode, 1) + appimage = os.getenv("APPIMAGE", None) + owd = os.getenv("OWD", None) + if appimage and owd: + # OWD stands for Original Working Directory and we need to switch there when running in an AppImage + # https://docs.appimage.org/packaging-guide/environment-variables.html + os.chdir(owd) + sys.exit(run(commandline.OscMainCommand())) # vim: sw=4 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/osc/commandline.py new/osc-1.1.4/osc/commandline.py --- old/osc-1.1.3/osc/commandline.py 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/osc/commandline.py 2023-05-24 08:59:45.000000000 +0200 @@ -3254,7 +3254,7 @@ if subcmd == 'review': # FIXME: do the review list for the user and for all groups he belong to results = get_review_list(apiurl, project, package, who, opts.group, opts.project, opts.package, state_list, - opts.type) + opts.type, req_states=("new", "review", "declined")) else: if opts.involved_projects: who = who or conf.get_apiurl_usr(apiurl) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/osc/core.py new/osc-1.1.4/osc/core.py --- old/osc-1.1.3/osc/core.py 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/osc/core.py 2023-05-24 08:59:45.000000000 +0200 @@ -4704,7 +4704,7 @@ def get_review_list( - apiurl: str, project="", package="", byuser="", bygroup="", byproject="", bypackage="", states=(), req_type="" + apiurl: str, project="", package="", byuser="", bygroup="", byproject="", bypackage="", states=(), req_type="", req_states=("review",) ): # this is so ugly... def build_by(xpath, val): @@ -4723,8 +4723,11 @@ xpath = '' - # we're interested only in reviews of requests that are still open - xpath = xpath_join(xpath, "(state/@name='new' or state/@name='review' or state/@name='declined')", op="and") + # By default we're interested only in reviews of requests that are in state review. + for req_state in req_states: + xpath = xpath_join(xpath, "state/@name='%s'" % req_state, inner=True) + + xpath = "(%s)" % xpath if states == (): xpath = xpath_join(xpath, 'review/@state=\'new\'', op='and') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/osc/grabber.py new/osc-1.1.4/osc/grabber.py --- old/osc-1.1.3/osc/grabber.py 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/osc/grabber.py 2023-05-24 08:59:45.000000000 +0200 @@ -10,7 +10,11 @@ from urllib.parse import unquote from urllib.error import URLError -import urllib3.exceptions +try: + from urllib3.exceptions import URLSchemeUnknown +except ImportError: + class URLSchemeUnknown(Exception): + pass from .core import streamfile @@ -39,7 +43,8 @@ try: self._grabber.urlgrab(mirror, filename, text) return True - except (HTTPError, URLError, urllib3.exceptions.URLSchemeUnknown) as e: + except (HTTPError, URLError, URLSchemeUnknown, KeyError) as e: + # urllib3 1.25.10 throws a KeyError: pool_key_constructor = self.key_fn_by_scheme[scheme] # try next mirror pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/osc/util/git_version.py new/osc-1.1.4/osc/util/git_version.py --- old/osc-1.1.3/osc/util/git_version.py 2023-05-10 09:11:35.000000000 +0200 +++ new/osc-1.1.4/osc/util/git_version.py 2023-05-24 08:59:45.000000000 +0200 @@ -9,7 +9,7 @@ """ # the `version` variable contents get substituted during `git archive` # it requires adding this to .gitattributes: <path to this file> export-subst - version = "1.1.3" + version = "1.1.4" if version.startswith(("$", "%")): # "$": version hasn't been substituted during `git archive` # "%": "Format:" and "$" characters get removed from the version string (a GitHub bug?) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.3/tests/test_grabber.py new/osc-1.1.4/tests/test_grabber.py --- old/osc-1.1.3/tests/test_grabber.py 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-1.1.4/tests/test_grabber.py 2023-05-24 08:59:45.000000000 +0200 @@ -0,0 +1,32 @@ +import importlib +import os +import tempfile +import unittest + +import osc.conf +import osc.grabber as osc_grabber + + +class TestMirrorGroup(unittest.TestCase): + def setUp(self): + self.tmpdir = tempfile.mkdtemp(prefix='osc_test') + # reset the global `config` in preparation for running the tests + importlib.reload(osc.conf) + osc.conf.get_config() + + def tearDown(self): + # reset the global `config` to avoid impacting tests from other classes + importlib.reload(osc.conf) + try: + shutil.rmtree(self.tmpdir) + except: + pass + + def test_invalid_scheme(self): + gr = osc_grabber.OscFileGrabber() + mg = osc_grabber.OscMirrorGroup(gr, ["container://example.com"]) + mg.urlgrab(None, os.path.join(self.tmpdir, "file")) + + +if __name__ == "__main__": + unittest.main() ++++++ osc.dsc ++++++ --- /var/tmp/diff_new_pack.y7Czlh/_old 2023-05-25 23:53:06.907814725 +0200 +++ /var/tmp/diff_new_pack.y7Czlh/_new 2023-05-25 23:53:06.911814748 +0200 @@ -1,6 +1,6 @@ Format: 1.0 Source: osc -Version: 1.1.3-0 +Version: 1.1.4-0 Binary: osc Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: any