Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-cliff for openSUSE:Factory 
checked in at 2022-05-14 22:52:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cliff (Old)
 and      /work/SRC/openSUSE:Factory/.python-cliff.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cliff"

Sat May 14 22:52:26 2022 rev:40 rq:977241 version:3.10.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cliff/python-cliff.changes        
2021-05-05 20:39:32.651033873 +0200
+++ /work/SRC/openSUSE:Factory/.python-cliff.new.1538/python-cliff.changes      
2022-05-14 22:52:39.031027520 +0200
@@ -1,0 +2,25 @@
+Sat May 14 12:26:14 UTC 2022 - cloud-de...@suse.de
+
+- update to version 3.10.1
+  - Removing modindex link from docs
+  - Automatically page interactive root help output
+
+-------------------------------------------------------------------
+Fri May 13 22:33:11 UTC 2022 - Dirk M??ller <dmuel...@suse.com>
+
+- remove six dependency 
+
+-------------------------------------------------------------------
+Tue Oct 26 22:13:33 UTC 2021 - cloud-de...@suse.de
+
+- update to version 3.9.0
+  - Add Python3 xena unit tests
+  - Replace getargspec with getfullargspec
+  - Handle SIGPIPE exit gracefully
+  - setup.cfg: Replace dashes with underscores
+  - Update unit test to satisfy python3.10+
+  - Add conflict_handler parameter as attribut in Command class
+  - Use py3 as the default runtime for tox
+  - Colourise and automatically page help output
+
+-------------------------------------------------------------------

Old:
----
  cliff-3.7.0.tar.gz

New:
----
  cliff-3.10.1.tar.gz

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

Other differences:
------------------
++++++ python-cliff.spec ++++++
--- /var/tmp/diff_new_pack.svaief/_old  2022-05-14 22:52:39.559028180 +0200
+++ /var/tmp/diff_new_pack.svaief/_new  2022-05-14 22:52:39.563028184 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cliff
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,32 +17,26 @@
 
 
 Name:           python-cliff
-Version:        3.7.0
+Version:        3.10.1
 Release:        0
 Summary:        Command Line Interface Formulation Framework
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://docs.openstack.org/cliff
-Source0:        
https://files.pythonhosted.org/packages/source/c/cliff/cliff-3.7.0.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/c/cliff/cliff-3.10.1.tar.gz
 BuildRequires:  openstack-macros
 BuildRequires:  python3-PrettyTable
 BuildRequires:  python3-PyYAML
+BuildRequires:  python3-autopage
 BuildRequires:  python3-cmd2
 BuildRequires:  python3-docutils
 BuildRequires:  python3-fixtures
-BuildRequires:  python3-mock
 BuildRequires:  python3-pbr
 BuildRequires:  python3-pytest
 BuildRequires:  python3-python-subunit
 BuildRequires:  python3-stevedore
 BuildRequires:  python3-testscenarios
 BuildRequires:  python3-testtools
-Requires:       python3-PrettyTable
-Requires:       python3-PyYAML
-Requires:       python3-cmd2
-Requires:       python3-pyparsing
-Requires:       python3-six
-Requires:       python3-stevedore
 BuildArch:      noarch
 
 %description
@@ -54,9 +48,9 @@
 Summary:        Command Line Interface Formulation Framework
 Requires:       python3-PrettyTable
 Requires:       python3-PyYAML
+Requires:       python3-autopage
 Requires:       python3-cmd2
 Requires:       python3-pyparsing
-Requires:       python3-six
 Requires:       python3-stevedore
 
 %description -n python3-cliff
@@ -80,12 +74,12 @@
 This package contains documentation files for %{name}.
 
 %prep
-%autosetup -p1 -n cliff-3.7.0
+%autosetup -p1 -n cliff-3.10.1
 %py_req_cleanup
 
 %build
 %py3_build
-PBR_VERSION=3.7.0 PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html
+PBR_VERSION=3.10.1 PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html
 rm -rf doc/build/html/.{doctrees,buildinfo}
 
 %install

