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 2023-09-08 21:15:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-copr-cli (Old)
 and      /work/SRC/openSUSE:Factory/.python-copr-cli.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-copr-cli"

Fri Sep  8 21:15:50 2023 rev:7 rq:1109655 version:1.110

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-copr-cli/python-copr-cli.changes  
2023-02-11 21:58:19.739998180 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-copr-cli.new.1766/python-copr-cli.changes    
    2023-09-08 21:16:47.149139871 +0200
@@ -1,0 +2,9 @@
+Fri Sep  8 05:03:19 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Update to 1.110:
+  * No upstream changelog.
+- Fiddle with {Build,}Requires as appropiate.
+- Switch to pyproject macros.
+- Refresh patch remove-simplejson.patch
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ python-copr-cli.spec ++++++
--- /var/tmp/diff_new_pack.v2SM2L/_old  2023-09-08 21:16:48.261179615 +0200
+++ /var/tmp/diff_new_pack.v2SM2L/_new  2023-09-08 21:16:48.265179757 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-copr-cli
-Version:        1.105
+Version:        1.110
 Release:        0
 Summary:        Copr cli
 License:        GPL-2.0-or-later
@@ -27,25 +27,21 @@
 # Remove dependency on simplejson
 # (not upstream, which on master switched to ujson)
 Patch0:         remove-simplejson.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-Jinja2
 Requires:       python-copr >= 1.116
-Requires:       python-filelock
-Requires:       python-future
 Requires:       python-humanize
-Requires:       python-requests-gssapi
-Requires:       python-responses
+Requires:       python-setuptools
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module Jinja2}
 BuildRequires:  %{python_module copr >= 1.116}
-BuildRequires:  %{python_module filelock}
-BuildRequires:  %{python_module future}
 BuildRequires:  %{python_module humanize}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module requests-gssapi}
 BuildRequires:  %{python_module responses}
 # /SECTION
 Requires(post): update-alternatives
@@ -61,10 +57,10 @@
 sed -i '1{/#!/d}' copr_cli/package_build_order.py
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/copr-cli
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
@@ -81,5 +77,5 @@
 %license LICENSE
 %python_alternative %{_bindir}/copr-cli
 %{python_sitelib}/copr_cli
-%{python_sitelib}/copr_cli-%{version}*-info
+%{python_sitelib}/copr_cli-%{version}.dist-info
 

++++++ copr-cli-1.105.tar.gz -> copr-cli-1.110.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/.coveragerc 
new/copr-cli-1.110/.coveragerc
--- old/copr-cli-1.105/.coveragerc      2021-12-12 16:37:48.000000000 +0100
+++ new/copr-cli-1.110/.coveragerc      1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-[report]
-exclude_lines =
-    pragma: no cover
-    def __repr__
-    if self.debug:
-    if settings.DEBUG
-    raise AssertionError
-    raise NotImplementedError
-    if 0:
-    if __name__ == .__main__.:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/Makefile new/copr-cli-1.110/Makefile
--- old/copr-cli-1.105/Makefile 2022-11-13 21:33:19.000000000 +0100
+++ new/copr-cli-1.110/Makefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-.PHONY: check test lint unittests
-
-# we keep this serialized to avoid messed standard output
-check:
-       $(MAKE) unittests
-       $(MAKE) lint
-
-test: check
-
-unittests:
-       ./run_tests.sh -vv -s
-
-lint:
-       vcs-diff-lint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/PKG-INFO new/copr-cli-1.110/PKG-INFO
--- old/copr-cli-1.105/PKG-INFO 2023-01-25 15:18:32.687257800 +0100
+++ new/copr-cli-1.110/PKG-INFO 2023-08-16 16:47:52.456885000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: copr-cli
-Version: 1.105
+Version: 1.110
 Summary: CLI tool to run copr
 Home-page: https://github.com/fedora-copr/copr
 Author: Pierre-Yves Chibon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr new/copr-cli-1.110/copr
--- old/copr-cli-1.105/copr     2021-12-12 16:37:48.000000000 +0100
+++ new/copr-cli-1.110/copr     1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-#! /bin/sh
-
-# Run copr-cli script directly from git.
-# Copyright (C) 2016 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-absdir="$(dirname "$(readlink -f "$0")")"
-export PYTHONPATH="$absdir:$absdir/../python${PYTHONPATH+:$PYTHONPATH}"
-python3 -m copr_cli.main "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr-cli.spec 
new/copr-cli-1.110/copr-cli.spec
--- old/copr-cli-1.105/copr-cli.spec    2023-01-25 14:29:44.000000000 +0100
+++ new/copr-cli-1.110/copr-cli.spec    2023-08-16 16:47:20.000000000 +0200
@@ -1,15 +1,15 @@
-%if 0%{?rhel} > 7 || 0%{?fedora}
-%global __python %_bindir/python3
-%global with_python3 1
-%else
+%if 0%{?rhel} && 0%{?rhel} <= 7
 %global __python %_bindir/python2
 %global with_python2 1
+%else
+%global __python %_bindir/python3
+%global with_python3 1
 %endif
 
-%global min_python_copr_version 1.120.3.dev
+%global min_python_copr_version 1.128.1
 
 Name:       copr-cli
-Version:    1.105
+Version:    1.110
 Release:    1%{?dist}
 Summary:    Command line interface for COPR
 
@@ -35,7 +35,6 @@
 Requires:      python3-simplejson
 Requires:      python3-humanize
 Requires:      python3-koji
-Requires:      python3-future
 
 Recommends:    python3-progress
 Suggests:      python3-beautifulsoup4
@@ -49,13 +48,11 @@
 BuildRequires: python3-setuptools
 BuildRequires: python3-simplejson
 BuildRequires: python3-munch
-BuildRequires: python3-future
 %else
 Requires:      python-copr >= %min_python_copr_version
 Requires:      python-jinja2
 Requires:      python-simplejson
 Requires:      python-humanize
-Requires:      python-future
 
 BuildRequires: pytest
 BuildRequires: python-copr >= %min_python_copr_version
@@ -67,7 +64,6 @@
 BuildRequires: python-setuptools
 BuildRequires: python-simplejson
 BuildRequires: python-munch
