Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-copr-cli for openSUSE:Factory 
checked in at 2022-09-27 20:14:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-copr-cli (Old)
 and      /work/SRC/openSUSE:Factory/.python-copr-cli.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-copr-cli"

Tue Sep 27 20:14:17 2022 rev:3 rq:1006372 version:1.103

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-copr-cli/python-copr-cli.changes  
2022-04-22 21:56:19.558947637 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-copr-cli.new.2275/python-copr-cli.changes    
    2022-09-27 20:14:28.245898215 +0200
@@ -1,0 +2,16 @@
+Mon Sep 26 23:54:56 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to Version 1.103: 
+  -The previous release brought several enhancements and fixes for the stats 
calculation mechanism but it wasn???t quite enough.
+  -This release comes with some final follow-ups. We are hoping to start 
counting the RPM downloads shortly after.
+  Minor UI improvements
+  -In the project settings, the ???Edit??? button will now show only for 
enabled chroots
+  -The build detail page now shows the build timeout value
+  -If a build is a part of a batch, the detail page now shows a link for it
+  -The user detail page now shows a link for the /user/repositories/
+  Bugfixes
+  #2294 - Show correct distribution images based on their OS family
+  #2293, RHBZ 2081915 - Fixed copr-frontend FTBFS for F37/Rawhide
+  RHBZ 2113156 - Fixed copr-keygen FTBFS for F37/Rawhide
+
+-------------------------------------------------------------------

Old:
----
  copr-cli-1.100.tar.gz

New:
----
  copr-cli-1.103.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-copr-cli.spec ++++++
--- /var/tmp/diff_new_pack.k4M7KN/_old  2022-09-27 20:14:28.965899783 +0200
+++ /var/tmp/diff_new_pack.k4M7KN/_new  2022-09-27 20:14:28.969899792 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-copr-cli
-Version:        1.100
+Version:        1.103
 Release:        0
 Summary:        Copr cli
 License:        GPL-2.0-or-later

++++++ copr-cli-1.100.tar.gz -> copr-cli-1.103.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/PKG-INFO new/copr-cli-1.103/PKG-INFO
--- old/copr-cli-1.100/PKG-INFO 2022-04-05 10:50:01.919643000 +0200
+++ new/copr-cli-1.103/PKG-INFO 2022-08-18 15:02:42.817345100 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: copr-cli
-Version: 1.100
+Version: 1.103
 Summary: CLI tool to run copr
 Home-page: https://pagure.io/copr/copr
 Author: Pierre-Yves Chibon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/copr-cli.spec 
new/copr-cli-1.103/copr-cli.spec
--- old/copr-cli-1.100/copr-cli.spec    2022-04-05 10:49:51.000000000 +0200
+++ new/copr-cli-1.103/copr-cli.spec    2022-08-18 15:01:47.000000000 +0200
@@ -6,10 +6,10 @@
 %global with_python2 1
 %endif
 
-%global min_python_copr_version 1.116.2.dev
+%global min_python_copr_version 1.120.3.dev
 
 Name:       copr-cli
-Version:    1.100
+Version:    1.103
 Release:    1%{?dist}
 Summary:    Command line interface for COPR
 
@@ -35,7 +35,6 @@
 Requires:      python3-simplejson
 Requires:      python3-humanize
 Requires:      python3-koji
-Requires:      python3-requests-gssapi
 Requires:      python3-future
 
 Recommends:    python3-progress
@@ -50,14 +49,12 @@
 BuildRequires: python3-setuptools
 BuildRequires: python3-simplejson
 BuildRequires: python3-munch
-BuildRequires: python3-requests-gssapi
 BuildRequires: python3-future
 %else
 Requires:      python-copr >= %min_python_copr_version
 Requires:      python-jinja2
 Requires:      python-simplejson
 Requires:      python-humanize
-Requires:      python2-requests-gssapi
 Requires:      python-future
 
 BuildRequires: pytest
@@ -70,7 +67,6 @@
 BuildRequires: python-setuptools
 BuildRequires: python-simplejson
 BuildRequires: python-munch