++++++ _service ++++++
--- /var/tmp/diff_new_pack.svaief/_old  2022-05-14 22:52:39.599028230 +0200
+++ /var/tmp/diff_new_pack.svaief/_new  2022-05-14 22:52:39.603028234 +0200
@@ -1,6 +1,6 @@
 <services>
   <service mode="disabled" name="renderspec">
-    <param 
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/wallaby/openstack/cliff/cliff.spec.j2</param>
+    <param 
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/master/openstack/cliff/cliff.spec.j2</param>
     <param name="output-name">python-cliff.spec</param>
     <param name="changelog-email">cloud-de...@suse.de</param>
     <param name="changelog-provider">gh,openstack,cliff</param>

++++++ cliff-3.7.0.tar.gz -> cliff-3.10.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/.zuul.yaml new/cliff-3.10.1/.zuul.yaml
--- old/cliff-3.7.0/.zuul.yaml  2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/.zuul.yaml 2022-02-18 16:44:27.000000000 +0100
@@ -23,7 +23,7 @@
     templates:
       - check-requirements
       - lib-forward-testing-python3
-      - openstack-python3-wallaby-jobs
+      - openstack-python3-xena-jobs
       - publish-openstack-docs-pti
     check:
       jobs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/AUTHORS new/cliff-3.10.1/AUTHORS
--- old/cliff-3.7.0/AUTHORS     2021-02-16 11:01:11.000000000 +0100
+++ new/cliff-3.10.1/AUTHORS    2022-02-18 16:45:43.000000000 +0100
@@ -37,7 +37,9 @@
 Jamie Lennox <jamielen...@redhat.com>
 Jaspreet Singh Rawel <jaspreetsinghra...@gmail.com>
 Jeremy Stanley <fu...@yuggoth.org>
+Jiri Podivin <jpodi...@redhat.com>
 Joe Server <jser...@broadway.com>
+Joel Capitao <jcapi...@redhat.com>
 John Dennis <jden...@redhat.com>
 Jonathan LaCour <jonat...@cleverdevil.org>
 Juan Antonio Osorio Robles <jaosor...@redhat.com>
@@ -102,6 +104,7 @@
 lingyongxu <l...@fiberhome.com>
 liyingjun <yingjun...@kylin-cloud.com>
 markmcclain <m...@four-m.org>
+matbu <mat.bul...@gmail.com>
 melissaml <ma....@99cloud.net>
 qingszhao <zhao.daq...@99cloud.net>
 qneill <quentin.ne...@gmail.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/ChangeLog new/cliff-3.10.1/ChangeLog
--- old/cliff-3.7.0/ChangeLog   2021-02-16 11:01:11.000000000 +0100
+++ new/cliff-3.10.1/ChangeLog  2022-02-18 16:45:43.000000000 +0100
@@ -1,6 +1,32 @@
 CHANGES
 =======
 
+3.10.1
+------
+
+* Removing modindex link from docs
+
+3.10.0
+------
+
+
+3.9.0
+-----
+
+* Automatically page interactive root help output
+* Colourise and automatically page help output
+* Update unit test to satisfy python3.10+
+* Handle SIGPIPE exit gracefully
+* Add conflict\_handler parameter as attribut in Command class
+
+3.8.0
+-----
+
+* setup.cfg: Replace dashes with underscores
+* Replace getargspec with getfullargspec
+* Use py3 as the default runtime for tox
+* Add Python3 xena unit tests
+
 3.7.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/PKG-INFO new/cliff-3.10.1/PKG-INFO
--- old/cliff-3.7.0/PKG-INFO    2021-02-16 11:01:11.699111700 +0100
+++ new/cliff-3.10.1/PKG-INFO   2022-02-18 16:45:43.983875300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: cliff
-Version: 3.7.0
+Version: 3.10.1
 Summary: Command Line Interface Formulation Framework
 Home-page: https://docs.openstack.org/cliff/latest/
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/_argparse.py 
new/cliff-3.10.1/cliff/_argparse.py
--- old/cliff-3.7.0/cliff/_argparse.py  2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/cliff/_argparse.py 2022-02-18 16:44:27.000000000 +0100
@@ -12,9 +12,11 @@
 
 """Overrides of standard argparse behavior."""
 
-import argparse
+import argparse as orig_argparse
 import warnings
 