-BuildRequires: python-future
 %endif
 
 # We historically shipped empty doc package, uninstall it.
@@ -132,6 +128,30 @@
 
 
 %changelog
+* Tue Aug 15 2023 Pavel Raiskup <prais...@redhat.com> 1.110-1
+- priority=X support for copr DNF repositories added
+- new 'copr-cli download-build --logs' option added
+- make the pyp2spec tool the default PyPI spec generator
+
+* Tue May 23 2023 Jakub Kadlcik <fros...@email.cz> 1.109-1
+- Show CHROOT in help output instead of CHROOTS
+- More readable errors related to implicit ownername
+- General check if it makes sense to upload SRPM
+- Describe add-package-custom and edit-package-custom in the manpage
+- Sync --timeout manpage docs with --help output
+
+* Wed Apr 05 2023 Jiri Kyjovsky <j1.kyjov...@gmail.com> 1.108-1
+- Bump release version for release mess 
+
+* Tue Apr 04 2023 Jiri Kyjovsky <j1.kyjov...@gmail.com> 1.107-1
+- Explicitly ask which user checks the permissions
+- Add `get` cli command for proxy.project.get()
+
+* Wed Mar 22 2023 Jiri Kyjovsky <j1.kyjov...@gmail.com> 1.106-1
+- Add --review parameter for download-build
+- Disable default option for modifying project
+- Add option for follow_fedora_branching
+- Simplify `mock-config` output
 * Tue Jan 24 2023 Jakub Kadlcik <fros...@email.cz> 1.105-1
 - More understandable module hotfixes description
 - Add options to download only built RPMs/spec files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli/README.rst 
new/copr-cli-1.110/copr_cli/README.rst
--- old/copr-cli-1.105/copr_cli/README.rst      2022-02-17 10:42:30.000000000 
+0100
+++ new/copr-cli-1.110/copr_cli/README.rst      2023-08-16 16:47:20.000000000 
+0200
@@ -11,7 +11,7 @@
 
 About this project:
 -------------------
-- Website: https://pagure.io/copr/copr
+- Website: https://github.com/fedora-copr/copr
 - Git: http://git.fedorahosted.org/cgit/copr.git
 - Production Fedora instance: https://copr.fedorainfracloud.org/
 - Development Fedora instance: http://copr.stg.fedoraproject.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli/build_config.py 
new/copr-cli-1.110/copr_cli/build_config.py
--- old/copr-cli-1.105/copr_cli/build_config.py 2021-12-12 16:37:48.000000000 
+0100
+++ new/copr-cli-1.110/copr_cli/build_config.py 2023-08-16 16:47:20.000000000 
+0200
@@ -41,13 +41,13 @@
 {%- endif %}
 {%- if repos %}
 
-config_opts[config_opts['package_manager'] + '.conf'] += \"\"\"
+config_opts['dnf.conf'] += \"\"\"
 {%- for repo in repos %}
 
 [{{ repo.id }}]
 name="{{ repo.name }}"
 baseurl={{ repo.baseurl }}
-{%- if repo.priority %}
+{%- if repo.priority and repo.priority is not none %}
 priority={{ repo.priority }}
 {%- endif %}
 {%- if repo.module_hotfixes %}
@@ -64,6 +64,7 @@
 {%- endif %}
 """
 
+
 class MockProfile(object):
     def __init__(self, data):
         self.data = data
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli/helpers.py 
new/copr-cli-1.110/copr_cli/helpers.py
--- old/copr-cli-1.105/copr_cli/helpers.py      2022-01-04 01:09:47.000000000 
+0100
+++ new/copr-cli-1.110/copr_cli/helpers.py      2023-08-16 16:47:20.000000000 
+0200
@@ -19,3 +19,17 @@
         help=output_format_help,
         default=default,
     )
+
+
+def print_project_info(project):
+    """Prints info about project"""
+    print("Name: {0}".format(project.name))
+    print("  Description: {0}".format(project.description))
+    if project.chroot_repos:
+        print("  Repo(s):")
+        for name, url in project.chroot_repos.items():
+            print("    {0}: {1}".format(name, url))
+    if project.additional_repos:
+        additional_repos_str = " ".join(project.additional_repos)
+        print("  Additional repo: {0}".format(additional_repos_str))
+    print("")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli/main.py 
new/copr-cli-1.110/copr_cli/main.py
--- old/copr-cli-1.105/copr_cli/main.py 2023-01-23 01:47:56.000000000 +0100
+++ new/copr-cli-1.110/copr_cli/main.py 2023-08-16 16:47:20.000000000 +0200
@@ -33,7 +33,7 @@
     CoprConfigException, CoprNoResultException, CoprAuthException,
 )
 from copr.v3.pagination import next_page
-from copr_cli.helpers import cli_use_output_format
+from copr_cli.helpers import cli_use_output_format, print_project_info
 from copr_cli.monitor import cli_monitor_parser
 from copr_cli.printers import cli_get_output_printer as get_printer
 from copr_cli.util import get_progress_callback, serializable
@@ -147,43 +147,39 @@
     @property
     def username(self):
         """
-        Get the username from config, or obtain it via auth_check (transitively
-        via GSSAPI).
+        Get the username from user's config, or obtain it via auth_check
+        (transitively via GSSAPI).
         """
         if self.config.get("username"):
             return self.config["username"]
 
         if self.config.get("gssapi"):
-            try:
-                return self.client.base_proxy.auth_username()
-            except CoprAuthException:
-                log.error("Failed to determine Copr username from 
authentication.")
-                raise
+            return self.client.base_proxy.auth_username()
         raise CoprConfigException(
             "This operation tries to detect your username, but it is not "
             "possible to find it in configuration, and GSSAPI is disabled "
         )
 
-    @property
-    def ownername(self):
+    def parse_name(self, name):
         """
