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-02-09 16:23:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osc (Old) and /work/SRC/openSUSE:Factory/.osc.new.4462 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc" Thu Feb 9 16:23:42 2023 rev:171 rq:1064026 version:1.0.0~b5 Changes: -------- --- /work/SRC/openSUSE:Factory/osc/osc.changes 2023-02-03 22:12:57.669979725 +0100 +++ /work/SRC/openSUSE:Factory/.osc.new.4462/osc.changes 2023-02-09 16:23:51.738915525 +0100 @@ -1,0 +2,9 @@ +Thu Feb 9 14:08:25 UTC 2023 - Daniel Mach <daniel.m...@suse.com> + +- 1.0.0b5 + - rq list: Fix a traceback when --type is not specified + - core.checkout_package(): Use pathlib.Path + - connection: Retry all, not just default allowed methods + - connection: Wait between retries + +------------------------------------------------------------------- Old: ---- osc-1.0.0~b4.tar.gz New: ---- osc-1.0.0~b5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osc.spec ++++++ --- /var/tmp/diff_new_pack.88R4g4/_old 2023-02-09 16:23:53.590925066 +0100 +++ /var/tmp/diff_new_pack.88R4g4/_new 2023-02-09 16:23:53.594925086 +0100 @@ -49,7 +49,7 @@ %endif Name: osc -Version: 1.0.0~b4 +Version: 1.0.0~b5 Release: 0 Summary: Command-line client for the Open Build Service License: GPL-2.0-or-later ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.88R4g4/_old 2023-02-09 16:23:53.634925292 +0100 +++ /var/tmp/diff_new_pack.88R4g4/_new 2023-02-09 16:23:53.638925313 +0100 @@ -1,5 +1,5 @@ pkgname=osc -pkgver=1.0.0~b4 +pkgver=1.0.0~b5 pkgrel=0 pkgdesc="Command-line client for the Open Build Service" arch=('x86_64') ++++++ _service ++++++ --- /var/tmp/diff_new_pack.88R4g4/_old 2023-02-09 16:23:53.662925437 +0100 +++ /var/tmp/diff_new_pack.88R4g4/_new 2023-02-09 16:23:53.666925457 +0100 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> - <param name="version">1.0.0~b4</param> - <param name="revision">1.0.0b4</param> + <param name="version">1.0.0~b5</param> + <param name="revision">1.0.0b5</param> <param name="url">https://github.com/openSUSE/osc.git</param> <param name="scm">git</param> </service> ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.88R4g4/_old 2023-02-09 16:23:53.714925704 +0100 +++ /var/tmp/diff_new_pack.88R4g4/_new 2023-02-09 16:23:53.718925725 +0100 @@ -1,4 +1,4 @@ -osc (1.0.0~b4-0) unstable; urgency=low +osc (1.0.0~b5-0) unstable; urgency=low - Update to 0.174.0: - fix password deletion via "osc config -d <apiurl> pass" - support changing the password store via "osc config <apiurl> ++++++ osc-1.0.0~b4.tar.gz -> osc-1.0.0~b5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/NEWS new/osc-1.0.0~b5/NEWS --- old/osc-1.0.0~b4/NEWS 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/NEWS 2023-02-09 15:04:54.000000000 +0100 @@ -1,3 +1,9 @@ +1.0.0b5 + - rq list: Fix a traceback when --type is not specified + - core.checkout_package(): Use pathlib.Path + - connection: Retry all, not just default allowed methods + - connection: Wait between retries + 1.0.0b4 - Fix regressions to osc 0.x: - mv: Fix traceback due to missing target file name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/README.md new/osc-1.0.0~b5/README.md --- old/osc-1.0.0~b4/README.md 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/README.md 2023-02-09 15:04:54.000000000 +0100 @@ -1,7 +1,7 @@ -[](https://github.com/openSUSE/osc/actions/workflows/unittests.yaml) +[](https://github.com/openSUSE/osc/actions/workflows/tests.yaml) [](https://opensuse-commander.readthedocs.io/en/latest/?badge=latest) [](https://codecov.io/gh/openSUSE/osc) -[](https://codeclimate.com/github/openSUSE/osc) +[](https://github.com/openSUSE/osc/actions/workflows/codeql.yml) [](https://github.com/openSUSE/osc/graphs/contributors) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/behave/features/request-list.feature new/osc-1.0.0~b5/behave/features/request-list.feature --- old/osc-1.0.0~b4/behave/features/request-list.feature 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-1.0.0~b5/behave/features/request-list.feature 2023-02-09 15:04:54.000000000 +0100 @@ -0,0 +1,6 @@ +Feature: `osc request list` command + + +Scenario: Run `osc request list` on a project + When I execute osc with args "request list -P test:factory" + Then the exit code is 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/contrib/osc.spec new/osc-1.0.0~b5/contrib/osc.spec --- old/osc-1.0.0~b4/contrib/osc.spec 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/contrib/osc.spec 2023-02-09 15:04:54.000000000 +0100 @@ -31,7 +31,7 @@ %endif Name: osc -Version: 1.0.0~b4 +Version: 1.0.0~b5 Release: 0 Summary: Command-line client for the Open Build Service License: GPL-2.0-or-later diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/osc/__init__.py new/osc-1.0.0~b5/osc/__init__.py --- old/osc-1.0.0~b4/osc/__init__.py 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/osc/__init__.py 2023-02-09 15:04:54.000000000 +0100 @@ -13,7 +13,7 @@ from .util import git_version -__version__ = git_version.get_version('1.0.0~b4') +__version__ = git_version.get_version('1.0.0~b5') # vim: sw=4 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/osc/commandline.py new/osc-1.0.0~b5/osc/commandline.py --- old/osc-1.0.0~b4/osc/commandline.py 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/osc/commandline.py 2023-02-09 15:04:54.000000000 +0100 @@ -1024,7 +1024,7 @@ filename = "_patchinfo" else: checkout_package(apiurl, project, patchinfo, prj_dir=project_dir) - filename = project_dir + "/" + patchinfo + "/_patchinfo" + filename = project_dir / patchinfo / "/_patchinfo" run_editor(filename) @@ -2771,9 +2771,10 @@ req_type=opts.type, exclude_projects=opts.exclude_target_project or []) else: roles = ["creator"] if opts.mine else None + types = [opts.type] if opts.type else None results = get_request_collection( apiurl, project=project, package=package, user=who, - states=state_list, types=[opts.type], roles=roles) + states=state_list, types=types, roles=roles) # Check if project actually exists if result list is empty if not results: @@ -2917,8 +2918,7 @@ raise oscerr.WrongArgs('\'checkout\' not possible (request has no \'submit\' actions)') for action in sr_actions: checkout_package(apiurl, action.src_project, action.src_package, - action.src_rev, expand_link=True, prj_dir=action.src_project) - + action.src_rev, expand_link=True, prj_dir=Path(action.src_project)) else: state_map = {'reopen': 'new', 'accept': 'accepted', 'decline': 'declined', 'wipe': 'deleted', 'revoke': 'revoked', 'supersede': 'superseded'} # Change review state only @@ -3759,7 +3759,7 @@ # all packages for package in meta_get_packagelist(apiurl, result): try: - checkout_package(apiurl, result, package, expand_link=True, prj_dir=result) + checkout_package(apiurl, result, package, expand_link=True, prj_dir=Path(result)) except: print('Error while checkout package:\n', package, file=sys.stderr) @@ -3914,7 +3914,7 @@ package = targetpkg or args[1] if opts.checkout: checkout_package(apiurl, targetprj, package, server_service_files=False, - expand_link=True, prj_dir=targetprj) + expand_link=True, prj_dir=Path(targetprj)) if conf.config['verbose']: print('Note: You can use "osc delete" or "osc submitpac" when done.\n') else: @@ -4687,7 +4687,8 @@ m = re.match(r"obs://([^/]+)/(\S+)/([^/]+)/([A-Fa-f\d]+)\-([^:]*)(:\S+)?", args[0]) if m and len(args) == 1: apiurl = "https://" + m.group(1) - project = project_dir = m.group(2) + project = m.group(2) + project_dir = Path(project) # platform = m.group(3) opts.revision = m.group(4) package = m.group(5) @@ -4698,7 +4699,8 @@ project = package = filename = None apiurl = self.get_api_url() try: - project = project_dir = self._process_project_name(args[0]) + project = self._process_project_name(args[0]) + project_dir = Path(project) package = args[1] filename = args[2] except: @@ -4706,7 +4708,7 @@ if len(args) == 1 and is_project_dir(Path.cwd()): project = store_read_project(Path.cwd()) - project_dir = str(Path.cwd()) + project_dir = Path.cwd() package = args[0] if opts.deleted and package: @@ -4743,11 +4745,9 @@ print_request_list(apiurl, project, package) elif project: - prj_dir = opts.output_dir if opts.output_dir else project - if not opts.output_dir and conf.config['checkout_no_colon']: - prj_dir = prj_dir.replace(':', '/') - else: - prj_dir = prj_dir.replace(':', conf.config['project_separator']) + sep = '/' if not opts.output_dir and conf.config['checkout_no_colon'] else conf.config['project_separator'] + chosen_output = opts.output_dir if opts.output_dir else project + prj_dir = Path(chosen_output.replace(':', sep)) if os.path.exists(prj_dir): sys.exit('osc: project directory \'%s\' already exists' % prj_dir) @@ -4759,7 +4759,7 @@ if not os.path.isfile('/usr/lib/obs/service/obs_scm_bridge'): raise oscerr.OscIOError(None, 'Install the obs-scm-bridge package to work on packages managed in scm (git)!') os.putenv("OSC_VERSION", get_osc_version()) - run_external(['/usr/lib/obs/service/obs_scm_bridge', '--outdir', prj_dir, '--url', scm_url]) + run_external(['/usr/lib/obs/service/obs_scm_bridge', '--outdir', str(prj_dir), '--url', scm_url]) Project.init_project(apiurl, prj_dir, project, conf.config['do_package_tracking'], scm_url=scm_url) print(statfrmt('A', prj_dir)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/osc/connection.py new/osc-1.0.0~b5/osc/connection.py --- old/osc-1.0.0~b4/osc/connection.py 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/osc/connection.py 2023-02-09 15:04:54.000000000 +0100 @@ -1,5 +1,6 @@ import base64 import fcntl +import inspect import os import re import shutil @@ -217,7 +218,20 @@ pool = CONNECTION_POOLS.get(apiurl, None) if not pool: pool_kwargs = {} - pool_kwargs["retries"] = urllib3.Retry(total=int(conf.config["http_retries"])) + + # urllib3.Retry() argument 'method_whitelist' got renamed to 'allowed_methods' + sig = inspect.signature(urllib3.Retry) + arg_names = list(sig.parameters.keys()) + if "allowed_methods" in arg_names: + retries_kwargs = {"allowed_methods": None} + else: + retries_kwargs = {"method_whitelist": None} + + pool_kwargs["retries"] = urllib3.Retry( + total=int(conf.config["http_retries"]), + backoff_factor=2, + **retries_kwargs, + ) if purl.scheme == "https": ssl_context = oscssl.create_ssl_context() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.0.0~b4/osc/core.py new/osc-1.0.0~b5/osc/core.py --- old/osc-1.0.0~b4/osc/core.py 2023-02-03 11:01:51.000000000 +0100 +++ new/osc-1.0.0~b5/osc/core.py 2023-02-09 15:04:54.000000000 +0100 @@ -31,6 +31,7 @@ from functools import cmp_to_key, total_ordering from http.client import IncompleteRead from io import StringIO +from pathlib import Path from typing import Optional, Dict, Union, List, Iterable from urllib.parse import urlsplit, urlunsplit, urlparse, quote_plus, urlencode, unquote from urllib.error import HTTPError @@ -712,7 +713,7 @@ `wc_check` : bool """ - self.dir = dir + self.dir = Path(dir) self.absdir = os.path.abspath(dir) self.store = Store(dir) self.progress_obj = progress_obj @@ -1181,7 +1182,7 @@ @staticmethod def init_project( apiurl: str, - dir, + dir: Path, project, package_tracking=True, getPackageList=True, @@ -5371,7 +5372,7 @@ pathname=None, prj_obj=None, expand_link=False, - prj_dir=None, + prj_dir: Path=None, server_service_files=None, service_files=None, progress_obj=None, @@ -5382,20 +5383,19 @@ try: # the project we're in might be deleted. # that'll throw an error then. - olddir = os.getcwd() - except: - olddir = os.environ.get("PWD") + olddir = Path.cwd() + except FileNotFoundError: + olddir = Path(os.environ.get("PWD")) if not prj_dir: prj_dir = olddir - elif conf.config['checkout_no_colon']: - prj_dir = prj_dir.replace(':', '/') else: - prj_dir = prj_dir.replace(':', conf.config['project_separator']) + sep = "/" if conf.config['checkout_no_colon'] else conf.config['project_separator'] + prj_dir = Path(str(prj_dir).replace(':', sep)) - root_dots = '.' + root_dots = Path('.') if conf.config['checkout_rooted']: - if prj_dir[:1] == '/': + if prj_dir.stem == '/': if conf.config['verbose']: print("checkout_rooted ignored for %s" % prj_dir) # ?? should we complain if not is_project_dir(prj_dir) ?? @@ -5409,27 +5409,25 @@ # do not easily reveal the fact, that they are part of a project path. # At least this test should find that the parent of 'home/username/branches' # is a project (hack alert). Also goto parent in this case. - root_dots = "../" + root_dots = Path("../") elif is_project_dir("../.."): # testing two levels is better than one. # May happen in case of checkout_no_colon, or # if project roots were previously inconsistent - root_dots = "../../" + root_dots = Path("../../") if is_project_dir(root_dots): oldproj = store_read_project(root_dots) if conf.config['checkout_no_colon']: n = len(oldproj.split(':')) else: n = 1 - if root_dots == '.': - root_dots = '' - root_dots = root_dots + "../" * n + root_dots = root_dots / ("../" * n) - if root_dots != '.': + if str(root_dots) != '.': if conf.config['verbose']: print("%s is project dir of %s. Root found at %s" % (prj_dir, oldproj, os.path.abspath(root_dots))) - prj_dir = root_dots + prj_dir + prj_dir = root_dots / prj_dir if not pathname: pathname = getTransActPath(os.path.join(prj_dir, package)) @@ -7951,11 +7949,8 @@ Normally the "dir" attribute of a Package() object will be passed to this method. """ - if pac_dir != '.': - pathn = os.path.normpath(pac_dir) - else: - pathn = '' - return pathn + path = str(Path(pac_dir)) # accept str and Path as pac_dir + return '' if path == '.' else path def get_commit_message_template(pac): ++++++ osc.dsc ++++++ --- /var/tmp/diff_new_pack.88R4g4/_old 2023-02-09 16:23:54.102927703 +0100 +++ /var/tmp/diff_new_pack.88R4g4/_new 2023-02-09 16:23:54.106927724 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: osc -Version: 1.0.0~b4-0 +Version: 1.0.0~b5-0 Binary: osc Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: any