+from autopage import argparse
+
 
 class _ArgumentContainerMixIn(object):
 
@@ -75,12 +77,12 @@
             )
 
 
-class _ArgumentGroup(_ArgumentContainerMixIn, argparse._ArgumentGroup):
+class _ArgumentGroup(_ArgumentContainerMixIn, orig_argparse._ArgumentGroup):
     pass
 
 
 class _MutuallyExclusiveGroup(_ArgumentContainerMixIn,
-                              argparse._MutuallyExclusiveGroup):
+                              orig_argparse._MutuallyExclusiveGroup):
     pass
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/app.py 
new/cliff-3.10.1/cliff/app.py
--- old/cliff-3.7.0/cliff/app.py        2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/cliff/app.py       2022-02-18 16:44:27.000000000 +0100
@@ -13,6 +13,7 @@
 """Application base class.
 """
 
+import inspect
 import locale
 import logging
 import logging.handlers
@@ -32,6 +33,7 @@
 
 # Exit code for exiting due to a signal is 128 + the signal number
 _SIGINT_EXIT = 130
+_SIGPIPE_EXIT = 141
 
 
 class App(object):
@@ -255,6 +257,8 @@
                 remainder.insert(0, "help")
             self.initialize_app(remainder)
             self.print_help_if_requested()
+        except BrokenPipeError:
+            return _SIGPIPE_EXIT
         except Exception as err:
             if hasattr(self, 'options'):
                 debug = self.options.debug
@@ -274,6 +278,8 @@
         else:
             try:
                 result = self.run_subcommand(remainder)
+            except BrokenPipeError:
+                return _SIGPIPE_EXIT
             except KeyboardInterrupt:
                 return _SIGINT_EXIT
         return result
@@ -382,7 +388,7 @@
             return 2
         cmd_factory, cmd_name, sub_argv = subcommand
         kwargs = {}
-        if 'cmd_name' in utils.getargspec(cmd_factory.__init__).args:
+        if 'cmd_name' in inspect.getfullargspec(cmd_factory.__init__).args:
             kwargs['cmd_name'] = cmd_name
         cmd = cmd_factory(self, self.options, **kwargs)
         result = 1
@@ -399,6 +405,10 @@
             except SystemExit as ex:
                 raise cmd2.exceptions.Cmd2ArgparseError from ex
             result = cmd.run(parsed_args)
+        except BrokenPipeError as err1:
+            result = _SIGPIPE_EXIT
+            err = err1
+            raise
         except help.HelpExit:
             result = 0
         except Exception as err1:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/command.py 
new/cliff-3.10.1/cliff/command.py
--- old/cliff-3.7.0/cliff/command.py    2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/cliff/command.py   2022-02-18 16:44:27.000000000 +0100
@@ -74,6 +74,7 @@
     """
 
     deprecated = False
+    conflict_handler = 'ignore'
 
     _description = ''
     _epilog = None
@@ -156,7 +157,7 @@
             epilog=self.get_epilog(),
             prog=prog_name,
             formatter_class=_argparse.SmartHelpFormatter,
-            conflict_handler='ignore',
+            conflict_handler=self.conflict_handler,
         )
         for hook in self._hooks:
             hook.obj.get_parser(parser)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/commandmanager.py 
new/cliff-3.10.1/cliff/commandmanager.py
--- old/cliff-3.7.0/cliff/commandmanager.py     2021-02-16 11:00:25.000000000 
+0100
+++ new/cliff-3.10.1/cliff/commandmanager.py    2022-02-18 16:44:27.000000000 
+0100
@@ -13,12 +13,11 @@
 """Discover and lookup command plugins.
 """
 
+import inspect
 import logging
 
 import stevedore
 
-from . import utils
-
 
 LOG = logging.getLogger(__name__)
 
@@ -125,7 +124,7 @@
                 else:
                     # NOTE(dhellmann): Some fake classes don't take
                     # require as an argument. Yay?
-                    arg_spec = utils.getargspec(cmd_ep.load)
+                    arg_spec = inspect.getfullargspec(cmd_ep.load)
                     if 'require' in arg_spec[0]:
                         cmd_factory = cmd_ep.load(require=False)
                     else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/help.py 
new/cliff-3.10.1/cliff/help.py
--- old/cliff-3.7.0/cliff/help.py       2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/cliff/help.py      2022-02-18 16:44:27.000000000 +0100
@@ -14,8 +14,9 @@
 import inspect
 import traceback
 
+import autopage.argparse
+
 from . import command
-from . import utils
 
 
 class HelpExit(SystemExit):
@@ -38,43 +39,53 @@
     """
     def __call__(self, parser, namespace, values, option_string=None):
         app = self.default
-        parser.print_help(app.stdout)
-        app.stdout.write('\nCommands:\n')
-        dists_by_module = command._get_distributions_by_modules()
-
-        def dist_for_obj(obj):
-            name = inspect.getmodule(obj).__name__.partition('.')[0]
-            return dists_by_module.get(name)
-
-        app_dist = dist_for_obj(app)
-        command_manager = app.command_manager
-        for name, ep in sorted(command_manager):
-            try:
-                factory = ep.load()
-            except Exception:
-                app.stdout.write('Could not load %r\n' % ep)
-                if namespace.debug:
-                    traceback.print_exc(file=app.stdout)
-                continue
-            try:
-                kwargs = {}
-                if 'cmd_name' in utils.getargspec(factory.__init__).args:
-                    kwargs['cmd_name'] = name
-                cmd = factory(app, None, **kwargs)
-                if cmd.deprecated:
+        pager = autopage.argparse.help_pager(app.stdout)
+        color = pager.to_terminal()
+        autopage.argparse.use_color_for_parser(parser, color)
+        with pager as out:
+            parser.print_help(out)
+            title_hl = ('\033[4m', '\033[0m') if color else ('', '')
+            out.write('\n%sCommands%s:\n' % title_hl)
+            dists_by_module = command._get_distributions_by_modules()
+
+            def dist_for_obj(obj):
+                name = inspect.getmodule(obj).__name__.partition('.')[0]
+                return dists_by_module.get(name)
+
+            app_dist = dist_for_obj(app)
+            command_manager = app.command_manager
+            for name, ep in sorted(command_manager):
+                try:
+                    factory = ep.load()
+                except Exception:
+                    out.write('Could not load %r\n' % ep)
+                    if namespace.debug:
+                        traceback.print_exc(file=out)
+                    continue
+                try:
+                    kwargs = {}
+                    fact_args = inspect.getfullargspec(factory.__init__).args
+                    if 'cmd_name' in fact_args:
+                        kwargs['cmd_name'] = name
+                    cmd = factory(app, None, **kwargs)
+                    if cmd.deprecated:
+                        continue
+                except Exception as err:
+                    out.write('Could not instantiate %r: %s\n' % (ep, err))
+                    if namespace.debug:
+                        traceback.print_exc(file=out)
                     continue
-            except Exception as err:
-                app.stdout.write('Could not instantiate %r: %s\n' % (ep, err))
-                if namespace.debug:
-                    traceback.print_exc(file=app.stdout)
-                continue
-            one_liner = cmd.get_description().split('\n')[0]
-            dist_name = dist_for_obj(factory)
-            if dist_name and dist_name != app_dist:
-                dist_info = ' (' + dist_name + ')'
-            else:
-                dist_info = ''
-            app.stdout.write('  %-13s  %s%s\n' % (name, one_liner, dist_info))
+                one_liner = cmd.get_description().split('\n')[0]
+                dist_name = dist_for_obj(factory)
+                if dist_name and dist_name != app_dist:
+                    dist_info = ' (' + dist_name + ')'
+                    if color:
+                        dist_info = '\033[90m%s\033[39m' % dist_info
+                else:
+                    dist_info = ''
+                if color:
+                    name = '\033[36m%s\033[39m' % name
+                out.write('  %-13s  %s%s\n' % (name, one_liner, dist_info))
         raise HelpExit()
 
 
@@ -111,7 +122,7 @@
                 return
             self.app_args.cmd = search_args
             kwargs = {}
-            if 'cmd_name' in utils.getargspec(cmd_factory.__init__).args:
+            if 'cmd_name' in inspect.getfullargspec(cmd_factory.__init__).args:
                 kwargs['cmd_name'] = cmd_name
             cmd = cmd_factory(self.app, self.app_args, **kwargs)
             full_name = (cmd_name
@@ -119,7 +130,11 @@
                          else ' '.join([self.app.NAME, cmd_name])
                          )
             cmd_parser = cmd.get_parser(full_name)
-            cmd_parser.print_help(self.app.stdout)
+            pager = autopage.argparse.help_pager(self.app.stdout)
+            with pager as out:
+                autopage.argparse.use_color_for_parser(cmd_parser,
+                                                       pager.to_terminal())
+                cmd_parser.print_help(out)
         else:
             action = HelpAction(None, None, default=self.app)
             action(self.app.parser, self.app.options, None, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/interactive.py 
new/cliff-3.10.1/cliff/interactive.py
--- old/cliff-3.7.0/cliff/interactive.py        2021-02-16 11:00:25.000000000 
+0100
+++ new/cliff-3.10.1/cliff/interactive.py       2022-02-18 16:44:27.000000000 
+0100
@@ -17,6 +17,7 @@
 import shlex
 import sys
 
+import autopage.argparse
 import cmd2
 
 
@@ -140,9 +141,16 @@
                     parsed = lambda x: x  # noqa
             self.default(parsed('help ' + arg))
         else:
-            cmd2.Cmd.do_help(self, arg)
-            cmd_names = sorted([n for n, v in self.command_manager])
-            self.print_topics(self.app_cmd_header, cmd_names, 15, 80)
+            stdout = self.stdout
+            try:
+                with autopage.argparse.help_pager(stdout) as paged_out:
+                    self.stdout = paged_out
+
+                    cmd2.Cmd.do_help(self, arg)
+                    cmd_names = sorted([n for n, v in self.command_manager])
+                    self.print_topics(self.app_cmd_header, cmd_names, 15, 80)
+            finally:
+                self.stdout = stdout
         return
 
     # Create exit alias to quit the interactive shell.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/tests/test_app.py 
new/cliff-3.10.1/cliff/tests/test_app.py
--- old/cliff-3.7.0/cliff/tests/test_app.py     2021-02-16 11:00:25.000000000 
+0100
+++ new/cliff-3.10.1/cliff/tests/test_app.py    2022-02-18 16:44:27.000000000 
+0100
@@ -54,6 +54,15 @@
     interrupt_command.return_value = interrupt_command_inst
     cmd_mgr.add_command('interrupt', interrupt_command)
 
+    # Register a command that is interrrupted by a broken pipe
+    pipeclose_command = mock.Mock(name='pipeclose_command', spec=c_cmd.Command)
+    pipeclose_command_inst = mock.Mock(spec=c_cmd.Command)
+    pipeclose_command_inst.run = mock.Mock(
+        side_effect=BrokenPipeError
+    )
+    pipeclose_command.return_value = pipeclose_command_inst
+    cmd_mgr.add_command('pipe-close', pipeclose_command)
+
     app = application.App('testing interactive mode',
                           '1',
                           cmd_mgr,
@@ -121,6 +130,11 @@
         result = app.run(['interrupt'])
         self.assertEqual(result, 130)
 
+    def test_pipeclose_command(self):
+        app, command = make_app()
+        result = app.run(['pipe-close'])
+        self.assertEqual(result, 141)
+
     def test_clean_up_success(self):
         app, command = make_app()
         app.clean_up = mock.MagicMock(name='clean_up')
@@ -169,6 +183,19 @@
         args, kwargs = call_args
         self.assertIsInstance(args[2], KeyboardInterrupt)
 
+    def test_clean_up_pipeclose(self):
+        app, command = make_app()
+
+        app.clean_up = mock.MagicMock(name='clean_up')
+        ret = app.run(['pipe-close'])
+        self.assertNotEqual(ret, 0)
+
+        app.clean_up.assert_called_once_with(mock.ANY, mock.ANY, mock.ANY)
+        call_args = app.clean_up.call_args_list[0]
+        self.assertEqual(mock.call(mock.ANY, 141, mock.ANY), call_args)
+        args, kwargs = call_args
+        self.assertIsInstance(args[2], BrokenPipeError)
+
     def test_error_handling_clean_up_raises_exception(self):
         app, command = make_app()
 
@@ -356,6 +383,18 @@
     def test_interrupted_deferred_help(self):
         self._test_interrupted_help(True)
 
+    def _test_pipeclose_help(self, deferred_help):
+        app, _ = make_app(deferred_help=deferred_help)
+        with mock.patch('cliff.help.HelpAction.__call__',
+                        side_effect=BrokenPipeError):
+            app.run(['--help'])
+
+    def test_pipeclose_help(self):
+        self._test_pipeclose_help(False)
+
+    def test_pipeclose_deferred_help(self):
+        self._test_pipeclose_help(True)
+
     def test_subcommand_help(self):
         app, _ = make_app(deferred_help=False)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/tests/test_command.py 
new/cliff-3.10.1/cliff/tests/test_command.py
--- old/cliff-3.7.0/cliff/tests/test_command.py 2021-02-16 11:00:25.000000000 
+0100
+++ new/cliff-3.10.1/cliff/tests/test_command.py        2022-02-18 
16:44:27.000000000 +0100
@@ -172,3 +172,49 @@
         args = parser.parse_args(['-z', 'foo', 'a', 'b'])
         self.assertEqual(args.zippy, 'foo')
         self.assertEqual(args.zero, 'zero-default')
+
+    def test_with_conflict_handler(self):
+        cmd = TestCommand(None, None)
+        cmd.conflict_handler = 'resolve'
+        parser = cmd.get_parser('NAME')
+        self.assertEqual(parser.conflict_handler, 'resolve')
+
+    def test_raise_conflict_argument_error(self):
+        cmd = TestCommand(None, None)
+        parser = cmd.get_parser('NAME')
+        parser.add_argument(
+            '-f', '--foo',
+            dest='foo',
+            default='foo',
+        )
+        self.assertRaises(
+            argparse.ArgumentError,
+            parser.add_argument,
+            '-f',
+        )
+
+    def test_resolve_conflict_argument(self):
+        cmd = TestCommand(None, None)
+        cmd.conflict_handler = 'resolve'
+        parser = cmd.get_parser('NAME')
+        parser.add_argument(
+            '-f', '--foo',
+            dest='foo',
+            default='foo',
+        )
+        parser.add_argument(
+            '-f', '--foo',
+            dest='foo',
+            default='bar',
+        )
+        args = parser.parse_args(['a', 'b'])
+        self.assertEqual(args.foo, 'bar')
+
+    def test_wrong_conflict_handler(self):
+        cmd = TestCommand(None, None)
+        cmd.conflict_handler = 'wrong'
+        self.assertRaises(
+            ValueError,
+            cmd.get_parser,
+            'NAME',
+        )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/tests/test_help.py 
new/cliff-3.10.1/cliff/tests/test_help.py
--- old/cliff-3.7.0/cliff/tests/test_help.py    2021-02-16 11:00:25.000000000 
+0100
+++ new/cliff-3.10.1/cliff/tests/test_help.py   2022-02-18 16:44:27.000000000 
+0100
@@ -101,7 +101,7 @@
         help_text = stdout.getvalue()
         basecommand = os.path.split(sys.argv[0])[1]
         self.assertIn('usage: %s [--version]' % basecommand, help_text)
-        self.assertIn('optional arguments:\n  --version', help_text)
+        self.assertRegex(help_text, 'option(s|al arguments):\n  --version')
         expected = (
             '  one            Test command.\n'
             '  three word command  Test command.\n'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff/utils.py 
new/cliff-3.10.1/cliff/utils.py
--- old/cliff-3.7.0/cliff/utils.py      2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/cliff/utils.py     2022-02-18 16:44:27.000000000 +0100
@@ -12,7 +12,6 @@
 # limitations under the License.
 
 import ctypes
-import inspect
 import os
 import struct
 import sys
@@ -26,12 +25,6 @@
 COST = {'w': 0, 's': 2, 'a': 1, 'd': 3}
 
 
-if hasattr(inspect, 'getfullargspec'):
-    getargspec = inspect.getfullargspec
-else:
-    getargspec = inspect.getargspec
-
-
 def damerau_levenshtein(s1, s2, cost):
     """Calculates the Damerau-Levenshtein distance between two strings.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff.egg-info/PKG-INFO 
new/cliff-3.10.1/cliff.egg-info/PKG-INFO
--- old/cliff-3.7.0/cliff.egg-info/PKG-INFO     2021-02-16 11:01:11.000000000 
+0100
+++ new/cliff-3.10.1/cliff.egg-info/PKG-INFO    2022-02-18 16:45:43.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: cliff
-Version: 3.7.0
+Version: 3.10.1
 Summary: Command Line Interface Formulation Framework
 Home-page: https://docs.openstack.org/cliff/latest/
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff.egg-info/pbr.json 
new/cliff-3.10.1/cliff.egg-info/pbr.json
--- old/cliff-3.7.0/cliff.egg-info/pbr.json     2021-02-16 11:01:11.000000000 
+0100
+++ new/cliff-3.10.1/cliff.egg-info/pbr.json    2022-02-18 16:45:43.000000000 
+0100
@@ -1 +1 @@
-{"git_version": "117a100", "is_release": true}
\ No newline at end of file
+{"git_version": "a04a48f", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/cliff.egg-info/requires.txt 
new/cliff-3.10.1/cliff.egg-info/requires.txt
--- old/cliff-3.7.0/cliff.egg-info/requires.txt 2021-02-16 11:01:11.000000000 
+0100
+++ new/cliff-3.10.1/cliff.egg-info/requires.txt        2022-02-18 
16:45:43.000000000 +0100
@@ -1,5 +1,6 @@
 PrettyTable>=0.7.2
 PyYAML>=3.12
+autopage>=0.4.0
 cmd2>=1.0.0
 pbr!=2.1.0,>=2.0.0
 pyparsing>=2.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/doc/source/index.rst 
new/cliff-3.10.1/doc/source/index.rst
--- old/cliff-3.7.0/doc/source/index.rst        2021-02-16 11:00:25.000000000 
+0100
+++ new/cliff-3.10.1/doc/source/index.rst       2022-02-18 16:44:27.000000000 
+0100
@@ -18,5 +18,4 @@
 .. rubric:: Indices and tables
 
 * :ref:`genindex`
-* :ref:`modindex`
 * :ref:`search`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/requirements.txt 
new/cliff-3.10.1/requirements.txt
--- old/cliff-3.7.0/requirements.txt    2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/requirements.txt   2022-02-18 16:44:27.000000000 +0100
@@ -2,6 +2,7 @@
 # of appearance. Changing the order has an impact on the overall integration
 # process, which may cause wedges in the gate later.
 pbr!=2.1.0,>=2.0.0 # Apache-2.0
+autopage>=0.4.0 # Apache 2.0
 cmd2>=1.0.0 # MIT
 PrettyTable>=0.7.2 # BSD
 pyparsing>=2.1.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/setup.cfg new/cliff-3.10.1/setup.cfg
--- old/cliff-3.7.0/setup.cfg   2021-02-16 11:01:11.703112000 +0100
+++ new/cliff-3.10.1/setup.cfg  2022-02-18 16:45:43.983875300 +0100
@@ -1,11 +1,11 @@
 [metadata]
 name = cliff
-description-file = README.rst
+description_file = README.rst
 author = OpenStack
-author-email = openstack-disc...@lists.openstack.org
+author_email = openstack-disc...@lists.openstack.org
 summary = Command Line Interface Formulation Framework
-home-page = https://docs.openstack.org/cliff/latest/
-python-requires = >=3.6
+home_page = https://docs.openstack.org/cliff/latest/
+python_requires = >=3.6
 classifier = 
        Development Status :: 5 - Production/Stable
        License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cliff-3.7.0/tox.ini new/cliff-3.10.1/tox.ini
--- old/cliff-3.7.0/tox.ini     2021-02-16 11:00:25.000000000 +0100
+++ new/cliff-3.10.1/tox.ini    2022-02-18 16:44:27.000000000 +0100
@@ -1,6 +1,6 @@
 [tox]
 minversion = 3.1.0
-envlist = py38,pep8
+envlist = py3,pep8
 ignore_basepython_conflict = True
 
 [testenv]

Reply via email to