-        Determine the project ownername (== username) when not specified on
-        commandline.
+        Several sub-commands accept the project NAME argument in the 
'<project>'
+        (that defaults to '<authenticated_user>/<project>'), or in the full
+        '<owner>/<project>' format.  Translate this NAME string to the
+        (owner, project) pair.
         """
-        try:
-            return self.username
-        except:
-            log.error("This operation needs a project ownername specified, "
-                      "fallback to your username failed.")
-            raise
-
-    def parse_name(self, name):
         m = re.match(r"([^/]+)/(.*)", name)
         if m:
             owner = m.group(1)
             name = m.group(2)
         else:
-            owner = self.ownername
+            try:
+                owner = self.username
+            except:
+                log.error("Wrong project argument format '%s'.  Please use "
+                          "the full '<owner>/<project>' argument format, or "
+                          "authenticate to use the short '<project>' format "
+                          "(which means '<your_username>/<project>').", name)
+                raise
         return owner, name
 
     def parse_dirname(self, name):
@@ -211,7 +207,18 @@
         """
         m = re.match(r"(([^/]+)/)?([^/]+)/(.*)", path)
         if m:
-            owner = m.group(2) or self.username
+            owner = m.group(2)
+            if not owner:
+                try:
+                    self.username
+                except:
+                    log.error("Wrong chroot path format '%s'. Use the full "
+                              "'<owner>/<project>/<chroot>' format or "
+                              "authenticate to use the short "
+                              "'<project>/<chroot>' format (which means "
+                              "'<your_username>/<project>/<chroot>').", path)
+                    raise
+
             return owner, m.group(3), m.group(4)
         raise CoprException("Unexpected chroot path format")
 
@@ -279,7 +286,11 @@
         """
         Simply print out the current user as defined in copr config.
         """
-        print(self.username)
+        try:
+            print(self.username)
+        except:
+            log.error("Can't detect who are you.")
+            raise
 
     def action_new_webhook_secret(self, args):
         """
@@ -308,17 +319,19 @@
         :param args: argparse arguments provided by the user
         """
 
-        # Before we start uploading potentially large source RPM file, make 
sure
-        # that the user actually has a valid credentials.
-        self.client.base_proxy.auth_check()
-
         username, projectname, project_dirname = 
self.parse_dirname(args.copr_repo)
+        buildopts = buildopts_from_args(args)
+
+        # Before we start uploading potentially large source RPM file, make 
sure
+        # that the user has valid credentials and can build in the project.
+        self.client.build_proxy.check_before_build(
+            username, projectname, project_dirname, buildopts)
 
         builds = []
         for pkg in args.pkgs:
             if os.path.exists(pkg):
                 progress_callback = get_progress_callback(os.path.getsize(pkg))
-                buildopts = buildopts_from_args(args, progress_callback)
+                buildopts["progress_callback"] = progress_callback
                 data = {"path": pkg}
                 print('Uploading package {0}'.format(pkg))
                 try:
@@ -332,7 +345,6 @@
             elif not urlparse(pkg).scheme:
                 raise CoprException("File {0} not found".format(pkg))
             else:
-                buildopts = buildopts_from_args(args)
                 data = {"url": pkg}
                 builds.append(self.client.build_proxy.create_from_url(
                     ownername=username, projectname=projectname,
@@ -461,6 +473,7 @@
             auto_prune=ON_OFF_MAP[args.auto_prune],
             bootstrap=BOOTSTRAP_MAP[args.bootstrap],
             isolation=args.isolation,
+            follow_fedora_branching=ON_OFF_MAP[args.follow_fedora_branching],
             delete_after_days=args.delete_after_days,
             multilib=ON_OFF_MAP[args.multilib],
             module_hotfixes=ON_OFF_MAP[args.module_hotfixes],
@@ -468,6 +481,7 @@
             appstream=ON_OFF_MAP[args.appstream],
             runtime_dependencies=args.runtime_dependencies,
             packit_forge_projects_allowed=args.packit_forge_projects_allowed,
+            repo_priority=args.repo_priority,
         )
 
         owner_part = username.replace('@', "g/")
@@ -492,6 +506,7 @@
             auto_prune=ON_OFF_MAP[args.auto_prune],
             bootstrap=BOOTSTRAP_MAP[args.bootstrap],
             isolation=args.isolation,
+            follow_fedora_branching=ON_OFF_MAP[args.follow_fedora_branching],
             chroots=args.chroots,
             delete_after_days=args.delete_after_days,
             multilib=ON_OFF_MAP[args.multilib],
@@ -500,6 +515,7 @@
             appstream=ON_OFF_MAP[args.appstream],
             runtime_dependencies=args.runtime_dependencies,
             packit_forge_projects_allowed=args.packit_forge_projects_allowed,
+            repo_priority=args.repo_priority,
         )
 
     @requires_api_auth
@@ -588,7 +604,6 @@
         build_config.rootdir = "{0}-{1}_{2}".format(ownername.replace("@", 
"group_"), projectname, args.chroot)
         print(MockProfile(build_config))
 
-
     def action_list(self, args):
         """ Method called when the 'list' action has been selected by the
         user.
@@ -596,22 +611,21 @@
         :param args: argparse arguments provided by the user
 
         """
