Hello community, here is the log from the commit of package python-cliff for openSUSE:Factory checked in at 2015-09-02 00:35:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cliff (Old) and /work/SRC/openSUSE:Factory/.python-cliff.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-cliff" Changes: -------- --- /work/SRC/openSUSE:Factory/python-cliff/python-cliff.changes 2015-08-01 11:37:03.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-cliff.new/python-cliff.changes 2015-09-02 00:35:51.000000000 +0200 @@ -1,0 +2,23 @@ +Fri Aug 21 09:06:27 UTC 2015 - tbechtold@suse.com + +- update to 1.14.0: + * Add csv formatter test + * Fix encoding issue with the default python csv output + * Remove py26 as a default test from tox.ini + * Set demo app up with deferred help + * Add command fuzzy matching + * Updated from global requirements + * Remove requirements.txt from tox.ini + * Updated from global requirements + * Updated from global requirements + * Allow subcommands to accept --help when using 'deferred_help' + * Updated from global requirements + * Fix logging config in demo app + * Use base command for help test + * Updated from global requirements + * Include the automatically-generated changelog + * Updated from global requirements +- Adjust Requires according to requirements.txt +- Refreshed relax-sphinx-requirement.patch + +------------------------------------------------------------------- Old: ---- cliff-1.13.0.tar.gz New: ---- cliff-1.14.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cliff.spec ++++++ --- /var/tmp/diff_new_pack.bnvs7r/_old 2015-09-02 00:35:52.000000000 +0200 +++ /var/tmp/diff_new_pack.bnvs7r/_new 2015-09-02 00:35:52.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-cliff -Version: 1.13.0 +Version: 1.14.0 Release: 0 Url: https://github.com/dreamhost/cliff Summary: Command Line Interface Formulation Framework @@ -35,7 +35,7 @@ BuildRequires: python-cmd2 BuildRequires: python-coverage >= 3.6 BuildRequires: python-httplib2 >= 0.7.5 -BuildRequires: python-mock >= 1.0 +BuildRequires: python-mock >= 1.2 BuildRequires: python-nose BuildRequires: python-oslosphinx BuildRequires: python-pbr @@ -49,7 +49,8 @@ Requires: python-cmd2 >= 0.6.7 Requires: python-pyparsing >= 2.0.1 Requires: python-six >= 1.9.0 -Requires: python-stevedore >= 1.1.0 +Requires: python-stevedore >= 1.5.0 +Requires: python-unicodecsv >= 0.8.0 %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %py_requires ++++++ cliff-1.13.0.tar.gz -> cliff-1.14.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/AUTHORS new/cliff-1.14.0/AUTHORS --- old/cliff-1.13.0/AUTHORS 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/AUTHORS 2015-08-10 22:16:17.000000000 +0200 @@ -6,6 +6,7 @@ Christophe CHAUVET <christophe.chauvet@gmail.com> Clint Byrum <clint@fewbar.com> Dean Troyer <dtroyer@gmail.com> +Derek Higgins <derekh@redhat.com> Dirk Mueller <dirk@dmllr.de> Dirk Mueller <dirk@dmllr> Doug Hellmann <doug.hellmann@dreamhost.com> @@ -25,11 +26,14 @@ Qiu Yu <qiuyu@ebaysf.com> Ryan Petrello <lists@ryanpetrello.com> Sascha Peilicke <saschpe@gmx.de> +Sean Perry <sean.perry@hp.com> Terry Howe <terrylhowe@gmail.com> TerryHowe <terrylhowe@gmail.com> Thomas Bechtold <tbechtold@suse.com> Tomaz Muraus <tomaz@tomaz.me> Yalei Wang <yalei.wang@intel.com> +gcmalloc <gcmalloc@gmail.com> heavenshell <heavenshell.jp@gmail.com> +kafka <guowang@unitedstack.com> markmcclain <mark@four-m.org> qneill <quentin.neill@gmail.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/ChangeLog new/cliff-1.14.0/ChangeLog --- old/cliff-1.13.0/ChangeLog 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/ChangeLog 2015-08-10 22:16:17.000000000 +0200 @@ -1,6 +1,26 @@ CHANGES ======= +1.14.0 +------ + +* Add csv formatter test +* Fix encoding issue with the default python csv output +* Remove py26 as a default test from tox.ini +* Set demo app up with deferred help +* Add command fuzzy matching +* Updated from global requirements +* Remove requirements.txt from tox.ini +* Updated from global requirements +* Updated from global requirements +* Allow subcommands to accept --help when using 'deferred_help' +* Updated from global requirements +* Fix logging config in demo app +* Use base command for help test +* Updated from global requirements +* Include the automatically-generated changelog +* Updated from global requirements + 1.13.0 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/PKG-INFO new/cliff-1.14.0/PKG-INFO --- old/cliff-1.13.0/PKG-INFO 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/PKG-INFO 2015-08-10 22:16:17.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cliff -Version: 1.13.0 +Version: 1.14.0 Summary: Command Line Interface Formulation Framework Home-page: https://launchpad.net/python-cliff Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff/app.py new/cliff-1.14.0/cliff/app.py --- old/cliff-1.13.0/cliff/app.py 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/cliff/app.py 2015-08-10 22:16:00.000000000 +0200 @@ -9,9 +9,11 @@ import logging.handlers import os import sys +import operator from .complete import CompleteCommand from .help import HelpAction, HelpCommand +from .utils import damerau_levenshtein, COST # Make sure the cliff library has a logging handler # in case the app developer doesn't set up logging. @@ -221,6 +223,18 @@ self.options, remainder = self.parser.parse_known_args(argv) self.configure_logging() self.interactive_mode = not remainder + if self.deferred_help and self.options.deferred_help and remainder: + # When help is requested and `remainder` has any values disable + # `deferred_help` and instead allow the help subcommand to + # handle the request during run_subcommand(). This turns + # "app foo bar --help" into "app help foo bar". However, when + # `remainder` is empty use print_help_if_requested() to allow + # for an early exit. + # Disabling `deferred_help` here also ensures that + # print_help_if_requested will not fire if called by a subclass + # during its initialize_app(). + self.options.deferred_help = False + remainder.insert(0, "help") self.initialize_app(remainder) self.print_help_if_requested() except Exception as err: @@ -287,14 +301,60 @@ self.interpreter.cmdloop() return 0 + def get_fuzzy_matches(self, cmd): + """return fuzzy matches of unknown command + """ + + sep = '_' + if self.command_manager.convert_underscores: + sep = ' ' + all_cmds = [k[0] for k in self.command_manager] + dist = [] + for candidate in sorted(all_cmds): + prefix = candidate.split(sep)[0] + # Give prefix match a very good score + if candidate.startswith(cmd): + dist.append((candidate, 0)) + continue + # Levenshtein distance + dist.append((candidate, damerau_levenshtein(cmd, prefix, COST)+1)) + dist = sorted(dist, key=operator.itemgetter(1, 0)) + matches = [] + i = 0 + # Find the best similarity + while (not dist[i][1]): + matches.append(dist[i][0]) + i += 1 + best_similarity = dist[i][1] + while (dist[i][1] == best_similarity): + matches.append(dist[i][0]) + i += 1 + + return matches + def run_subcommand(self, argv): try: subcommand = self.command_manager.find_command(argv) except ValueError as err: - if self.options.debug: - raise + # If there was no exact match, try to find a fuzzy match + the_cmd = argv[0] + fuzzy_matches = self.get_fuzzy_matches(the_cmd) + if fuzzy_matches: + article = 'a' + if self.NAME[0] in 'aeiou': + article = 'an' + self.stdout.write('%s: \'%s\' is not %s %s command. ' + 'See \'%s --help\'.\n' + % (self.NAME, the_cmd, article, + self.NAME, self.NAME)) + self.stdout.write('Did you mean one of these?\n') + for match in fuzzy_matches: + self.stdout.write(' %s\n' % match) else: - self.LOG.error(err) + if self.options.debug: + raise + else: + self.LOG.error(err) return 2 cmd_factory, cmd_name, sub_argv = subcommand kwargs = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff/formatters/commaseparated.py new/cliff-1.14.0/cliff/formatters/commaseparated.py --- old/cliff-1.13.0/cliff/formatters/commaseparated.py 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/cliff/formatters/commaseparated.py 2015-08-10 22:16:00.000000000 +0200 @@ -1,7 +1,7 @@ """Output formatters using csv format. """ -import csv +import unicodecsv as csv import os from .base import ListFormatter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff/tests/test_app.py new/cliff-1.14.0/cliff/tests/test_app.py --- old/cliff-1.13.0/cliff/tests/test_app.py 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/cliff/tests/test_app.py 2015-08-10 22:16:00.000000000 +0200 @@ -3,8 +3,7 @@ try: from StringIO import StringIO except ImportError: - # Probably python 3, that test won't be run so ignore the error - pass + from io import StringIO import sys import nose @@ -13,6 +12,7 @@ from cliff.app import App from cliff.command import Command from cliff.commandmanager import CommandManager +from cliff.tests import utils def make_app(**kwargs): @@ -401,6 +401,26 @@ _test_help(True) +def test_subcommand_help(): + app, _ = make_app(deferred_help=False) + + # Help is called immediately + with mock.patch('cliff.help.HelpAction.__call__') as helper: + app.run(['show', 'files', '--help']) + + assert helper.called + + +def test_subcommand_deferred_help(): + app, _ = make_app(deferred_help=True) + + # Show that provide_help_if_requested() did not show help and exit + with mock.patch.object(app, 'run_subcommand') as helper: + app.run(['show', 'files', '--help']) + + helper.assert_called_once_with(['help', 'show', 'files']) + + def test_unknown_cmd(): app, command = make_app() assert app.run(['hell']) == 2 @@ -412,3 +432,19 @@ app.run(['--debug', 'hell']) == 2 except ValueError as err: assert "['hell']" in ('%s' % err) + + +def test_list_matching_commands(): + stdout = StringIO() + app = App('testing', '1', + utils.TestCommandManager(utils.TEST_NAMESPACE), + stdout=stdout) + app.NAME = 'test' + try: + assert app.run(['t']) == 2 + except SystemExit: + pass + output = stdout.getvalue() + assert "test: 't' is not a test command. See 'test --help'." in output + assert 'Did you mean one of these?' in output + assert 'three word command\n two words\n' in output diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff/tests/test_formatters_csv.py new/cliff-1.14.0/cliff/tests/test_formatters_csv.py --- old/cliff-1.13.0/cliff/tests/test_formatters_csv.py 1970-01-01 01:00:00.000000000 +0100 +++ new/cliff-1.14.0/cliff/tests/test_formatters_csv.py 2015-08-10 22:16:00.000000000 +0200 @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import mock + +import six + +from cliff.formatters import commaseparated + + +def test_commaseparated_list_formatter(): + sf = commaseparated.CSVLister() + c = ('a', 'b', 'c') + d1 = ('A', 'B', 'C') + d2 = ('D', 'E', 'F') + data = [d1, d2] + expected = 'a,b,c\nA,B,C\nD,E,F\n' + output = six.StringIO() + parsed_args = mock.Mock() + parsed_args.quote_mode = 'none' + sf.emit_list(c, data, output, parsed_args) + actual = output.getvalue() + assert expected == actual + + +def test_commaseparated_list_formatter_unicode(): + sf = commaseparated.CSVLister() + c = (u'a', u'b', u'c') + d1 = (u'A', u'B', u'C') + happy = u'高兴' + d2 = (u'D', u'E', happy) + data = [d1, d2] + expected = u'a,b,c\nA,B,C\nD,E,%s\n' % happy + output = six.StringIO() + parsed_args = mock.Mock() + parsed_args.quote_mode = 'none' + sf.emit_list(c, data, output, parsed_args) + actual = output.getvalue() + if six.PY2: + actual = actual.decode('utf-8') + assert expected == actual diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff/tests/test_help.py new/cliff-1.14.0/cliff/tests/test_help.py --- old/cliff-1.13.0/cliff/tests/test_help.py 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/cliff/tests/test_help.py 2015-08-10 22:16:00.000000000 +0200 @@ -2,6 +2,8 @@ from StringIO import StringIO except: from io import StringIO +import os +import sys import mock @@ -89,7 +91,8 @@ except SystemExit: pass help_text = stdout.getvalue() - assert 'usage: nosetests [--version]' in help_text + basecommand = os.path.split(sys.argv[0])[1] + assert 'usage: %s [--version]' % basecommand in help_text assert 'optional arguments:\n --version' in help_text assert 'one \n three word command \n' in help_text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff/utils.py new/cliff-1.14.0/cliff/utils.py --- old/cliff-1.13.0/cliff/utils.py 1970-01-01 01:00:00.000000000 +0100 +++ new/cliff-1.14.0/cliff/utils.py 2015-08-10 22:16:00.000000000 +0200 @@ -0,0 +1,88 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Each edit operation is assigned different cost, such as: +# 'w' means swap operation, the cost is 0; +# 's' means substitution operation, the cost is 2; +# 'a' means insertion operation, the cost is 1; +# 'd' means deletion operation, the cost is 3; +# The smaller cost results in the better similarity. +COST = {'w': 0, 's': 2, 'a': 1, 'd': 3} + + +def damerau_levenshtein(s1, s2, cost): + """Calculates the Damerau-Levenshtein distance between two strings. + + The Levenshtein distance says the minimum number of single-character edits + (i.e. insertions, deletions, swap or substitution) required to change one + string to the other. + The idea is to reserve a matrix to hold the Levenshtein distances between + all prefixes of the first string and all prefixes of the second, then we + can compute the values in the matrix in a dynamic programming fashion. To + avoid a large space complexity, only the last three rows in the matrix is + needed.(row2 holds the current row, row1 holds the previous row, and row0 + the row before that.) + + More details: + https://en.wikipedia.org/wiki/Levenshtein_distance + https://github.com/git/git/commit/8af84dadb142f7321ff0ce8690385e99da8ede2f + """ + + if s1 == s2: + return 0 + + len1 = len(s1) + len2 = len(s2) + + if len1 == 0: + return len2 * cost['a'] + if len2 == 0: + return len1 * cost['d'] + + row1 = [i * cost['a'] for i in range(len2 + 1)] + row2 = row1[:] + row0 = row1[:] + + for i in range(len1): + row2[0] = (i + 1) * cost['d'] + + for j in range(len2): + + # substitution + sub_cost = row1[j] + (s1[i] != s2[j]) * cost['s'] + + # insertion + ins_cost = row2[j] + cost['a'] + + # deletion + del_cost = row1[j + 1] + cost['d'] + + # swap + swp_condition = ((i > 0) + and (j > 0) + and (s1[i - 1] == s2[j]) + and (s1[i] == s2[j - 1]) + ) + + # min cost + if swp_condition: + swp_cost = row0[j - 1] + cost['w'] + p_cost = min(sub_cost, ins_cost, del_cost, swp_cost) + else: + p_cost = min(sub_cost, ins_cost, del_cost) + + row2[j + 1] = p_cost + + row0, row1, row2 = row1, row2, row0 + + return row1[-1] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff.egg-info/PKG-INFO new/cliff-1.14.0/cliff.egg-info/PKG-INFO --- old/cliff-1.13.0/cliff.egg-info/PKG-INFO 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/cliff.egg-info/PKG-INFO 2015-08-10 22:16:17.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cliff -Version: 1.13.0 +Version: 1.14.0 Summary: Command Line Interface Formulation Framework Home-page: https://launchpad.net/python-cliff Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff.egg-info/SOURCES.txt new/cliff-1.14.0/cliff.egg-info/SOURCES.txt --- old/cliff-1.13.0/cliff.egg-info/SOURCES.txt 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/cliff.egg-info/SOURCES.txt 2015-08-10 22:16:17.000000000 +0200 @@ -23,6 +23,7 @@ cliff/interactive.py cliff/lister.py cliff/show.py +cliff/utils.py cliff.egg-info/PKG-INFO cliff.egg-info/SOURCES.txt cliff.egg-info/dependency_links.txt @@ -42,6 +43,7 @@ cliff/tests/test_command.py cliff/tests/test_commandmanager.py cliff/tests/test_complete.py +cliff/tests/test_formatters_csv.py cliff/tests/test_formatters_shell.py cliff/tests/test_formatters_value.py cliff/tests/test_help.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff.egg-info/pbr.json new/cliff-1.14.0/cliff.egg-info/pbr.json --- old/cliff-1.13.0/cliff.egg-info/pbr.json 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/cliff.egg-info/pbr.json 2015-08-10 22:16:17.000000000 +0200 @@ -1 +1 @@ -{"git_version": "bff7d6b", "is_release": true} \ No newline at end of file +{"git_version": "3473869", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/cliff.egg-info/requires.txt new/cliff-1.14.0/cliff.egg-info/requires.txt --- old/cliff-1.13.0/cliff.egg-info/requires.txt 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/cliff.egg-info/requires.txt 2015-08-10 22:16:17.000000000 +0200 @@ -1,7 +1,8 @@ -pbr>=0.11,<2.0 +pbr<2.0,>=1.3 argparse cmd2>=0.6.7 -PrettyTable>=0.7,<0.8 +PrettyTable<0.8,>=0.7 pyparsing>=2.0.1 six>=1.9.0 -stevedore>=1.3.0 # Apache-2.0 +stevedore>=1.5.0 # Apache-2.0 +unicodecsv>=0.8.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/demoapp/cliffdemo/main.py new/cliff-1.14.0/demoapp/cliffdemo/main.py --- old/cliff-1.13.0/demoapp/cliffdemo/main.py 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/demoapp/cliffdemo/main.py 2015-08-10 22:16:00.000000000 +0200 @@ -1,4 +1,3 @@ -import logging import sys from cliff.app import App @@ -7,25 +6,24 @@ class DemoApp(App): - log = logging.getLogger(__name__) - def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manager=CommandManager('cliff.demo'), + deferred_help=True, ) def initialize_app(self, argv): - self.log.debug('initialize_app') + self.LOG.debug('initialize_app') def prepare_to_run_command(self, cmd): - self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__) + self.LOG.debug('prepare_to_run_command %s', cmd.__class__.__name__) def clean_up(self, cmd, result, err): - self.log.debug('clean_up %s', cmd.__class__.__name__) + self.LOG.debug('clean_up %s', cmd.__class__.__name__) if err: - self.log.debug('got an error: %s', err) + self.LOG.debug('got an error: %s', err) def main(argv=sys.argv[1:]): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/doc/source/demoapp.rst new/cliff-1.14.0/doc/source/demoapp.rst --- old/cliff-1.13.0/doc/source/demoapp.rst 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/doc/source/demoapp.rst 2015-08-10 22:16:00.000000000 +0200 @@ -66,6 +66,10 @@ (.venv)$ cliffdemo help files +or the ``--help`` option:: + + (.venv)$ cliffdemo files --help + The Source ========== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/doc/source/history.rst new/cliff-1.14.0/doc/source/history.rst --- old/cliff-1.13.0/doc/source/history.rst 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/doc/source/history.rst 2015-08-10 22:16:00.000000000 +0200 @@ -1,230 +1 @@ -================= - Release History -================= - -1.7.0 ------ - -* Updated dependencies from OpenStack global requirements -* Clean up default tox environment list -* Do not allow wheels for stable tests -* Set the main logger name to match the application -* CSV formatter should use system-dependent line ending -* Make show option compatible with Python 2.6 -* Use six.add_metaclass instead of __metaclass__ -* fixed typos found by RETF rules -* The --variable option to shell format is redundant -* Expose load_commands publicly -* Fix wrong method name assert_called_once -* Fix pep8 failures on rule E265 - -1.6.1 ------ - -* Remove PrettyTable from documentation requirements -* Fix a bug in ShellFormatter's escaping of double quotes in strings -* Import run_cross_tests.sh from oslo-incubator -* add doc requirements to venv - -1.6.0 ------ - -* Add max-width support for table formatter -* Add value only output formattter -* Update readme with links to bug tracker and source -* Move pep8 dependency into pep8 tox test -* Fix doc build with Python 2.6.x -* Fix interactive mode with command line args -* Update .gitreview after repo rename -* Escape double quotes in shell formatter -* Add unit test for shell formatter -* Rename private attribute to avoid conflict -* Sync with global requirements -* Add integration tests with known consumers -* update history for previous change -* Make the formatters a private part of the command - -1.5.2 ------ - -- Fix the arguments passed to commands when they are instantiated to - pull out help. See https://github.com/dreamhost/cliff/issues/52 for - details. -- Add bash command completion. (Contributed by Terry Howe) -- Use stevedore to load formatter plugins. -- Use pbr for packaging. - -1.4.5 ------ - -- Update the pyparsing dependency to a version that supports both - Python 2 and Python 3. -- Add PyPy testing. - -1.4.4 ------ - -- Provide better error handling for unknown commands run from the - command line. (Contributed by Christophe Chauvet.) - -1.4.3 ------ - -- More stdout encoding issues with Python 2.6. - -1.4.2 ------ - -- Fix an issue with unicode output under Python 2.6. See - https://github.com/dreamhost/cliff/pull/40 for details. - -1.4.1 ------ - -- Add ``dict2columns`` method to ``ShowOne``. (Contributed by Dean - Troyer) -- Pin the requirement for cmd2 more tightly. - -1.4 ---- - -- Store a reference to the InteractiveApp on the App while in - interactive mode to allow commands to update the interactive - state. (Contributed by Tomaz Muraus) -- Remove reliance on distribute, now that it has merged with - setuptools 0.7. Providing an explicit dependency on setuptools - breaks updates in some cases, so just fail if it isn't there. - -1.3.3 ------ - - - Restore compatibility with prettytable < 0.7.2 by forcing no - output if there is no data (instead of printing an empty - table). Contributed by Dirk Mueller. - - Update to allow cmd2 version 0.6.5.1. Contributed by Dirk Mueller. - -1.3.2 ------ - - - Add ``convert_underscores`` parameter to ``CommandManager`` ``__init__`` - method to allow underscores to be used in command names. This optional - argument is defaulted to True to maintain current behavior. - (contributed by Joe Server) - - Use flake8_ for style checking. - - Relax version requirement for PrettyTable dependency to allow - point releases of 0.7. - -.. _flake8: https://pypi.python.org/pypi/flake8 - -1.3.1 ------ - - - Sort list of commands in interactive help mode. (contributed by - Ilya Shakhat) - - Fix a dependency issue with PyParsing until the cmd2 package can - release an update setting the version of its dependency based on - the Python version. - -1.3 ---- - - - Allow user to pass ``argparse_kwargs`` argument to the - ``build_option_parser`` method. This argument can contain extra - keyword arguments which are passed to the ``ArgumentParser`` constructor. - (contributed by Tomaz Muraus) - - Updated documentation to include dependency on distribute. - -1.2.1 ------ - - - Fix problem with documentation packaging. - - Fix problem with missing ``izip`` import in ``lister.py``. - -1.2 ---- - - - Fix problem with interactive mode ``help`` command. - - Disable logging by default but add a ``--log-file`` option to - re-enable it at runtime. - - Add support for python 2.6. (contributed by Mark McClain for - OpenStack Quantum) - -1.1.2 ------ - - - Fix a packaging problem introduced in version 1.1. - -1.1 ---- - - - Move tablib support (JSON, YAML, and HTML formatters) to a - separate project to comply with Ubuntu packaging requirements. See - https://github.com/dreamhost/cliff-tablib - -1.0 ---- - - - Add trailing newlines after output from tablib-based formatters - (JSON, YAML, and HTML). Contributed by Matt Joyce. - - Some :pep:`8` fixes. - - Refactor the API in :class:`Command` to add :func:`take_action` - and make :func:`run` a concrete method. Existing users should only - need to rename :func:`run()` to :func:`take_action()` since the - function signatures have not changed. - - In :class:`Lister` and :class:`ShowOne` use :func:`take_action` - instead of :func:`get_data`. - -0.7 ---- - - - Clean up interactive mode flag setting. - - Add support for Python 2.6, contributed by heavenshell. - - Fix multi-word commands in interactive mode. - -0.6 ---- - - - Pass the non-global argument list to :func:`initialize_app` to be - used in initialization work. - -0.5.1 ------ - - - Remove pinned version requirement for PrettyTable until the - OpenStack clients catch up to the API change. - -0.5 ---- - - - Asking for help about a command by prefix lists all matching - commands. - - Add formatters for HTML, JSON, and YAML. - -0.4 ---- - - - Add shell formatter for single objects. - - Add interactive mode. - - Expand documentation. - -0.3 ---- - - - Add ShowOne base class for commands that show details about single - objects. - - Fix a problem with Lister when there is no data to be printed. - -0.2 ---- - - - Incorporate changes from dtroyer to replace use of optparse in App - with argparse. - - Added "help" subcommand to replace ``--help`` option handling in - subcommands. - -0.1 ---- - - - Initial public release. - - Included App, CommandManager, Lister, csv and table formatters, a - demo application, and basic documentation. +.. include:: ../../ChangeLog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/requirements.txt new/cliff-1.14.0/requirements.txt --- old/cliff-1.13.0/requirements.txt 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/requirements.txt 2015-08-10 22:16:00.000000000 +0200 @@ -1,10 +1,11 @@ # 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. -pbr>=0.11,<2.0 +pbr<2.0,>=1.3 argparse cmd2>=0.6.7 -PrettyTable>=0.7,<0.8 +PrettyTable<0.8,>=0.7 pyparsing>=2.0.1 six>=1.9.0 -stevedore>=1.3.0 # Apache-2.0 +stevedore>=1.5.0 # Apache-2.0 +unicodecsv>=0.8.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/setup.cfg new/cliff-1.14.0/setup.cfg --- old/cliff-1.13.0/setup.cfg 2015-06-09 18:23:57.000000000 +0200 +++ new/cliff-1.14.0/setup.cfg 2015-08-10 22:16:17.000000000 +0200 @@ -44,7 +44,7 @@ source-dir = doc/source [egg_info] +tag_build = tag_date = 0 tag_svn_revision = 0 -tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/setup.py new/cliff-1.14.0/setup.py --- old/cliff-1.13.0/setup.py 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/setup.py 2015-08-10 22:16:00.000000000 +0200 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,5 +25,5 @@ pass setuptools.setup( - setup_requires=['pbr'], + setup_requires=['pbr>=1.3'], pbr=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/test-requirements.txt new/cliff-1.14.0/test-requirements.txt --- old/cliff-1.13.0/test-requirements.txt 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/test-requirements.txt 2015-08-10 22:16:00.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. nose -mock>=1.0 +mock>=1.2 coverage>=3.6 # this is required for the docs build jobs -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 -oslosphinx>=2.5.0 # Apache-2.0 +sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +oslosphinx>=2.5.0 # Apache-2.0 httplib2>=0.7.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cliff-1.13.0/tox.ini new/cliff-1.14.0/tox.ini --- old/cliff-1.13.0/tox.ini 2015-06-09 18:23:37.000000000 +0200 +++ new/cliff-1.14.0/tox.ini 2015-08-10 22:16:00.000000000 +0200 @@ -1,13 +1,11 @@ [tox] -envlist = py34,py26,py27,pypy,pep8 +envlist = py34,py27,pypy,pep8 [testenv] distribute = False install_command = pip install -U {opts} {packages} commands = nosetests -d --with-coverage --cover-inclusive --cover-package cliff [] -deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps = -r{toxinidir}/test-requirements.txt [testenv:pep8] deps = flake8 ++++++ relax-sphinx-requirement.patch ++++++ --- /var/tmp/diff_new_pack.bnvs7r/_old 2015-09-02 00:35:52.000000000 +0200 +++ /var/tmp/diff_new_pack.bnvs7r/_new 2015-09-02 00:35:52.000000000 +0200 @@ -1,10 +1,12 @@ ---- test-requirements.txt +Index: test-requirements.txt +=================================================================== +--- test-requirements.txt.orig +++ test-requirements.txt -@@ -5,6 +5,6 @@ - mock>=1.0 +@@ -5,6 +5,6 @@ nose + mock>=1.2 coverage>=3.6 # this is required for the docs build jobs --sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +-sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +sphinx - oslosphinx>=2.5.0 # Apache-2.0 + oslosphinx>=2.5.0 # Apache-2.0 httplib2>=0.7.5