-BuildRequires: python2-requests-gssapi
 BuildRequires: python-future
 %endif
 
@@ -136,6 +132,24 @@
 
 
 %changelog
+* Tue Aug 16 2022 Jiri Kyjovsky <j1.kyjov...@gmail.com> 1.103-1
+- add packit_forge_projects_allowed for Copr projects
+
+* Tue Jul 26 2022 Jakub Kadlcik <fros...@email.cz> 1.102-1
+- Add support for pyp2spec generator
+- Fix the --debug test on EL7
+- Simplify cli configuration
+- Make requests-gssapi an opt-in dep in PyPI
+- Sync 'copr build' with other 'copr build*' methods
+- De-duplicate printing builds, and waiting
+- De-duplicate logic for taking dirname from arg
+- Simplify and fix progress bar
+- Add API support for runtime_dependencies
+- Print the URL of created project
+
+* Tue Jun 21 2022 Jakub Kadlcik <fros...@email.cz> 1.101-1
+- Remove depraceted method `copr-cli buildfedpkg'
+
 * Mon Apr 04 2022 Pavel Raiskup <prais...@redhat.com> 1.100-1
 - list-package-names now uses pagination
 - ensure that (error/info) logging is printed even without --debug
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/copr_cli/main.py 
new/copr-cli-1.103/copr_cli/main.py
--- old/copr-cli-1.100/copr_cli/main.py 2022-04-05 10:49:51.000000000 +0200
+++ new/copr-cli-1.103/copr_cli/main.py 2022-08-18 15:01:47.000000000 +0200
@@ -36,7 +36,7 @@
 from copr_cli.helpers import cli_use_output_format
 from copr_cli.monitor import cli_monitor_parser
 from copr_cli.printers import cli_get_output_printer as get_printer
-from .util import ProgressBar, serializable
+from copr_cli.util import get_progress_callback, serializable
 from .build_config import MockProfile
 
 
@@ -62,17 +62,6 @@
     None: "default",
 }
 
-no_config_warning = """
-================= WARNING: =======================
-File '{0}' is incorrect.
-See documentation: man copr-cli.
-Any operation requiring credentials will fail!
-==================================================
-
-Hint: {1}
-
-"""
-
 try:
     input = raw_input
 except NameError:
@@ -103,7 +92,7 @@
         setattr(namespace, self.dest, values)
 
 
-def buildopts_from_args(args, progress_callback):
+def buildopts_from_args(args, progress_callback=None):
     """
     For all the build commands, parse the common set of build options.
     """
@@ -146,13 +135,7 @@
 
 class Commands(object):
     def __init__(self, config_path):
-        self.config_path = config_path or '~/.config/copr'
-
-        try:
-            self.config = config_from_file(self.config_path)
-        except CoprConfigException as ex:
-            sys.stderr.write(no_config_warning.format(self.config_path, ex))
-            self.config = {"copr_url": "http://copr.fedoraproject.org"}
+        self.config = config_from_file(config_path)
 
         if self.config.get("gssapi") is None:
             # Contrary to what is set in python-copr, we set GSSAPI on by
@@ -203,6 +186,16 @@
             owner = self.ownername
         return owner, name
 
+    def parse_dirname(self, name):
+        """
+        From specified <owner>/<dirname> or just <dirname> return the
+        tripled (owner, project, dirname).
+        """
+        owner, dirname = self.parse_name(name)
+        project = dirname.split(':')[0]
+        return owner, project, dirname
+
+
     def build_url(self, build_id):
         """
         Return the "generic" predictable url for build_id, which redirects
@@ -319,29 +312,34 @@
         # that the user actually has a valid credentials.
         self.client.base_proxy.auth_check()
 
+        username, projectname, project_dirname = 
self.parse_dirname(args.copr_repo)
+
         builds = []
         for pkg in args.pkgs:
             if os.path.exists(pkg):
-                bar = ProgressBar(max=os.path.getsize(pkg))
-                build_function = self.client.build_proxy.create_from_file
+                progress_callback = get_progress_callback(os.path.getsize(pkg))
+                buildopts = buildopts_from_args(args, progress_callback)
                 data = {"path": pkg}
-
-                # pylint: disable=function-redefined
-                def progress_callback(monitor):
-                    bar.next(n=8192)
-
                 print('Uploading package {0}'.format(pkg))
+                try:
+                    builds.append(self.client.build_proxy.create_from_file(
+                        ownername=username, projectname=projectname,
+                        project_dirname=project_dirname, buildopts=buildopts,
+                        **data))
+                finally:
+                    if progress_callback:
+                        progress_callback.finish()
             elif not urlparse(pkg).scheme:
                 raise CoprException("File {0} not found".format(pkg))
             else:
-                bar = None
-                progress_callback = None
-                build_function = self.client.build_proxy.create_from_url
+                buildopts = buildopts_from_args(args)
                 data = {"url": pkg}
+                builds.append(self.client.build_proxy.create_from_url(
+                    ownername=username, projectname=projectname,
+                    project_dirname=project_dirname, buildopts=buildopts,
+                    **data))
 
-            builds.append(self.process_build(args, build_function, data, 
bar=bar, progress_callback=progress_callback))
-
-        return builds
+        self.print_build_info_and_wait(builds, args)
 
     @requires_api_auth
     def action_build_pypi(self, args):
@@ -353,6 +351,7 @@
         data = {
             "pypi_package_name": args.packagename,
             "pypi_package_version": args.packageversion,
+            "spec_generator": args.spec_generator,
             "spec_template": args.spec_template,
             "python_versions": args.pythonversions,
         }
@@ -412,43 +411,34 @@
             data[arg] = getattr(args, arg)
         return self.process_build(args, 
self.client.build_proxy.create_from_custom, data)
 
-    @requires_api_auth
-    def action_build_distgit(self, args):
+    def print_build_info_and_wait(self, builds, args):
         """
-        Method called when the 'buildfedpkg' action has been selected by the 
user.
-
-        :param args: argparse arguments provided by the user
+        Print to stdout information about just submitted builds.  Note that our
+        users parse this non-parseable output, because we don't have issue #224
+        fixed.
         """
-        data = {"clone_url": args.clone_url, "committish": args.branch}
-        return self.process_build(args, 
self.client.build_proxy.create_from_scm, data)
 
-    def process_build(self, args, build_function, data, bar=None, 
progress_callback=None):
-        username, project_dirname = self.parse_name(args.copr_repo)
-        projectname = project_dirname.split(':')[0]
+        print("Build was added to {0}:".format(builds[0].projectname))
 
-        try:
-            buildopts = buildopts_from_args(args, progress_callback)
-            result = build_function(ownername=username, 
projectname=projectname,
-                                    project_dirname=project_dirname, 
buildopts=buildopts, **data)
-
-            builds = result if type(result) == list else [result]
-            print("Build was added to {0}:".format(builds[0].projectname))
-
-            for build in builds:
-                print("  {0}".format(self.build_url(build.id)))
-
-            build_ids = [build.id for build in builds]
-            print("Created builds: {0}".format(" ".join(map(str, build_ids))))
-
-            if not args.nowait:
-                self._watch_builds(build_ids)
-
-        except CoprException as ex:
-            sys.stderr.write(str(ex) + "\n")
-            sys.exit(1)
-        finally:
-            if bar:
-                bar.finish()
+        for build in builds:
+            print("  {0}".format(self.build_url(build.id)))
+
+        build_ids = [build.id for build in builds]
+        print("Created builds: {0}".format(" ".join(map(str, build_ids))))
+
+        if not args.nowait:
+            self._watch_builds(build_ids)
+
+
+    def process_build(self, args, build_function, data):
+        username, projectname, project_dirname = 
self.parse_dirname(args.copr_repo)
+        buildopts = buildopts_from_args(args)
+        result = build_function(ownername=username,
+                                projectname=projectname,
+                                project_dirname=project_dirname,
+                                buildopts=buildopts, **data)
+        builds = result if type(result) == list else [result]
+        self.print_build_info_and_wait(builds, args)
 
 
     @requires_api_auth
@@ -476,8 +466,14 @@
             module_hotfixes=ON_OFF_MAP[args.module_hotfixes],
             fedora_review=args.fedora_review,
             appstream=ON_OFF_MAP[args.appstream],
+            runtime_dependencies=args.runtime_dependencies,
+            packit_forge_projects_allowed=args.packit_forge_projects_allowed,
         )
-        print("New project was successfully created.")
+
+        owner_part = username.replace('@', "g/")
+        project_url = '/'.join([self.client.config["copr_url"].strip("/"),
+                                'coprs', owner_part, copr, ""])
+        print("New project was successfully created: {0}".format(project_url))
 
     @requires_api_auth
     def action_modify_project(self, args):
@@ -502,6 +498,8 @@
             module_hotfixes=ON_OFF_MAP[args.module_hotfixes],
             fedora_review=ON_OFF_MAP[args.fedora_review],
             appstream=ON_OFF_MAP[args.appstream],
+            runtime_dependencies=args.runtime_dependencies,
+            packit_forge_projects_allowed=args.packit_forge_projects_allowed,
         )
 
     @requires_api_auth
@@ -730,6 +728,7 @@
             "package_name": args.name,
             "pypi_package_name": args.packagename,
             "pypi_package_version": args.packageversion,
+            "spec_generator": args.spec_generator,
             "spec_template": args.spec_template,
             "python_versions": args.pythonversions,
             "max_builds": args.max_builds,
@@ -907,17 +906,13 @@
         print("Package's default source was successfully reseted.")
 
     def action_build_package(self, args):
-        ownername, project_dirname = self.parse_name(args.copr_repo)
-        projectname = project_dirname.split(':')[0]
-        buildopts = buildopts_from_args(args, None)
+        ownername, projectname, project_dirname = 
self.parse_dirname(args.copr_repo)
+
+        buildopts = buildopts_from_args(args)
         build = self.client.package_proxy.build(ownername=ownername, 
projectname=projectname,
                                                 packagename=args.name, 
buildopts=buildopts,
                                                 
project_dirname=project_dirname)
-        print("Build was added to {0}.".format(build.projectname))
-        print("Created builds: {0}".format(build.id))
-
-        if not args.nowait:
-            self._watch_builds([build.id])
+        self.print_build_info_and_wait([build], args)
 
     def action_build_module(self, args):
         """
@@ -972,6 +967,33 @@
                                                       request)
         print("success")
 
+
+def create_and_modify_common_opts(parser):
+    """
+    De-duplicate options for 'copr create' and 'copr modify' options.
+    """
+    parser.add_argument(
+        "--repo", dest="repos", action="append", metavar="REPO_BASEURL", help=(
+            "Repository that will be enabled at package build time, can be "
+            "specified multiple times."
+    ))
+    parser.add_argument(
+        "--runtime-repo-dependency", dest="runtime_dependencies",
+        metavar="REPO_BASEURL", action="append", help=(
+            "Repository that will be automatically enabled together "
+            "with repository from this copr, e.g. by `dnf copr enable`. "
+            "This can be specified multiple times."
+    ))
+
+    parser.add_argument(
+        "--packit-forge-project-allowed", dest="packit_forge_projects_allowed",
+        metavar="FORGE_PROJECT", action="append", help=(
+            "Forge project that will be allowed to build in this project "
+            "via Packit in format github.com/packit/ogr. "
+            "Can be specified multiple times."
+    ))
+
+
 def setup_parser():
     """
     Set the main arguments.
@@ -1042,8 +1064,9 @@
                                help="The name of the copr to create")
     parser_create.add_argument("--chroot", dest="chroots", action="append",
                                help="Chroot to use for this copr")
-    parser_create.add_argument("--repo", dest="repos", action="append",
-                               help="Repository to add to this copr")
+
+
+
     parser_create.add_argument("--initial-pkgs", dest="initial_pkgs",
                                action="append",
                                help="List of packages URL to build in this "
@@ -1103,6 +1126,8 @@
         help=("Generate AppStream metadata for this project. Generating "
               "metadata slows down the builds in large Copr projects."))
 
+    create_and_modify_common_opts(parser_create)
+
     parser_create.set_defaults(func="action_create")
 
     # create the parser for the "modify_project" command
@@ -1115,8 +1140,6 @@
                                help="Description of the copr")
     parser_modify.add_argument("--instructions",
                                help="Instructions for the copr")
-    parser_modify.add_argument("--repo", dest="repos", action="append",
-                               help="Repository to add to this copr")
     parser_modify.add_argument("--disable_createrepo", type=str2bool,
                                help="Disable metadata auto generation")
     parser_modify.add_argument("--enable-net", choices=["on", "off"],
@@ -1161,6 +1184,8 @@
         help=("Generate AppStream metadata for this project. Generating "
               "metadata slows down the builds in large Copr projects."))
 
+    create_and_modify_common_opts(parser_modify)
+
     parser_modify.set_defaults(func="action_modify_project")
 
     # create the parser for the "delete" command
@@ -1201,6 +1226,15 @@
                                          help="For what Python versions to 
build (by default: 3 2)")
     parser_pypi_args_optional.add_argument("--packageversion", metavar = 
"PYPIVERSION",
                                          help="Version of the PyPI package to 
be built (by default latest)")
+
+    parser_pypi_args_optional.add_argument(
+        "--spec-generator",
+        dest="spec_generator",
+        help="Tool for generating specfile from a PyPI package",
+        choices=["pyp2rpm", "pyp2spec"],
+        default="pyp2rpm",
+    )
+
     parser_pypi_args_optional.add_argument("--template", "-t", 
dest="spec_template",
                                          help="Spec template to be used to 
build srpm with pyp2rpm")
 
@@ -1358,11 +1392,6 @@
             help="Build packages from SRPM generated by custom script")
     parser_build_custom.set_defaults(func="action_build_custom")
 
-    # create the parser for the "buildfedpkg" command
-    parser_build_distgit = subparsers.add_parser("buildfedpkg", 
parents=[parser_distgit_args_parent, parser_build_parent],
-                                                  help="DEPRECATED. Use SCM 
source type instead.")
-    parser_build_distgit.set_defaults(func="action_build_distgit")
-
     # create the parser for the "buildscm" command
     parser_build_scm = subparsers.add_parser("buildscm", 
parents=[parser_scm_args_parent, parser_build_parent],
                                               help="Builds package from 
Git/DistGit/SVN repository.")
@@ -1788,7 +1817,7 @@
 
 
 def _handle_frontend_api_request_error(e, args):
-    if "Request is not in JSON format" not in str(e):
+    if "is not in JSON format" not in str(e):
         return
     if not args.debug:
         sys.stderr.write("Try 'copr-cli --debug' for more info.\n")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/copr_cli/util.py 
new/copr-cli-1.103/copr_cli/util.py
--- old/copr-cli-1.100/copr_cli/util.py 2021-08-26 09:11:24.000000000 +0200
+++ new/copr-cli-1.103/copr_cli/util.py 2022-08-18 15:01:47.000000000 +0200
@@ -6,43 +6,54 @@
 
 try:
     from progress.bar import Bar
-except ImportError:
-    progress = False
-else:
-    progress = True
 
+    class SpeedProgressBar(Bar):
+        """
+        Modified progress.bar.Bar with additional formatters %(download_speed)
+        and %(downloaded), with additional interface supported by
+        MultipartEncoderMonitor API.
+        Bar accepts the last N downloaded bytes, while MultipartEncoderMonitor
+        callback provides the total number of downloaded bytes.  N needs to be
+        calculated.
+        """
 
-class ProgressMixin(object):
-
-    @property
-    def download_speed(self):
-        if self.avg == 0.0:
-            return "..."
-        return "{0}/s".format(humanize.naturalsize(1 / self.avg))
-
-    @property
-    def downloaded(self):
-        return humanize.naturalsize(self.index)
-
+        message = "%(percent)d%%"
+        suffix = "%(downloaded)s %(download_speed)s eta %(eta_td)s"
+        read_last = 0
 
-class DummyBar(object):
-    # pylint: disable=redefined-builtin
-    def __init__(self, max=None):
-        pass
+        @property
+        def download_speed(self):
+            """ Inverted value of Bar.avg """
+            if self.avg == 0.0:
+                return "..."
+            return "{0}/s".format(humanize.naturalsize(1 / self.avg))
+
+        @property
+        def downloaded(self):
+            """ How many bytes are already downloaded """
+            return humanize.naturalsize(self.index)
+
+        def __call__(self, monitor):
+            """ MultipartEncoderMonitor expects callable """
+            read = monitor.bytes_read - self.read_last
+            self.read_last = monitor.bytes_read
+            self.next(read)
 
-    def next(self, n=None):
-        pass
 
-    def finish(self):
-        pass
+except ImportError:
+    progress = False
+else:
+    progress = True
 
 
-if progress:
-    class ProgressBar(Bar, ProgressMixin):
-        message = "%(percent)d%%"
-        suffix = "%(downloaded)s %(download_speed)s eta %(eta_td)s"
-else:
-    ProgressBar = DummyBar
+def get_progress_callback(length):
+    """
+    If python-progress is installed, instantiate progress bar object.  
Otherwise
+    just return None.
+    """
+    if not progress:
+        return None
+    return SpeedProgressBar(max=length)
 
 
 def serializable(result):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/copr_cli.egg-info/PKG-INFO 
new/copr-cli-1.103/copr_cli.egg-info/PKG-INFO
--- old/copr-cli-1.100/copr_cli.egg-info/PKG-INFO       2022-04-05 
10:50:01.000000000 +0200
+++ new/copr-cli-1.103/copr_cli.egg-info/PKG-INFO       2022-08-18 
15:02:42.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: copr-cli
-Version: 1.100
+Version: 1.103
 Summary: CLI tool to run copr
 Home-page: https://pagure.io/copr/copr
 Author: Pierre-Yves Chibon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/copr_cli.egg-info/requires.txt 
new/copr-cli-1.103/copr_cli.egg-info/requires.txt
--- old/copr-cli-1.100/copr_cli.egg-info/requires.txt   2022-04-05 
10:50:01.000000000 +0200
+++ new/copr-cli-1.103/copr_cli.egg-info/requires.txt   2022-08-18 
15:02:42.000000000 +0200
@@ -3,5 +3,4 @@
 simplejson
 jinja2
 setuptools
-requests-gssapi
 future
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/man/copr-cli.1.asciidoc 
new/copr-cli-1.103/man/copr-cli.1.asciidoc
--- old/copr-cli-1.100/man/copr-cli.1.asciidoc  2022-04-05 10:49:51.000000000 
+0200
+++ new/copr-cli-1.103/man/copr-cli.1.asciidoc  2022-08-18 15:01:47.000000000 
+0200
@@ -279,80 +279,6 @@
 For the rest of the arguments, see `copr-cli build` command above.
 
 
-`copr-cli buildtito [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-usage: copr buildtito [-h] [--memory MEMORY] [--timeout TIMEOUT] [--nowait]
-                      [--background]
-                      [-r CHROOTS] [--git-url URL] [--git-dir DIRECTORY]
-                      [--git-branch BRANCH] [--test]
-                      project
-
-Deprecated by SCM source type.
-
---git-url URL::
-Url to a project managed by Tito, required.
-
---git-dir DIRECTORY::
-Relative path from Git root to directory containing .spec file.
-
---git-branch BRANCH::
-Checokut specific branch on the repository.
-
---test::
-To build from the last commit instead of the last release tag.
-
-
-For the rest of the arguments, see `copr-cli build` command above.
-
-
-`copr-cli buildmock [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-usage: copr buildmock [-h] [--memory MEMORY] [--timeout TIMEOUT] [--nowait]
-                      [--background]
-                      [-r CHROOTS] [--scm-type TYPE] [--scm-url URL]
-                      [--scm-branch BRANCH] [--spec FILE]
-                      project
-
-Deprecated by SCM source type.
-
---scm-type TYPE::
-Specify versioning tool, default is 'git'.
-
---scm-url URL::
-Url to a project versioned by Git or SVN, required.
-
---scm-branch BRANCH::
-Checokut specific branch on the repository.
-
---spec FILE::
-Relative path from SCM root to .spec file, required.
-
-
-For the rest of the arguments, see `copr-cli build` command above.
-
-
-`copr-cli buildfedpkg [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-usage: copr buildfedpkg [-h] [--memory MEMORY] [--timeout TIMEOUT] [--nowait]
-                      [--background]
-                      [-r CHROOTS] [--clone-url URL] [--branch BRANCH]
-                      project
-
-Deprecated by SCM source type.
-
---clone-url URL::
-Specify clone url to the dist-git project on pkgs.fedoraproject.org.
-
---branch BRANCH::
-Specify branch in the dist-git project to be be built from.
-
-
-For the rest of the arguments, see `copr-cli build` command above.
-
-
 `copr-cli buildscm [options]`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -473,44 +399,6 @@
 PACKAGE ACTIONS
 ---------------
 
-`copr-cli add-package-tito [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-usage: copr add-package-tito [-h] --git-url URL [--git-dir DIRECTORY]
-                             [--git-branch BRANCH] [--test {on,off}] --name
-                             PKGNAME [--webhook-rebuild {on,off}]
-                             project
-
-Deprecated by SCM source type.
-
---git-url URL::
-URL to a project managed by Tito
-
---git-dir DIRECTORY::
-Relative path from Git root to directory containing .spec file
-
---git-branch BRANCH::   
-Git branch that you want to build from
-
---test {on,off}::
-Build the last commit instead of the last release tag
-
---name PKGNAME::
-Name of the package to be edited or created
-
---webhook-rebuild {on,off}::
-Enable auto-rebuilding.
-
-
-`copr-cli edit-package-tito [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-usage: copr edit-package-tito [-h] --git-url URL [--git-dir DIRECTORY]
-                              [--git-branch BRANCH] [--test {on,off}] --name
-                              PKGNAME [--webhook-rebuild {on,off}]
-                              project
-
-Deprecated by SCM source type.
-
 
 `copr-cli add-package-pypi [options]`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -551,46 +439,6 @@
 Edit source definition and type of an existing package. Options are shared 
with add-package-pypi.
 
 
-`copr-cli add-package-mockscm [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-usage: copr add-package-mockscm [-h] [--scm-type TYPE] [--scm-url URL]
-                                [--scm-branch BRANCH] [--spec FILE] --name
-                                PKGNAME [--webhook-rebuild {on,off}]
-                                project
-
-Deprecated by SCM source type.
-
---scm-type TYPE::
-Specify versioning tool, default is 'git'
-
---scm-url URL::
-Url to a project versioned by Git or SVN, required
-
---scm-branch BRANCH::
-Branch in the target repository to build from
-
---spec FILE::
-Relative path from SCM root to .spec file, required
-
---name PKGNAME::
-Name of the package to be edited or created
-
---webhook-rebuild {on,off}::
-Enable auto-rebuilding
-
-
-`copr-cli edit-package-mockscm [options]`
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-usage: copr edit-package-mockscm [-h] [--scm-type TYPE] [--scm-url URL]
-                                [--scm-branch BRANCH] [--spec FILE] --name
-                                PKGNAME [--webhook-rebuild {on,off}]
-                                project
-
-Deprecated by SCM source type.
-
-
 `copr-cli add-package-scm [options]`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 usage: copr add-package-scm [-h] --clone-url CLONE_URL [--commit COMMITTISH]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/setup.py new/copr-cli-1.103/setup.py
--- old/copr-cli-1.100/setup.py 2022-04-05 10:49:51.000000000 +0200
+++ new/copr-cli-1.103/setup.py 2022-08-18 15:01:47.000000000 +0200
@@ -19,7 +19,6 @@
     'simplejson',
     'jinja2',
     'setuptools',
-    'requests-gssapi',
     'future',
 ]
 
@@ -32,7 +31,7 @@
 
 setup(
     name=__name__,
-    version="1.100",
+    version="1.103",
     description=__description__,
     long_description=long_description,
     author=__author__,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/tests/test_cli.py 
new/copr-cli-1.103/tests/test_cli.py
--- old/copr-cli-1.100/tests/test_cli.py        2022-04-05 10:49:51.000000000 
+0200
+++ new/copr-cli-1.103/tests/test_cli.py        2022-08-18 15:01:47.000000000 
+0200
@@ -1,6 +1,7 @@
 import os
 import argparse
 import json
+import logging
 import shutil
 import tempfile
 import pytest
@@ -337,10 +338,18 @@
     response_status = "foobar"
     build_proxy_get.return_value = MagicMock(state=response_status)
 
+    # The main() --debug option affects the logger configuration, and capsys 
has
+    # trouble to restore the state back after the test case.  Let's help it.
+    # More info: # https://github.com/pytest-dev/pytest/issues/14
+    # This handler backup-restore appears to be needed on EL7 only.
+    log = logging.getLogger()
+    old_handlers = list(log.handlers)
+
     main.main(argv=["--debug", "status", "123"])
     stdout, stderr = capsys.readouterr()
     assert "{0}\n".format(response_status) in stdout
     assert "Debug log enabled " in stderr
+    log.handlers = old_handlers
 
 
 def test_status_response_no_args(capsys):
@@ -467,8 +476,10 @@
         "module_hotfixes": False,
         "fedora_review": False,
         "appstream": True,
+        "runtime_dependencies": None,
+        "packit_forge_projects_allowed": None,
     }
-    assert stdout == "New project was successfully created.\n"
+    assert stdout == "New project was successfully created: 
http://copr/coprs/jdoe/foo/\n";
 
 
 @mock.patch('copr.v3.proxies.project.ProjectProxy.add')
@@ -485,7 +496,7 @@
     kwargs = project_proxy_add.call_args[1]
     assert stderr == ''
     assert kwargs["isolation"] == "simple"
-    assert stdout == "New project was successfully created.\n"
+    assert stdout == "New project was successfully created: 
http://copr/coprs/jdoe/foo/\n";
 
 
 @mock.patch('copr.v3.proxies.project_chroot.ProjectChrootProxy.edit')
@@ -560,8 +571,10 @@
         "module_hotfixes": False,
         "fedora_review": False,
         "appstream": True,
+        "runtime_dependencies": None,
+        "packit_forge_projects_allowed": None,
     }
-    assert stdout == "New project was successfully created.\n"
+    assert stdout == "New project was successfully created: 
http://copr/coprs/jdoe/foo/\n";
 
 
 @mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.100/tests/test_distgit.py 
new/copr-cli-1.103/tests/test_distgit.py
--- old/copr-cli-1.100/tests/test_distgit.py    2022-04-05 10:49:51.000000000 
+0200
+++ new/copr-cli-1.103/tests/test_distgit.py    2022-08-18 15:01:47.000000000 
+0200
@@ -8,11 +8,11 @@
 import pytest
 
 import copr
-from copr_cli import main
-from cli_tests_lib import mock
-
 # pylint: disable=unused-import
 from cli_tests_lib import f_test_config
+from cli_tests_lib import mock
+from cli_tests_lib import config as mock_config
+from copr_cli import main
 
 def _main(args, capsys):
     main.main(args)
@@ -142,8 +142,9 @@
              'webhook_rebuild': True})
 
     @staticmethod
-    @mock.patch('copr.v3.proxies.BaseProxy.auth', 
new_callable=mock.PropertyMock, return_value="test")
-    def test_edit_package_fail(auth, capsys):
+    @mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+    @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
+    def test_edit_package_fail(auth_check, mock_config, capsys):
         with mock.patch("copr.v3.proxies.package.PackageProxy.edit") as p1:
             p1.side_effect = copr.v3.CoprRequestException("Unable to connect 
to http://copr/api_3/.";)
             with pytest.raises(SystemExit) as exc:

Reply via email to