-        username = args.username or self.ownername
+        username = args.username
+        if not username:
+            try:
+                self.username
+            except:
+                log.error("The 'username|@groupname' not specified.  Either "
+                          "specify it, or authenticate to list your projects.")
+                raise
         projects = self.client.project_proxy.get_list(username)
         if not projects:
             sys.stderr.write("No copr retrieved for user: 
'{0}'\n".format(username))
             return
 
         for project in projects:
-            print("Name: {0}".format(project.name))
-            print("  Description: {0}".format(project.description))
-            if project.chroot_repos:
-                print("  Repo(s):")
-                for name, url in project.chroot_repos.items():
-                    print("    {0}: {1}".format(name, url))
-            if project.additional_repos:
-                print("  Additional repo: {0}".format(" 
".join(project.additional_repos)))
-            print("")
+            print_project_info(project)
 
     def action_status(self, args):
         build = self.client.build_proxy.get(args.build_id)
@@ -640,6 +654,19 @@
             if args.spec:
                 cmd.extend(["-A", "*.spec"])
 
+            if args.logs:
+                cmd.extend(["-A", "*.log.gz"])
+
+            if args.review:
+                cmd.extend([
+                    "-A", "files.dir",
+                    "-A", "licensecheck.txt",
+                    "-A", "review.txt",
+                    "-A", "review.json",
+                    "-A", "rpmlint.txt",
+                ])
+                cmd.append(chroot.result_url + "fedora-review")
+
             cmd.append(chroot.result_url)
             subprocess.call(cmd)
 
@@ -659,6 +686,15 @@
         result = self.client.build_proxy.delete_list(args.build_id)
         print("Build(s) {0} were deleted.".format(", ".join(map(str, 
result["builds"]))))
 
+    def action_get(self, args):
+        """ Method called when the 'get' action has been selected by the
+        user.
+
+        :param args: argparse arguments provided by the user
+        """
+        owner, project = self.parse_name(args.project)
+        print_project_info(self.client.project_proxy.get(owner, project))
+
     #########################################################
     ###                   Chroot actions                  ###
     #########################################################
@@ -706,7 +742,8 @@
         )
         fields = ["additional_packages", "additional_repos", 
"additional_modules",
                   "comps_name", "delete_after_days", "isolation", 
"mock_chroot",
-                  "ownername", "projectname", "with_opts", "without_opts"]
+                  "ownername", "projectname", "with_opts", "without_opts",
+                  "follow_fedora_branching"]
         printer = get_printer(args.output_format, fields)
         printer.add_data(project_chroot)
         printer.finish()
@@ -1069,7 +1106,8 @@
     parser_create = subparsers.add_parser("create", help="Create a new copr")
     parser_create.add_argument("name",
                                help="The name of the copr to create")
-    parser_create.add_argument("--chroot", dest="chroots", action="append",
+    parser_create.add_argument("--chroot", dest="chroots", metavar="CHROOT",
+                               action="append",
                                help="Chroot to use for this copr")
 
 
@@ -1134,6 +1172,18 @@
         help=("Generate AppStream metadata for this project. Generating "
               "metadata slows down the builds in large Copr projects."))
 
+    parser_create.add_argument(
+        "--follow-fedora-branching", choices=["on", "off"], default="on",
+        help=("When Fedora is branched from rawhide, the "
+              "respective chroots for the new branch are automatically "
+              "created for you (as soon as they are available) as rawhide "
+              "chroot forks."))
+
+    parser_create.add_argument(
+        "--repo-priority", default=None,
+        help=("Use the priority=<INT> config option for repositories in this "
+              "project, see man dnf.conf(5) for more info."))
+
     create_and_modify_common_opts(parser_create)
 
     parser_create.set_defaults(func="action_create")
@@ -1142,7 +1192,8 @@
     parser_modify = subparsers.add_parser("modify", help="Modify existing 
copr")
 
     parser_modify.add_argument("name", help="The name of the copr to modify")
-    parser_modify.add_argument("--chroot", dest="chroots", action="append",
+    parser_modify.add_argument("--chroot", dest="chroots", metavar="CHROOT",
+                               action="append",
                                help="Chroot to use for this copr")
     parser_modify.add_argument("--description",
                                help="Description of the copr")
@@ -1182,17 +1233,27 @@
               "x86_64 arch), default is \"don't change\""))
 
     parser_modify.add_argument(
-        "--fedora-review", choices=["on", "off"], default="off",
+        "--fedora-review", choices=["on", "off"],
         help=("When submitting new package to Fedora, it needs to comply with "
               "Fedora Packaging Guidelines. Use fedora-review tool to help you 
"
               "discover packaging errors. Failing fedora-review will not fail "
               "the build itself."))
 
     parser_modify.add_argument(
-        "--appstream", choices=["on", "off"], default="off",
+        "--appstream", choices=["on", "off"],
         help=("Generate AppStream metadata for this project. Generating "
               "metadata slows down the builds in large Copr projects."))
 
+    parser_modify.add_argument(
+        "--follow-fedora-branching", choices=["on", "off"],
+        help=("When Fedora is branched from rawhide, the "
+              "respective chroots for the new branch are automatically "
+              "created for you (as soon as they are available) as rawhide "
+              "chroot forks."))
+
+    parser_modify.add_argument("--repo-priority", default=None,
+                               help="Set the priority value of this 
repository")
+
     create_and_modify_common_opts(parser_modify)
 
     parser_modify.set_defaults(func="action_modify_project")
@@ -1226,6 +1287,11 @@
     cli_use_output_format(parser_builds, default=None)
     parser_builds.set_defaults(func="action_list_builds")
 
+    parser_get = subparsers.add_parser("get", help="Get information about 
project")
+    parser_get.add_argument("project", help="Which project you want to get. 
Can be in format "
+                            "`username/project` or in case of group 
`@groupname/project`")
+    parser_get.set_defaults(func="action_get")
+
     #########################################################
     ###             Source-type related options           ###
     #########################################################
@@ -1241,7 +1307,7 @@
         dest="spec_generator",
         help="Tool for generating specfile from a PyPI package",
         choices=["pyp2rpm", "pyp2spec"],
-        default="pyp2rpm",
+        default="pyp2spec",
     )
 
     parser_pypi_args_optional.add_argument("--template", "-t", 
dest="spec_template",
@@ -1337,12 +1403,14 @@
               "default is usually set to 5 hours on Copr Frontend."))
     parser_build_parent.add_argument("--nowait", action="store_true", 
default=False,
                                      help="Don't wait for build")
-    parser_build_parent.add_argument("-r", "--chroot", dest="chroots", 
action="append",
+    parser_build_parent.add_argument("-r", "--chroot", dest="chroots",
+                                     metavar="CHROOT", action="append",
                                      help="If you don't need this build for 
all the project's chroots. You can use it several times for each chroot you 
need.")
 
     parser_build_parent.add_argument(
         "--exclude-chroot",
         dest="exclude_chroots",
+        metavar="CHROOT",
         action="append",
         help=("If you don't need this build for all the project's chroots."
               "You can use it several times for each chroot you don't need.")
@@ -1434,7 +1502,8 @@
     # create the parser for the "download-build" command
     parser_download_build = subparsers.add_parser("download-build", 
help="Fetches built packages")
     parser_download_build.add_argument("build_id", help="Build ID")
-    parser_download_build.add_argument("-r", "--chroot", dest="chroots", 
action="append",
+    parser_download_build.add_argument("-r", "--chroot", dest="chroots",
+                                       metavar="CHROOT", action="append",
                                        help="Select chroots to fetch")
     parser_download_build.add_argument("--dest", "-d", dest="dest",
                                        help="Base directory to store 
packages", default=".")
@@ -1450,6 +1519,18 @@
         action="store_true",
         help="Download only the .spec file",
     )
+    parser_download_build.add_argument(
+        "--review",
+        dest="review",
+        action="store_true",
+        help="Download only the fedora-review files",
+    )
+    parser_download_build.add_argument(
+        "--logs",
+        dest="logs",
+        action="store_true",
+        help="Download only the .log files",
+    )
     parser_download_build.set_defaults(func="action_download_build")
 
     # create the parser for the "cancel" command
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli.egg-info/PKG-INFO 
new/copr-cli-1.110/copr_cli.egg-info/PKG-INFO
--- old/copr-cli-1.105/copr_cli.egg-info/PKG-INFO       2023-01-25 
15:18:32.000000000 +0100
+++ new/copr-cli-1.110/copr_cli.egg-info/PKG-INFO       2023-08-16 
16:47:52.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: copr-cli
-Version: 1.105
+Version: 1.110
 Summary: CLI tool to run copr
 Home-page: https://github.com/fedora-copr/copr
 Author: Pierre-Yves Chibon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli.egg-info/SOURCES.txt 
new/copr-cli-1.110/copr_cli.egg-info/SOURCES.txt
--- old/copr-cli-1.105/copr_cli.egg-info/SOURCES.txt    2023-01-25 
15:18:32.000000000 +0100
+++ new/copr-cli-1.110/copr_cli.egg-info/SOURCES.txt    2023-08-16 
16:47:52.000000000 +0200
@@ -1,10 +1,6 @@
-.coveragerc
 LICENSE
 MANIFEST.in
-Makefile
-copr
 copr-cli.spec
-pylintrc
 requirements.txt
 run_tests.sh
 setup.py
@@ -35,6 +31,8 @@
 tests/resources/get_package_expected.json
 tests/resources/get_package_response.json
 tests/resources/get_package_response_builds.json
+tests/resources/get_project_expected.txt
+tests/resources/get_project_response.json
 tests/resources/list_builds_expected.txt
 tests/resources/list_builds_response.json
 tests/resources/list_packages_expected.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/copr_cli.egg-info/requires.txt 
new/copr-cli-1.110/copr_cli.egg-info/requires.txt
--- old/copr-cli-1.105/copr_cli.egg-info/requires.txt   2023-01-25 
15:18:32.000000000 +0100
+++ new/copr-cli-1.110/copr_cli.egg-info/requires.txt   2023-08-16 
16:47:52.000000000 +0200
@@ -3,4 +3,3 @@
 simplejson
 jinja2
 setuptools
-future
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/man/copr-cli.1.asciidoc 
new/copr-cli-1.110/man/copr-cli.1.asciidoc
--- old/copr-cli-1.105/man/copr-cli.1.asciidoc  2022-06-25 02:43:16.000000000 
+0200
+++ new/copr-cli-1.110/man/copr-cli.1.asciidoc  2023-08-16 16:47:20.000000000 
+0200
@@ -226,7 +226,8 @@
 Override memory for this build. This is actually not used and it have no 
effect.
 
 --timeout::
-Override timeout for this build.
+Specify build timeout (seconds), if the build takes longer than that, it is
+terminated and fails. The default is usually set to 5 hours on Copr Frontend.
 
 --nowait::
 Don't wait for build completion.
@@ -514,6 +515,61 @@
 Edit source definition and type of an existing package. Options are shared 
with add-package-rubygems.
 
 
+`copr-cli add-package-custom [options]`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+usage: copr add-package-custom [-h] --script SCRIPT
+                               [--script-chroot SCRIPT_CHROOT]
+                               [--script-builddeps SCRIPT_BUILDDEPS]
+                               [--script-resultdir SCRIPT_RESULTDIR]
+                               [--script-repos SCRIPT_REPOS]
+                               --name PKGNAME
+                               [--webhook-rebuild {on,off}]
+                               [--max-builds MAX_BUILDS]
+                               project
+
+Add package of 'Custom' source type.
+
+--script SCRIPT::
+Text file (script) to be used to prepare the sources
+
+--script-chroot SCRIPT_CHROOT::
+Mock chroot to build sources for the SRPM in
+
+--script-builddeps SCRIPT_BUILDDEPS::
+Space separated list of packages needed to build the sources
+
+--script-resultdir SCRIPT_RESULTDIR::
+Where SCRIPT generates the result, relatively to script's $PWD (defaults to 
'.')
+
+--script-repos SCRIPT_REPOS::
+Space separated string of additional repo urls for script dependencies
+
+--name PKGNAME::
+Name of the package to be edited or created
+
+--webhook-rebuild {on,off}::
+Enable auto-rebuilding.
+
+--max-builds MAX_BUILDS::
+Keep only the specified number of the newest-by-id builds
+(garbage collector is run daily), zero disables (default)
+
+
+`copr-cli edit-package-custom [options]`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+usage: copr edit-package-custom [-h]
+                                --script SCRIPT [--script-chroot SCRIPT_CHROOT]
+                                [--script-builddeps SCRIPT_BUILDDEPS]
+                                [--script-resultdir SCRIPT_RESULTDIR]
+                                [--script-repos SCRIPT_REPOS]
+                                --name PKGNAME [--webhook-rebuild {on,off}]
+                                [--max-builds MAX_BUILDS]
+                                project
+
+Edit source definition and type of an existing package.
+Options are shared with add-package-custom.
+
+
 `copr-cli list-packages [options]`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 usage: copr list-packages [-h] [--with-latest-build]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/man/copr-cli.cheat 
new/copr-cli-1.110/man/copr-cli.cheat
--- old/copr-cli-1.105/man/copr-cli.cheat       2022-01-04 01:09:47.000000000 
+0100
+++ new/copr-cli-1.110/man/copr-cli.cheat       2023-08-16 16:47:20.000000000 
+0200
@@ -26,7 +26,7 @@
 copr-cli cancel <build_id>
 
 # to build rpm(s) from GIT
-copr-cli buildscm test-project --clone-url https://pagure.io/copr/copr.git 
--subdir cli
+copr-cli buildscm test-project --clone-url 
https://github.com/fedora-copr/copr.git --subdir cli
 
 # to regenerate repository metadata for a project
 copr-cli regenerate-repos test-project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/pylintrc new/copr-cli-1.110/pylintrc
--- old/copr-cli-1.105/pylintrc 2022-11-13 21:33:19.000000000 +0100
+++ new/copr-cli-1.110/pylintrc 1970-01-01 01:00:00.000000000 +0100
@@ -1,121 +0,0 @@
-# Copr clients pylint configuration
-
-[MASTER]
-# Pickle collected data for later comparisons.
-persistent=no
-
-init-hook=
-    import os
-    import subprocess
-    gitrootdir = subprocess.check_output(["git", "rev-parse", 
"--show-toplevel"]).decode("utf-8").strip()
-    sys.path.insert(0, os.path.join(gitrootdir, '.pylintpath'))
-    import copr_pylintrc
-    copr_pylintrc.init()
-
-
-# Our own pylint transformations.
-load-plugins=pylint_copr_plugin
-
-[MESSAGES CONTROL]
-# Reasoning for wide warning ignore
-# ---------------------------------
-# import-error
-#     This is to fix our Jenkins CI where we do not have all the build
-#     requirements for all our sub-components.  We can afford not listening to
-#     this error because our packaging CI would discover the problems anyways.
-# useless-object-inheritance
-#     We need to keep compatibility with Python 2 for EL6 and EL7.
-# consider-using-f-string
-#     We still support Python 2.7 (EL7) for clients.
-# unspecified-encoding
-#     Python2.7: TypeError: 'encoding' is an invalid keyword argument for this 
function
-disable=import-error,useless-object-inheritance,super-with-arguments,consider-using-f-string,unspecified-encoding
-
-[VARIABLES]
-# A regular expression matching names used for dummy variables (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-
-[BASIC]
-# Regular expression which should only match correct module names
-module-rgx=([a-zA-Z_][a-zA-Z0-9_]+)$
-
-# Regular expression which should only match correct module level names
-const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
-
-# Regular expression which should only match correct class names
-class-rgx=[a-zA-Z_][a-zA-Z0-9_]+$
-
-# Regular expression which should only match correct function names
-function-rgx=[a-z_][a-zA-Z0-9_]{,42}$
-
-# Regular expression which should only match correct method names
-method-rgx=[a-z_][a-zA-Z0-9_]{,42}$
-
-# Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-zA-Z0-9_]{,30}$
-
-# Regular expression which should only match correct argument names
-argument-rgx=[a-z_][a-zA-Z0-9_]{,30}$
-
-# Regular expression which should only match correct variable names
-variable-rgx=[a-z_][a-zA-Z0-9_]{,30}$
-
-# Regular expression which should only match correct list comprehension /
-# generator expression variable names
-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-
-# Regular expression which should only match correct class sttribute names
-class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,42}|(__.*__))$
-
-# Good variable names which should always be accepted, separated by a comma
-good-names=i,j,k,ex,Run,_
-
-# Bad variable names which should always be refused, separated by a comma
-bad-names=foo,bar,baz,toto,tutu,tata
-
-[DESIGN]
-
-# Maximum number of arguments for function / method
-max-args=10
-
-# Maximum number of locals for function / method body
-max-locals=20
-
-# Maximum number of return / yield for function / method body
-max-returns=6
-
-# Maximum number of branch for function / method body
-max-branches=20
-
-# Maximum number of statements in function / method body
-max-statements=50
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=7
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=1
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20
-
-
-[FORMAT]
-# Maximum number of characters on a single line.
-max-line-length=120
-
-# Maximum number of lines in a module
-max-module-lines=1000
-
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string='    '
-
-
-[MISCELLANEOUS]
-# List of note tags to take in consideration, separated by a comma.
-notes=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/setup.py new/copr-cli-1.110/setup.py
--- old/copr-cli-1.105/setup.py 2023-01-25 14:29:44.000000000 +0100
+++ new/copr-cli-1.110/setup.py 2023-08-16 16:47:20.000000000 +0200
@@ -19,7 +19,6 @@
     'simplejson',
     'jinja2',
     'setuptools',
-    'future',
 ]
 
 __name__ = 'copr-cli'
@@ -31,7 +30,7 @@
 
 setup(
     name=__name__,
-    version="1.105",
+    version="1.110",
     description=__description__,
     long_description=long_description,
     author=__author__,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/copr-cli-1.105/tests/resources/get_project_expected.txt 
new/copr-cli-1.110/tests/resources/get_project_expected.txt
--- old/copr-cli-1.105/tests/resources/get_project_expected.txt 1970-01-01 
01:00:00.000000000 +0100
+++ new/copr-cli-1.110/tests/resources/get_project_expected.txt 2023-08-16 
16:47:20.000000000 +0200
@@ -0,0 +1,5 @@
+Name: ruby193
+  Description: A recent stable release of Ruby with Rails 3.2.8 and a large 
collection of Ruby gems. This Software Collection gives developers on Red Hat 
Enterprise Linux 6 access to Ruby 1.9, which provides a number of new features 
and enhancements, including improved Unicode support, enhanced threading, and 
faster load times.
+  Repo(s):
+    epel-6-x86_64: 
http://copr-be.cloud.fedoraproject.org/results/rhscl/ruby193/epel-6-x86_64/
+  Additional repo: 
http://copr-be.cloud.fedoraproject.org/results/msuchy/scl-utils/epel-6-$basearch/
 http://copr-be.cloud.fedoraproject.org/results/rhscl/httpd24/epel-6-$basearch/ 
http://copr-be.cloud.fedoraproject.org/results/rhscl/v8314/epel-6-$basearch/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/copr-cli-1.105/tests/resources/get_project_response.json 
new/copr-cli-1.110/tests/resources/get_project_response.json
--- old/copr-cli-1.105/tests/resources/get_project_response.json        
1970-01-01 01:00:00.000000000 +0100
+++ new/copr-cli-1.110/tests/resources/get_project_response.json        
2023-08-16 16:47:20.000000000 +0200
@@ -0,0 +1,13 @@
+{
+  "chroot_repos": {
+    "epel-6-x86_64": 
"http://copr-be.cloud.fedoraproject.org/results/rhscl/ruby193/epel-6-x86_64/";
+  },
+  "additional_repos": [
+    
"http://copr-be.cloud.fedoraproject.org/results/msuchy/scl-utils/epel-6-$basearch/";,
+    
"http://copr-be.cloud.fedoraproject.org/results/rhscl/httpd24/epel-6-$basearch/";,
+    
"http://copr-be.cloud.fedoraproject.org/results/rhscl/v8314/epel-6-$basearch/";
+  ],
+  "description": "A recent stable release of Ruby with Rails 3.2.8 and a large 
collection of Ruby gems. This Software Collection gives developers on Red Hat 
Enterprise Linux 6 access to Ruby 1.9, which provides a number of new features 
and enhancements, including improved Unicode support, enhanced threading, and 
faster load times.",
+  "name": "ruby193",
+  "instructions": ""
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/tests/test_cli.py 
new/copr-cli-1.110/tests/test_cli.py
--- old/copr-cli-1.105/tests/test_cli.py        2023-01-23 01:47:56.000000000 
+0100
+++ new/copr-cli-1.110/tests/test_cli.py        2023-08-16 16:47:20.000000000 
+0200
@@ -471,6 +471,7 @@
         "unlisted_on_hp": None, "devel_mode": None, "enable_net": False,
         "bootstrap": "default",
         'isolation': 'default',
+        "follow_fedora_branching": True,
         "delete_after_days": None,
         "multilib": False,
         "module_hotfixes": False,
@@ -478,6 +479,7 @@
         "appstream": False,
         "runtime_dependencies": None,
         "packit_forge_projects_allowed": None,
+        "repo_priority": None,
     }
     assert stdout == "New project was successfully created: 
http://copr/coprs/jdoe/foo/\n";
 
@@ -566,6 +568,7 @@
         "unlisted_on_hp": None, "devel_mode": None, "enable_net": False,
         'bootstrap': 'default',
         'isolation': 'default',
+        "follow_fedora_branching": True,
         "delete_after_days": None,
         "multilib": True,
         "module_hotfixes": False,
@@ -573,15 +576,17 @@
         "appstream": False,
         "runtime_dependencies": None,
         "packit_forge_projects_allowed": None,
+        "repo_priority": None,
     }
     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"))
+@mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
 @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
 @mock.patch('copr_cli.main.Commands._watch_builds')
-def test_create_build_no_wait_ok(watch_builds, config_from_file, 
create_from_url, auth_check, capsys):
+def test_create_build_no_wait_ok(watch_builds, config_from_file,
+                                 create_from_url, _check_before_build, capsys):
     create_from_url.return_value = Munch(projectname="foo", id=123)
 
     main.main(argv=[
@@ -595,11 +600,13 @@
     assert not watch_builds.called
 
 
-@mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+@mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
 @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
 @mock.patch('copr_cli.main.Commands._watch_builds')
-def test_create_build_no_wait_error(watch_builds, 
config_from_file,create_from_url, autch_check, capsys):
+def test_create_build_no_wait_error(watch_builds, config_from_file,
+                                    create_from_url, _check_before_build,
+                                    capsys):
     response_message = "foobar"
     create_from_url.side_effect = 
copr.v3.CoprRequestException(response_message)
 
@@ -615,12 +622,13 @@
 
 
 @mock.patch('copr_cli.main.time')
-@mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+@mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
 @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
 @mock.patch('copr.v3.proxies.build.BuildProxy.get')
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
 def test_create_build_wait_succeeded_no_sleep(config_from_file, 
build_proxy_get,
-                                              create_from_url, auth_check, 
mock_time, capsys):
+                                              create_from_url, 
_check_before_build,
+                                              mock_time, capsys):
     create_from_url.return_value = Munch(projectname="foo", id=123)
     build_proxy_get.return_value = Munch(state="succeeded")
     main.main(argv=[
@@ -634,11 +642,13 @@
     assert not mock_time.sleep.called
 
 
-@mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+@mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
 @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
 @mock.patch('copr.v3.proxies.build.BuildProxy.get')
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
-def test_create_build_wait_error_status(config_from_file, build_proxy_get, 
create_from_url, auth_check, capsys):
+def test_create_build_wait_error_status(config_from_file, build_proxy_get,
+                                        create_from_url, _check_before_build,
+                                        capsys):
     create_from_url.return_value = Munch(projectname="foo", id=123)
     build_proxy_get.side_effect = copr.v3.CoprRequestException()
     with pytest.raises(SystemExit) as err:
@@ -653,11 +663,13 @@
     assert "Watching build" in stdout
 
 
-@mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+@mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
 @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
 @mock.patch('copr.v3.proxies.build.BuildProxy.get')
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
-def test_create_build_wait_unknown_build_status(config_from_file, 
build_proxy_get, create_from_url, auth_check, capsys):
+def test_create_build_wait_unknown_build_status(config_from_file, 
build_proxy_get,
+                                                create_from_url, 
_check_before_build,
+                                                capsys):
     create_from_url.return_value = Munch(projectname="foo", id=123)
     build_proxy_get.return_value = Munch(state="unknown")
     with pytest.raises(SystemExit) as err:
@@ -672,11 +684,13 @@
     assert "Watching build" in stdout
 
 
-@mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+@mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
 @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
 @mock.patch('copr.v3.proxies.build.BuildProxy.get')
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
-def test_create_build_wait_keyboard_interrupt(config_from_file, 
build_proxy_get, create_from_url, autch_check, capsys):
+def test_create_build_wait_keyboard_interrupt(config_from_file, 
build_proxy_get,
+                                              create_from_url, 
_check_before_build,
+                                              capsys):
     create_from_url.return_value = Munch(projectname="foo", id=123)
     build_proxy_get.side_effect = KeyboardInterrupt
 
@@ -694,11 +708,14 @@
 @mock.patch('copr_cli.main.config_from_file', return_value=mock_config)
 class TestCreateBuild(object):
 
-    @mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+    @mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
     @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
     @mock.patch('copr.v3.proxies.build.BuildProxy.get')
-    def test_create_build_wait_succeeded_complex(self, build_proxy_get, 
create_from_url, auth_check,
-                                                 config_from_file, mock_time, 
capsys):
+    def test_create_build_wait_succeeded_complex(self, build_proxy_get,
+                                                 create_from_url,
+                                                 _check_before_build,
+                                                 config_from_file,
+                                                 mock_time, capsys):
         create_from_url.return_value = Munch(projectname="foo", id=1)
         self.stage = 0
 
@@ -731,11 +748,13 @@
         assert "Watching build" in stdout
         assert len(mock_time.sleep.call_args_list) == 3
 
-    @mock.patch('copr.v3.proxies.BaseProxy.auth_check', 
return_value=Munch(name="test"))
+    @mock.patch('copr.v3.proxies.build.BuildProxy.check_before_build')
     @mock.patch('copr.v3.proxies.build.BuildProxy.create_from_url')
     @mock.patch('copr.v3.proxies.build.BuildProxy.get')
-    def test_create_build_wait_failed_complex(self, build_proxy_get, 
create_from_url, auth_check,
-                                              config_from_file, mock_time, 
capsys):
+    def test_create_build_wait_failed_complex(self, build_proxy_get,
+                                              create_from_url, 
_check_before_build,
+                                              config_from_file,
+                                              mock_time, capsys):
         create_from_url.return_value = Munch(projectname="foo", id=1)
         self.stage = 0
 
@@ -868,3 +887,16 @@
             assert kwargs['distgit'] == args[1]
         else:
             assert kwargs['distgit'] is None
+
+
+@responses.activate
+@mock.patch("copr_cli.main.config_from_file", return_value=mock_config)
+@mock.patch("copr.v3.proxies.project.ProjectProxy.get")
+def test_get_project(mock_get, config_from_file, capsys):  # pylint: 
disable=unused-argument
+    response_data = json.loads(read_res("get_project_response.json"))
+    expected_output = read_res("get_project_expected.txt")
+
+    mock_get.return_value = Munch(response_data)
+    main.main(argv=["get", "rhscl/ruby193"])
+    out, _ = capsys.readouterr()
+    assert expected_output in out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/copr-cli-1.105/tests/test_mock_config.py 
new/copr-cli-1.110/tests/test_mock_config.py
--- old/copr-cli-1.105/tests/test_mock_config.py        2021-12-12 
16:37:48.000000000 +0100
+++ new/copr-cli-1.110/tests/test_mock_config.py        2023-08-16 
16:47:20.000000000 +0200
@@ -44,7 +44,7 @@
             additional=""
 
         return """
-config_opts[config_opts['package_manager'] + '.conf'] += \"\"\"
+config_opts['dnf.conf'] += \"\"\"
 
 [copr_base]
 name="Copr repository"

++++++ remove-simplejson.patch ++++++
--- /var/tmp/diff_new_pack.v2SM2L/_old  2023-09-08 21:16:48.481187477 +0200
+++ /var/tmp/diff_new_pack.v2SM2L/_new  2023-09-08 21:16:48.485187620 +0200
@@ -4,8 +4,10 @@
  setup.py         |    1 -
  3 files changed, 2 insertions(+), 7 deletions(-)
 
---- a/copr-cli.spec
-+++ b/copr-cli.spec
+Index: copr-cli-1.110/copr-cli.spec
+===================================================================
+--- copr-cli-1.110.orig/copr-cli.spec
++++ copr-cli-1.110/copr-cli.spec
 @@ -32,7 +32,6 @@ BuildRequires: util-linux
  %if %{with python3}
  Requires:      python3-copr >= %min_python_copr_version
@@ -13,31 +15,32 @@
 -Requires:      python3-simplejson
  Requires:      python3-humanize
  Requires:      python3-koji
- Requires:      python3-future
-@@ -47,13 +46,11 @@ BuildRequires: python3-humanize
+ 
+@@ -46,12 +45,10 @@ BuildRequires: python3-humanize
  BuildRequires: python3-pytest
  BuildRequires: python3-responses
  BuildRequires: python3-setuptools
 -BuildRequires: python3-simplejson
  BuildRequires: python3-munch
- BuildRequires: python3-future
  %else
  Requires:      python-copr >= %min_python_copr_version
  Requires:      python-jinja2
 -Requires:      python-simplejson
  Requires:      python-humanize
- Requires:      python-future
  
-@@ -65,7 +62,6 @@ BuildRequires: python-humanize
+ BuildRequires: pytest
+@@ -62,7 +59,6 @@ BuildRequires: python-humanize
  BuildRequires: python-mock
  BuildRequires: python2-responses
  BuildRequires: python-setuptools
 -BuildRequires: python-simplejson
  BuildRequires: python-munch
- BuildRequires: python-future
  %endif
---- a/copr_cli/util.py
-+++ b/copr_cli/util.py
+ 
+Index: copr-cli-1.110/copr_cli/util.py
+===================================================================
+--- copr-cli-1.110.orig/copr_cli/util.py
++++ copr-cli-1.110/copr_cli/util.py
 @@ -1,7 +1,7 @@
  # coding: utf-8
  
@@ -53,8 +56,10 @@
  def json_dumps(result):
 -    return simplejson.dumps(serializable(result), indent=4, sort_keys=True, 
for_json=True)
 +    return json.dumps(serializable(result), indent=4, sort_keys=True)
---- a/setup.py
-+++ b/setup.py
+Index: copr-cli-1.110/setup.py
+===================================================================
+--- copr-cli-1.110.orig/setup.py
++++ copr-cli-1.110/setup.py
 @@ -16,7 +16,6 @@ This part is a command line interface to
  requires = [
      'copr',
@@ -62,5 +67,5 @@
 -    'simplejson',
      'jinja2',
      'setuptools',
-     'future',
+ ]
 

Reply via email to