Hello community, here is the log from the commit of package python-cliff for openSUSE:Factory checked in at 2020-10-22 14:20:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cliff (Old) and /work/SRC/openSUSE:Factory/.python-cliff.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cliff" Thu Oct 22 14:20:00 2020 rev:38 rq:841173 version:3.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cliff/python-cliff.changes 2020-05-28 09:04:59.763287163 +0200 +++ /work/SRC/openSUSE:Factory/.python-cliff.new.3463/python-cliff.changes 2020-10-22 14:20:02.714629735 +0200 @@ -1,0 +2,17 @@ +Fri Oct 9 19:13:03 UTC 2020 - cloud-de...@suse.de + +- update to version 3.4.0 + - Migrate to stestr + - Remove python3.5 + - drop mock from lower-constraints and requirements + - switch to stevedore for loading entry points + - Switch to newer openstackdocstheme version + - Use unittest.mock instead of third party mock + - Remove unneeded tests + - Fix compatibility with new cmd2 + - Add Python3 victoria unit tests + - Import command group support from osc-lib + - Remove cap on cmd2 + - Stop to use the __future__ module. + +------------------------------------------------------------------- Old: ---- cliff-3.1.0.tar.gz New: ---- cliff-3.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cliff.spec ++++++ --- /var/tmp/diff_new_pack.VzDma0/_old 2020-10-22 14:20:03.446630393 +0200 +++ /var/tmp/diff_new_pack.VzDma0/_new 2020-10-22 14:20:03.450630396 +0200 @@ -17,13 +17,13 @@ Name: python-cliff -Version: 3.1.0 +Version: 3.4.0 Release: 0 Summary: Command Line Interface Formulation Framework License: Apache-2.0 Group: Development/Languages/Python URL: https://launchpad.net/python-cliff -Source0: https://files.pythonhosted.org/packages/source/c/cliff/cliff-3.1.0.tar.gz +Source0: https://files.pythonhosted.org/packages/source/c/cliff/cliff-3.4.0.tar.gz BuildRequires: openstack-macros BuildRequires: python3-PrettyTable BuildRequires: python3-PyYAML @@ -34,7 +34,6 @@ BuildRequires: python3-pbr BuildRequires: python3-pytest BuildRequires: python3-python-subunit -BuildRequires: python3-setuptools BuildRequires: python3-stevedore BuildRequires: python3-testscenarios BuildRequires: python3-testtools @@ -83,12 +82,12 @@ This package contains documentation files for %{name}. %prep -%autosetup -p1 -n cliff-3.1.0 +%autosetup -p1 -n cliff-3.4.0 %py_req_cleanup %build %py3_build -PBR_VERSION=3.1.0 PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html +PBR_VERSION=3.4.0 PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html rm -rf doc/build/html/.{doctrees,buildinfo} %install ++++++ _service ++++++ --- /var/tmp/diff_new_pack.VzDma0/_old 2020-10-22 14:20:03.482630425 +0200 +++ /var/tmp/diff_new_pack.VzDma0/_new 2020-10-22 14:20:03.482630425 +0200 @@ -1,6 +1,6 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/cliff/cliff.spec.j2</param> + <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/victoria/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.1.0.tar.gz -> cliff-3.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/.testr.conf new/cliff-3.4.0/.testr.conf --- old/cliff-3.1.0/.testr.conf 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/.testr.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ./cliff $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/.zuul.yaml new/cliff-3.4.0/.zuul.yaml --- old/cliff-3.1.0/.zuul.yaml 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/.zuul.yaml 2020-08-03 17:18:18.000000000 +0200 @@ -24,8 +24,7 @@ - check-requirements - lib-forward-testing-python3 - openstack-lower-constraints-jobs - - openstack-python35-jobs - - openstack-python3-ussuri-jobs + - openstack-python3-victoria-jobs - publish-openstack-docs-pti check: jobs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/AUTHORS new/cliff-3.4.0/AUTHORS --- old/cliff-3.1.0/AUTHORS 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/AUTHORS 2020-08-03 17:19:06.000000000 +0200 @@ -25,6 +25,7 @@ Duncan McGreggor <dun...@dreamhost.com> Eric Fried <openst...@fried.cc> Eyal Posener <e...@stratoscale.com> +Felix Yan <felixonm...@archlinux.org> Feodor Tersin <fter...@cloudscaling.com> Flavio Percoco <flape...@gmail.com> Ghanshyam Mann <gm...@ghanshyammann.com> @@ -57,10 +58,12 @@ Neil Borle <neil.bo...@emc.com> Nguyen Hung Phuong <phuon...@vn.fujitsu.com> Nicola Soranzo <nicola.sora...@earlham.ac.uk> +OpenStack Release Bot <infra-r...@openstack.org> Pierre-André MOREY <k...@mifamofi.net> Qiu Yu <qi...@ebaysf.com> Rajath Agasthya <rajathagast...@gmail.com> Ricardo Kirkner <rica...@kirkner.com.ar> +Rodolfo Alonso Hernandez <ralon...@redhat.com> Rui Chen <chenrui.m...@gmail.com> Ruslan Aliev <ral...@mirantis.com> Ryan Petrello <li...@ryanpetrello.com> @@ -99,5 +102,6 @@ qingszhao <zhao.daq...@99cloud.net> qneill <quentin.ne...@gmail.com> shizhihui <zhihui....@easystack.cn> +wu.chunyang <wchy1...@gmail.com> xuanyandong <xuanyand...@inspur.com> yanpuqing <ya...@awcloud.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/ChangeLog new/cliff-3.4.0/ChangeLog --- old/cliff-3.1.0/ChangeLog 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/ChangeLog 2020-08-03 17:19:06.000000000 +0200 @@ -1,6 +1,30 @@ CHANGES ======= +3.4.0 +----- + +* switch to stevedore for loading entry points + +3.3.0 +----- + +* Remove cap on cmd2 +* Fix compatibility with new cmd2 + +3.2.0 +----- + +* drop mock from lower-constraints and requirements +* Import command group support from osc-lib +* Remove unneeded tests +* Migrate to stestr +* Remove python3.5 +* Stop to use the \_\_future\_\_ module +* Switch to newer openstackdocstheme version +* Use unittest.mock instead of third party mock +* Add Python3 victoria unit tests + 3.1.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/PKG-INFO new/cliff-3.4.0/PKG-INFO --- old/cliff-3.1.0/PKG-INFO 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/PKG-INFO 2020-08-03 17:19:07.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: cliff -Version: 3.1.0 +Version: 3.4.0 Summary: Command Line Interface Formulation Framework Home-page: https://docs.openstack.org/cliff/latest/ Author: OpenStack @@ -37,11 +37,10 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Intended Audience :: Developers Classifier: Environment :: Console -Requires-Python: >=3.5 +Requires-Python: >=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/_argparse.py new/cliff-3.4.0/cliff/_argparse.py --- old/cliff-3.1.0/cliff/_argparse.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/_argparse.py 2020-08-03 17:18:18.000000000 +0200 @@ -12,8 +12,6 @@ """Overrides of standard argparse behavior.""" -from __future__ import absolute_import - import argparse import sys import warnings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/command.py new/cliff-3.4.0/cliff/command.py --- old/cliff-3.1.0/cliff/command.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/command.py 2020-08-03 17:18:18.000000000 +0200 @@ -13,7 +13,6 @@ import abc import inspect -import pkg_resources import six from stevedore import extension @@ -31,6 +30,7 @@ command to be installed, so we need to look up the values. """ + import pkg_resources global _dists_by_mods if _dists_by_mods is None: results = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/commandmanager.py new/cliff-3.4.0/cliff/commandmanager.py --- old/cliff-3.1.0/cliff/commandmanager.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/commandmanager.py 2020-08-03 17:18:18.000000000 +0200 @@ -15,7 +15,7 @@ import logging -import pkg_resources +import stevedore from . import utils @@ -61,6 +61,7 @@ self._legacy = {} self.namespace = namespace self.convert_underscores = convert_underscores + self.group_list = [] self._load_commands() def _load_commands(self): @@ -70,12 +71,13 @@ def load_commands(self, namespace): """Load all the commands from an entrypoint""" - for ep in pkg_resources.iter_entry_points(namespace): + self.group_list.append(namespace) + for ep in stevedore.ExtensionManager(namespace): LOG.debug('found command %r', ep.name) cmd_name = (ep.name.replace('_', ' ') if self.convert_underscores else ep.name) - self.commands[cmd_name] = ep + self.commands[cmd_name] = ep.entry_point return def __iter__(self): @@ -143,3 +145,26 @@ if arg.startswith('-'): return i return len(argv) + + def add_command_group(self, group=None): + """Adds another group of command entrypoints""" + if group: + self.load_commands(group) + + def get_command_groups(self): + """Returns a list of the loaded command groups""" + return self.group_list + + def get_command_names(self, group=None): + """Returns a list of commands loaded for the specified group""" + group_list = [] + if group is not None: + for ep in stevedore.ExtensionManager(group): + cmd_name = ( + ep.name.replace('_', ' ') + if self.convert_underscores + else ep.name + ) + group_list.append(cmd_name) + return group_list + return list(self.commands.keys()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/interactive.py new/cliff-3.4.0/cliff/interactive.py --- old/cliff-3.1.0/cliff/interactive.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/interactive.py 2020-08-03 17:18:18.000000000 +0200 @@ -158,6 +158,16 @@ ] def precmd(self, statement): + """Hook method executed just before the command is executed by + :meth:`~cmd2.Cmd.onecmd` and after adding it to history. + + :param statement: subclass of str which also contains the parsed input + :return: a potentially modified version of the input Statement object + """ + # NOTE(mordred): The above docstring is copied in from cmd2 because + # current cmd2 has a docstring that sphinx finds if we don't override + # it, and it breaks sphinx. + # Pre-process the parsed command in case it looks like one of # our subcommands, since cmd2 does not handle multi-part # command names by default. @@ -175,9 +185,18 @@ statement.parsed.args = ' '.join(sub_argv) else: # cmd2 >= 0.9.1 uses shlex and gives us a Statement. - statement.command = cmd_name - statement.argv = [cmd_name] + sub_argv - statement.args = ' '.join(statement.argv) + statement = cmd2.Statement( + ' '.join(sub_argv), + raw=statement.raw, + command=cmd_name, + arg_list=sub_argv, + multiline_command=statement.multiline_command, + terminator=statement.terminator, + suffix=statement.suffix, + pipe_to=statement.pipe_to, + output=statement.output, + output_to=statement.output_to, + ) return statement def cmdloop(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_app.py new/cliff-3.4.0/cliff/tests/test_app.py --- old/cliff-3.1.0/cliff/tests/test_app.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_app.py 2020-08-03 17:18:18.000000000 +0200 @@ -21,8 +21,8 @@ from io import StringIO import sys -import mock import six +from unittest import mock from cliff import app as application from cliff import command as c_cmd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_command_hooks.py new/cliff-3.4.0/cliff/tests/test_command_hooks.py --- old/cliff-3.1.0/cliff/tests/test_command_hooks.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_command_hooks.py 2020-08-03 17:18:18.000000000 +0200 @@ -18,8 +18,8 @@ from cliff import show from cliff.tests import base -import mock from stevedore import extension +from unittest import mock def make_app(**kwargs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_commandmanager.py new/cliff-3.4.0/cliff/tests/test_commandmanager.py --- old/cliff-3.1.0/cliff/tests/test_commandmanager.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_commandmanager.py 2020-08-03 17:18:18.000000000 +0200 @@ -10,8 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock import testscenarios +from unittest import mock from cliff import command from cliff import commandmanager @@ -116,39 +116,39 @@ def test_load_commands(self): testcmd = mock.Mock(name='testcmd') testcmd.name.replace.return_value = 'test' - mock_pkg_resources = mock.Mock(return_value=[testcmd]) - with mock.patch('pkg_resources.iter_entry_points', - mock_pkg_resources) as iter_entry_points: + mock_get_group_all = mock.Mock(return_value=[testcmd]) + with mock.patch('stevedore.ExtensionManager', + mock_get_group_all) as mock_manager: mgr = commandmanager.CommandManager('test') - iter_entry_points.assert_called_once_with('test') + mock_manager.assert_called_once_with('test') names = [n for n, v in mgr] self.assertEqual(['test'], names) def test_load_commands_keep_underscores(self): testcmd = mock.Mock() testcmd.name = 'test_cmd' - mock_pkg_resources = mock.Mock(return_value=[testcmd]) - with mock.patch('pkg_resources.iter_entry_points', - mock_pkg_resources) as iter_entry_points: + mock_get_group_all = mock.Mock(return_value=[testcmd]) + with mock.patch('stevedore.ExtensionManager', + mock_get_group_all) as mock_manager: mgr = commandmanager.CommandManager( 'test', convert_underscores=False, ) - iter_entry_points.assert_called_once_with('test') + mock_manager.assert_called_once_with('test') names = [n for n, v in mgr] self.assertEqual(['test_cmd'], names) def test_load_commands_replace_underscores(self): testcmd = mock.Mock() testcmd.name = 'test_cmd' - mock_pkg_resources = mock.Mock(return_value=[testcmd]) - with mock.patch('pkg_resources.iter_entry_points', - mock_pkg_resources) as iter_entry_points: + mock_get_group_all = mock.Mock(return_value=[testcmd]) + with mock.patch('stevedore.ExtensionManager', + mock_get_group_all) as mock_manager: mgr = commandmanager.CommandManager( 'test', convert_underscores=True, ) - iter_entry_points.assert_called_once_with('test') + mock_manager.assert_called_once_with('test') names = [n for n, v in mgr] self.assertEqual(['test cmd'], names) @@ -253,3 +253,92 @@ ['server list'], commandmanager._get_commands_by_partial_name( ['serve', 'l'], self.commands)) + + +class FakeCommand(object): + + @classmethod + def load(cls): + return cls + + def __init__(self): + return + + +FAKE_CMD_ONE = FakeCommand +FAKE_CMD_TWO = FakeCommand +FAKE_CMD_ALPHA = FakeCommand +FAKE_CMD_BETA = FakeCommand + + +class FakeCommandManager(commandmanager.CommandManager): + commands = {} + + def load_commands(self, namespace): + if namespace == 'test': + self.commands['one'] = FAKE_CMD_ONE + self.commands['two'] = FAKE_CMD_TWO + self.group_list.append(namespace) + elif namespace == 'greek': + self.commands['alpha'] = FAKE_CMD_ALPHA + self.commands['beta'] = FAKE_CMD_BETA + self.group_list.append(namespace) + + +class TestCommandManagerGroups(base.TestBase): + + def test_add_command_group(self): + mgr = FakeCommandManager('test') + + # Make sure add_command() still functions + mock_cmd_one = mock.Mock() + mgr.add_command('mock', mock_cmd_one) + cmd_mock, name, args = mgr.find_command(['mock']) + self.assertEqual(mock_cmd_one, cmd_mock) + + # Find a command added in initialization + cmd_one, name, args = mgr.find_command(['one']) + self.assertEqual(FAKE_CMD_ONE, cmd_one) + + # Load another command group + mgr.add_command_group('greek') + + # Find a new command + cmd_alpha, name, args = mgr.find_command(['alpha']) + self.assertEqual(FAKE_CMD_ALPHA, cmd_alpha) + + # Ensure that the original commands were not overwritten + cmd_two, name, args = mgr.find_command(['two']) + self.assertEqual(FAKE_CMD_TWO, cmd_two) + + def test_get_command_groups(self): + mgr = FakeCommandManager('test') + + # Make sure add_command() still functions + mock_cmd_one = mock.Mock() + mgr.add_command('mock', mock_cmd_one) + cmd_mock, name, args = mgr.find_command(['mock']) + self.assertEqual(mock_cmd_one, cmd_mock) + + # Load another command group + mgr.add_command_group('greek') + + gl = mgr.get_command_groups() + self.assertEqual(['test', 'greek'], gl) + + def test_get_command_names(self): + mock_cmd_one = mock.Mock() + mock_cmd_one.name = 'one' + mock_cmd_two = mock.Mock() + mock_cmd_two.name = 'cmd two' + mock_get_group_all = mock.Mock( + return_value=[mock_cmd_one, mock_cmd_two], + ) + with mock.patch( + 'stevedore.ExtensionManager', + mock_get_group_all, + ) as mock_manager: + mgr = commandmanager.CommandManager('test') + mock_manager.assert_called_once_with('test') + cmds = mgr.get_command_names('test') + self.assertEqual(['one', 'cmd two'], cmds) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_complete.py new/cliff-3.4.0/cliff/tests/test_complete.py --- old/cliff-3.1.0/cliff/tests/test_complete.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_complete.py 2020-08-03 17:18:18.000000000 +0200 @@ -13,7 +13,7 @@ """Bash completion tests """ -import mock +from unittest import mock from cliff import app as application from cliff import commandmanager diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_formatters_csv.py new/cliff-3.4.0/cliff/tests/test_formatters_csv.py --- old/cliff-3.1.0/cliff/tests/test_formatters_csv.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_formatters_csv.py 2020-08-03 17:18:18.000000000 +0200 @@ -16,8 +16,8 @@ import argparse import unittest -import mock import six +from unittest import mock from cliff.formatters import commaseparated from cliff.tests import test_columns diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_formatters_json.py new/cliff-3.4.0/cliff/tests/test_formatters_json.py --- old/cliff-3.1.0/cliff/tests/test_formatters_json.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_formatters_json.py 2020-08-03 17:18:18.000000000 +0200 @@ -18,8 +18,8 @@ from cliff.tests import base from cliff.tests import test_columns -import mock import six +from unittest import mock class TestJSONFormatter(base.TestBase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_formatters_shell.py new/cliff-3.4.0/cliff/tests/test_formatters_shell.py --- old/cliff-3.1.0/cliff/tests/test_formatters_shell.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_formatters_shell.py 2020-08-03 17:18:18.000000000 +0200 @@ -15,12 +15,12 @@ import argparse import six +from unittest import mock + from cliff.formatters import shell from cliff.tests import base from cliff.tests import test_columns -import mock - class TestShellFormatter(base.TestBase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_formatters_table.py new/cliff-3.4.0/cliff/tests/test_formatters_table.py --- old/cliff-3.1.0/cliff/tests/test_formatters_table.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_formatters_table.py 2020-08-03 17:18:18.000000000 +0200 @@ -16,8 +16,8 @@ import os import textwrap -import mock from six import StringIO +from unittest import mock from cliff.formatters import table from cliff.tests import base diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_formatters_yaml.py new/cliff-3.4.0/cliff/tests/test_formatters_yaml.py --- old/cliff-3.1.0/cliff/tests/test_formatters_yaml.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_formatters_yaml.py 2020-08-03 17:18:18.000000000 +0200 @@ -15,12 +15,12 @@ import six import yaml +from unittest import mock + from cliff.formatters import yaml_format from cliff.tests import base from cliff.tests import test_columns -import mock - class TestYAMLFormatter(base.TestBase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_help.py new/cliff-3.4.0/cliff/tests/test_help.py --- old/cliff-3.1.0/cliff/tests/test_help.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_help.py 2020-08-03 17:18:18.000000000 +0200 @@ -17,7 +17,7 @@ import os import sys -import mock +from unittest import mock from cliff import app as application from cliff import commandmanager diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_lister.py new/cliff-3.4.0/cliff/tests/test_lister.py --- old/cliff-3.1.0/cliff/tests/test_lister.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_lister.py 2020-08-03 17:18:18.000000000 +0200 @@ -14,11 +14,11 @@ import weakref +from unittest import mock + from cliff import lister from cliff.tests import base -import mock - class FauxFormatter(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_show.py new/cliff-3.4.0/cliff/tests/test_show.py --- old/cliff-3.1.0/cliff/tests/test_show.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_show.py 2020-08-03 17:18:18.000000000 +0200 @@ -14,11 +14,11 @@ import weakref +from unittest import mock + from cliff import show from cliff.tests import base -import mock - class FauxFormatter(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff/tests/test_utils.py new/cliff-3.4.0/cliff/tests/test_utils.py --- old/cliff-3.1.0/cliff/tests/test_utils.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/cliff/tests/test_utils.py 2020-08-03 17:18:18.000000000 +0200 @@ -13,11 +13,9 @@ # under the License. import os -import struct import sys -import unittest -import mock +from unittest import mock from cliff import utils from cliff.tests import base @@ -32,8 +30,6 @@ if width is not None: self.assertIsInstance(width, int) - @unittest.skipIf(not hasattr(os, 'get_terminal_size'), - 'only needed for python 3.3 onwards') @mock.patch('cliff.utils.os') def test_get_terminal_size(self, mock_os): ts = os.terminal_size((10, 5)) @@ -43,35 +39,3 @@ mock_os.get_terminal_size.side_effect = OSError() width = utils.terminal_width(sys.stdout) self.assertIs(None, width) - - @unittest.skipIf(hasattr(os, 'get_terminal_size'), - 'only needed for python 3.2 and before') - @mock.patch('fcntl.ioctl') - def test_ioctl(self, mock_ioctl): - mock_ioctl.return_value = struct.pack('hhhh', 57, 101, 0, 0) - width = utils.terminal_width(sys.stdout) - self.assertEqual(101, width) - mock_ioctl.side_effect = IOError() - width = utils.terminal_width(sys.stdout) - self.assertIs(None, width) - - @unittest.skipIf(hasattr(os, 'get_terminal_size'), - 'only needed for python 3.2 and before') - @mock.patch('cliff.utils.ctypes') - @mock.patch('sys.platform', 'win32') - def test_windows(self, mock_ctypes): - mock_ctypes.create_string_buffer.return_value.raw = struct.pack( - 'hhhhHhhhhhh', 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - mock_ctypes.windll.kernel32.GetStdHandle.return_value = -11 - mock_ctypes.windll.kernel32.GetConsoleScreenBufferInfo.return_value = 1 - - width = utils.terminal_width(sys.stdout) - self.assertEqual(101, width) - - mock_ctypes.windll.kernel32.GetConsoleScreenBufferInfo.return_value = 0 - - width = utils.terminal_width(sys.stdout) - self.assertIs(None, width) - - width = utils.terminal_width('foo') - self.assertIs(None, width) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff.egg-info/PKG-INFO new/cliff-3.4.0/cliff.egg-info/PKG-INFO --- old/cliff-3.1.0/cliff.egg-info/PKG-INFO 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/cliff.egg-info/PKG-INFO 2020-08-03 17:19:06.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: cliff -Version: 3.1.0 +Version: 3.4.0 Summary: Command Line Interface Formulation Framework Home-page: https://docs.openstack.org/cliff/latest/ Author: OpenStack @@ -37,11 +37,10 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Intended Audience :: Developers Classifier: Environment :: Console -Requires-Python: >=3.5 +Requires-Python: >=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff.egg-info/SOURCES.txt new/cliff-3.4.0/cliff.egg-info/SOURCES.txt --- old/cliff-3.1.0/cliff.egg-info/SOURCES.txt 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/cliff.egg-info/SOURCES.txt 2020-08-03 17:19:07.000000000 +0200 @@ -1,5 +1,4 @@ .stestr.conf -.testr.conf .zuul.yaml AUTHORS CONTRIBUTING.rst @@ -93,4 +92,5 @@ doc/source/user/sphinxext.rst integration-tests/neutronclient-tip.sh integration-tests/openstackclient-tip.sh +releasenotes/notes/command-group-8c00f260340a130c.yaml releasenotes/notes/drop-python27-support-b16c9e5a9e2000ef.yaml \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff.egg-info/pbr.json new/cliff-3.4.0/cliff.egg-info/pbr.json --- old/cliff-3.1.0/cliff.egg-info/pbr.json 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/cliff.egg-info/pbr.json 2020-08-03 17:19:06.000000000 +0200 @@ -1 +1 @@ -{"git_version": "5405c3d", "is_release": true} \ No newline at end of file +{"git_version": "6ac510d", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/cliff.egg-info/requires.txt new/cliff-3.4.0/cliff.egg-info/requires.txt --- old/cliff-3.1.0/cliff.egg-info/requires.txt 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/cliff.egg-info/requires.txt 2020-08-03 17:19:06.000000000 +0200 @@ -1,7 +1,7 @@ -pbr!=2.1.0,>=2.0.0 -cmd2!=0.8.3,<0.9.0,>=0.8.0 PrettyTable<0.8,>=0.7.2 +PyYAML>=3.12 +cmd2!=0.8.3,>=0.8.0 +pbr!=2.1.0,>=2.0.0 pyparsing>=2.1.0 six>=1.10.0 -stevedore>=1.20.0 -PyYAML>=3.12 +stevedore>=2.0.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/doc/requirements.txt new/cliff-3.4.0/doc/requirements.txt --- old/cliff-3.1.0/doc/requirements.txt 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/doc/requirements.txt 2020-08-03 17:18:18.000000000 +0200 @@ -1,5 +1,5 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/doc/source/conf.py new/cliff-3.4.0/doc/source/conf.py --- old/cliff-3.1.0/doc/source/conf.py 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/doc/source/conf.py 2020-08-03 17:18:18.000000000 +0200 @@ -51,9 +51,10 @@ extensions.append('openstackdocstheme') # openstackdocstheme options -repository_name = 'openstack/cliff' -bug_project = 'python-cliff' -bug_tag = '' +openstackdocs_repo_name = 'openstack/cliff' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'python-cliff' +openstackdocs_bug_tag = '' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -101,7 +102,7 @@ # show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/lower-constraints.txt new/cliff-3.4.0/lower-constraints.txt --- old/cliff-3.1.0/lower-constraints.txt 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/lower-constraints.txt 2020-08-03 17:18:18.000000000 +0200 @@ -12,7 +12,6 @@ Jinja2==2.10 linecache2==1.0.0 MarkupSafe==1.0 -mock==2.0.0 pbr==2.0.0 prettytable==0.7.2 Pygments==2.2.0 @@ -26,10 +25,10 @@ six==1.10.0 smmap==0.9.0 snowballstemmer==1.2.1 -Sphinx==1.6.2 +Sphinx==2.0.0 sphinxcontrib-websupport==1.0.1 -stevedore==1.20.0 -testrepository==0.0.18 +stestr==1.0.0 +stevedore==2.0.1 testscenarios==0.4 testtools==2.2.0 traceback2==1.4.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/releasenotes/notes/command-group-8c00f260340a130c.yaml new/cliff-3.4.0/releasenotes/notes/command-group-8c00f260340a130c.yaml --- old/cliff-3.1.0/releasenotes/notes/command-group-8c00f260340a130c.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/cliff-3.4.0/releasenotes/notes/command-group-8c00f260340a130c.yaml 2020-08-03 17:18:18.000000000 +0200 @@ -0,0 +1,5 @@ +--- +features: + - | + Added support for command groups. This was originally added + in osc_lib downstream. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/requirements.txt new/cliff-3.4.0/requirements.txt --- old/cliff-3.1.0/requirements.txt 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/requirements.txt 2020-08-03 17:18:18.000000000 +0200 @@ -2,9 +2,9 @@ # 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 -cmd2>=0.8.0,!=0.8.3,<0.9.0 # MIT +cmd2>=0.8.0,!=0.8.3 # MIT PrettyTable<0.8,>=0.7.2 # BSD pyparsing>=2.1.0 # MIT six>=1.10.0 # MIT -stevedore>=1.20.0 # Apache-2.0 +stevedore>=2.0.1 # Apache-2.0 PyYAML>=3.12 # MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/setup.cfg new/cliff-3.4.0/setup.cfg --- old/cliff-3.1.0/setup.cfg 2020-03-27 11:46:48.000000000 +0100 +++ new/cliff-3.4.0/setup.cfg 2020-08-03 17:19:07.000000000 +0200 @@ -5,13 +5,12 @@ author-email = openstack-disc...@lists.openstack.org summary = Command Line Interface Formulation Framework home-page = https://docs.openstack.org/cliff/latest/ -python-requires = >=3.5 +python-requires = >=3.6 classifier = Development Status :: 5 - Production/Stable License :: OSI Approved :: Apache Software License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3 :: Only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/test-requirements.txt new/cliff-3.4.0/test-requirements.txt --- old/cliff-3.1.0/test-requirements.txt 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/test-requirements.txt 2020-08-03 17:18:18.000000000 +0200 @@ -3,16 +3,15 @@ # process, which may cause wedges in the gate later. python-subunit>=1.0.0 # Apache-2.0/BSD -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=1.0.0 # Apache-2.0 testtools>=2.2.0 # MIT -mock>=2.0.0 # BSD testscenarios>=0.4 # Apache-2.0/BSD coverage!=4.4,>=4.0 # Apache-2.0 # sphinx is required in test-requirements in addition to doc/requirements # because there is a sphinx extension that has tests -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD # Bandit security code scanner bandit>=1.1.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-3.1.0/tox.ini new/cliff-3.4.0/tox.ini --- old/cliff-3.1.0/tox.ini 2020-03-27 11:45:44.000000000 +0100 +++ new/cliff-3.4.0/tox.ini 2020-08-03 17:18:18.000000000 +0200 @@ -12,8 +12,8 @@ OS_TEST_TIMEOUT=60 distribute = False commands = - python setup.py test --coverage --coverage-package-name=cliff --slowest --testr-args='{posargs}' - coverage report --show-missing + stestr run {posargs} + stestr slowest deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt} -r{toxinidir}/test-requirements.txt @@ -53,3 +53,13 @@ -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt + +[testenv:cover] +setenv = + {[testenv]setenv} + PYTHON=coverage run --source cliff --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml