Hello community, here is the log from the commit of package python-argh for openSUSE:Factory checked in at 2013-09-26 19:45:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-argh (Old) and /work/SRC/openSUSE:Factory/.python-argh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-argh" Changes: -------- --- /work/SRC/openSUSE:Factory/python-argh/python-argh.changes 2013-03-08 13:26:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-argh.new/python-argh.changes 2013-09-26 19:45:52.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Sep 25 17:18:00 UTC 2013 - [email protected] + +- Update to version 0.23.3 + + No changelog available + +------------------------------------------------------------------- Old: ---- argh-0.23.0.tar.gz New: ---- argh-0.23.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-argh.spec ++++++ --- /var/tmp/diff_new_pack.CwviG9/_old 2013-09-26 19:45:54.000000000 +0200 +++ /var/tmp/diff_new_pack.CwviG9/_new 2013-09-26 19:45:54.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-argh -Version: 0.23.0 +Version: 0.23.3 Release: 0 Url: http://bitbucket.org/neithere/argh/ Summary: A simple argparse wrapper ++++++ argh-0.23.0.tar.gz -> argh-0.23.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/PKG-INFO new/argh-0.23.3/PKG-INFO --- old/argh-0.23.0/PKG-INFO 2013-01-30 02:14:00.000000000 +0100 +++ new/argh-0.23.3/PKG-INFO 2013-08-20 14:06:34.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: argh -Version: 0.23.0 +Version: 0.23.3 Summary: An unobtrusive argparse wrapper with natural syntax -Home-page: http://bitbucket.org/neithere/argh/ +Home-page: http://github.com/neithere/argh/ Author: Andrey Mikhaylenko Author-email: [email protected] License: GNU Lesser General Public License (LGPL), Version 3 -Download-URL: http://bitbucket.org/neithere/argh/src/ Description: Argh: The Natural CLI ===================== @@ -159,10 +158,10 @@ * Direct e-mail (neithere at gmail com) * Twitter_ (to get notified of commits; mostly for lulz) - .. _project home page: http://bitbucket.org/neithere/argh/ + .. _project home page: http://github.com/neithere/argh/ .. _documentation: http://argh.readthedocs.org .. _package distribution: http://pypi.python.org/pypi/argh - .. _issue tracker: http://bitbucket.org/neithere/argh/issues/ + .. _issue tracker: http://github.com/neithere/argh/issues/ .. _mailing list: http://groups.google.com/group/argh-users .. _twitter: http://twitter.com/python_argh @@ -207,6 +206,4 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: User Interfaces Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires: python(>=2.6) -Requires: argparse(>=1.1) Provides: argh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/README new/argh-0.23.3/README --- old/argh-0.23.0/README 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/README 2013-08-20 13:54:52.000000000 +0200 @@ -150,10 +150,10 @@ * Direct e-mail (neithere at gmail com) * Twitter_ (to get notified of commits; mostly for lulz) -.. _project home page: http://bitbucket.org/neithere/argh/ +.. _project home page: http://github.com/neithere/argh/ .. _documentation: http://argh.readthedocs.org .. _package distribution: http://pypi.python.org/pypi/argh -.. _issue tracker: http://bitbucket.org/neithere/argh/issues/ +.. _issue tracker: http://github.com/neithere/argh/issues/ .. _mailing list: http://groups.google.com/group/argh-users .. _twitter: http://twitter.com/python_argh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh/__init__.py new/argh-0.23.3/argh/__init__.py --- old/argh-0.23.0/argh/__init__.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/argh/__init__.py 2013-08-20 13:54:35.000000000 +0200 @@ -16,4 +16,4 @@ from .helpers import * -__version__ = '0.23.0' +__version__ = '0.23.3' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh/assembling.py new/argh-0.23.3/argh/assembling.py --- old/argh-0.23.0/argh/assembling.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/argh/assembling.py 2013-08-18 18:57:37.000000000 +0200 @@ -20,7 +20,8 @@ from argh.completion import COMPLETION_ENABLED from argh.constants import (ATTR_ALIASES, ATTR_ARGS, ATTR_NAME, ATTR_INFER_ARGS_FROM_SIGNATURE, - ATTR_EXPECTS_NAMESPACE_OBJECT) + ATTR_EXPECTS_NAMESPACE_OBJECT, + PARSER_FORMATTER) from argh.utils import get_subparsers, get_arg_names from argh import compat @@ -304,16 +305,16 @@ :param title: - passed to :meth:`argsparse.ArgumentParser.add_subparsers` as `title`. + passed to :meth:`argparse.ArgumentParser.add_subparsers` as `title`. :param description: - passed to :meth:`argsparse.ArgumentParser.add_subparsers` as + passed to :meth:`argparse.ArgumentParser.add_subparsers` as `description`. :param help: - passed to :meth:`argsparse.ArgumentParser.add_subparsers` as `help`. + passed to :meth:`argparse.ArgumentParser.add_subparsers` as `help`. .. note:: @@ -360,10 +361,16 @@ # use explicitly defined name; if none, use function name (a_b → a-b) cmd_name = getattr(func, ATTR_NAME, func.__name__.replace('_','-')) - parser_kwargs = {} - # add command help from function's docstring - parser_kwargs['help'] = func.__doc__ + parser_kwargs = { + + # add command help from function's docstring + 'help': func.__doc__, + + # set default formatter + 'formatter_class': PARSER_FORMATTER, + + } # try adding aliases for command name if SUPPORTS_ALIASES: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh/constants.py new/argh-0.23.3/argh/constants.py --- old/argh-0.23.0/argh/constants.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/argh/constants.py 2013-08-18 18:57:37.000000000 +0200 @@ -8,6 +8,14 @@ # General Public License version 3 (LGPLv3) as published by the Free # Software Foundation. See the file README for copying conditions. # +import argparse + +__all__ = ( + 'ATTR_NAME', 'ATTR_ALIASES', 'ATTR_ARGS', 'ATTR_WRAPPED_EXCEPTIONS', + 'ATTR_WRAPPED_EXCEPTIONS_PROCESSOR', 'ATTR_EXPECTS_NAMESPACE_OBJECT', + 'PARSER_FORMATTER' +) + # # Names of function attributes where Argh stores command behaviour @@ -31,6 +39,14 @@ # forcing argparse.Namespace object instead of signature introspection ATTR_EXPECTS_NAMESPACE_OBJECT = 'argh_expects_namespace_object' +# +# Other library-wide stuff +# + +PARSER_FORMATTER = argparse.ArgumentDefaultsHelpFormatter +""" Default formatter to be used in implicitly instantiated ArgumentParser. +""" + #----------------------------------------------------------------------------- # # deprecated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh/dispatching.py new/argh-0.23.3/argh/dispatching.py --- old/argh-0.23.0/argh/dispatching.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/argh/dispatching.py 2013-08-20 13:45:51.000000000 +0200 @@ -19,14 +19,16 @@ from argh import compat, io from argh.constants import (ATTR_WRAPPED_EXCEPTIONS, ATTR_WRAPPED_EXCEPTIONS_PROCESSOR, - ATTR_EXPECTS_NAMESPACE_OBJECT) + ATTR_EXPECTS_NAMESPACE_OBJECT, + PARSER_FORMATTER) from argh.completion import autocomplete from argh.assembling import add_commands, set_default_command from argh.exceptions import CommandError from argh.utils import get_arg_names -__all__ = ['dispatch', 'dispatch_command', 'dispatch_commands'] +__all__ = ['dispatch', 'dispatch_command', 'dispatch_commands', + 'PARSER_FORMATTER'] def dispatch(parser, argv=None, add_help_command=True, @@ -82,7 +84,7 @@ You can also mark arbitrary exceptions as "wrappable" by using the :func:`~argh.decorators.wrap_errors` decorator. """ - if completion: + if completion and sys.stdout.isatty(): autocomplete(parser) if argv is None: @@ -206,6 +208,7 @@ def dispatch_command(function, *args, **kwargs): """ A wrapper for :func:`dispatch` that creates a one-command parser. + Uses :attr:`PARSER_FORMATTER`. This:: @@ -219,7 +222,7 @@ This function can be also used as a decorator. """ - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(formatter_class=PARSER_FORMATTER) set_default_command(parser, function) dispatch(parser, *args, **kwargs) @@ -227,6 +230,7 @@ def dispatch_commands(functions, *args, **kwargs): """ A wrapper for :func:`dispatch` that creates a parser, adds commands to the parser and dispatches them. + Uses :attr:`PARSER_FORMATTER`. This:: @@ -239,6 +243,6 @@ dispatch(parser) """ - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(formatter_class=PARSER_FORMATTER) add_commands(parser, functions) dispatch(parser, *args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh/helpers.py new/argh-0.23.3/argh/helpers.py --- old/argh-0.23.0/argh/helpers.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/argh/helpers.py 2013-08-18 18:57:37.000000000 +0200 @@ -16,7 +16,7 @@ from argh.completion import autocomplete from argh.assembling import add_commands, set_default_command -from argh.dispatching import dispatch +from argh.dispatching import PARSER_FORMATTER, dispatch __all__ = ['ArghParser'] @@ -30,7 +30,13 @@ wrappers for stand-alone functions :func:`~argh.assembling.add_commands`, :func:`~argh.completion.autocomplete` and :func:`~argh.dispatching.dispatch`. + + Uses :attr:`~argh.dispatching.PARSER_FORMATTER`. """ + def __init__(self, *args, **kwargs): + kwargs.setdefault('formatter_class', PARSER_FORMATTER) + super(ArghParser, self).__init__(*args, **kwargs) + def set_default_command(self, *args, **kwargs): "Wrapper for :func:`set_default_command`." return set_default_command(self, *args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh/interaction.py new/argh-0.23.3/argh/interaction.py --- old/argh-0.23.0/argh/interaction.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/argh/interaction.py 2013-08-18 18:57:37.000000000 +0200 @@ -42,11 +42,9 @@ Usage:: - @arg('key') - @arg('--silent', help='do not prompt, always give default answers') - def delete(args): + def delete(key, silent=False): item = db.get(Item, args.key) - if confirm('Delete '+item.title, default=True, skip=args.silent): + if confirm('Delete '+item.title, default=True, skip=silent): item.delete() print('Item deleted.') else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh.egg-info/PKG-INFO new/argh-0.23.3/argh.egg-info/PKG-INFO --- old/argh-0.23.0/argh.egg-info/PKG-INFO 2013-01-30 02:14:00.000000000 +0100 +++ new/argh-0.23.3/argh.egg-info/PKG-INFO 2013-08-20 14:06:33.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: argh -Version: 0.23.0 +Version: 0.23.3 Summary: An unobtrusive argparse wrapper with natural syntax -Home-page: http://bitbucket.org/neithere/argh/ +Home-page: http://github.com/neithere/argh/ Author: Andrey Mikhaylenko Author-email: [email protected] License: GNU Lesser General Public License (LGPL), Version 3 -Download-URL: http://bitbucket.org/neithere/argh/src/ Description: Argh: The Natural CLI ===================== @@ -159,10 +158,10 @@ * Direct e-mail (neithere at gmail com) * Twitter_ (to get notified of commits; mostly for lulz) - .. _project home page: http://bitbucket.org/neithere/argh/ + .. _project home page: http://github.com/neithere/argh/ .. _documentation: http://argh.readthedocs.org .. _package distribution: http://pypi.python.org/pypi/argh - .. _issue tracker: http://bitbucket.org/neithere/argh/issues/ + .. _issue tracker: http://github.com/neithere/argh/issues/ .. _mailing list: http://groups.google.com/group/argh-users .. _twitter: http://twitter.com/python_argh @@ -207,6 +206,4 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: User Interfaces Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires: python(>=2.6) -Requires: argparse(>=1.1) Provides: argh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh.egg-info/SOURCES.txt new/argh-0.23.3/argh.egg-info/SOURCES.txt --- old/argh-0.23.0/argh.egg-info/SOURCES.txt 2013-01-30 02:14:00.000000000 +0100 +++ new/argh-0.23.3/argh.egg-info/SOURCES.txt 2013-08-20 14:06:33.000000000 +0200 @@ -16,7 +16,6 @@ argh.egg-info/PKG-INFO argh.egg-info/SOURCES.txt argh.egg-info/dependency_links.txt -argh.egg-info/requires.txt argh.egg-info/top_level.txt test/__init__.py test/base.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/argh.egg-info/requires.txt new/argh-0.23.3/argh.egg-info/requires.txt --- old/argh-0.23.0/argh.egg-info/requires.txt 2013-01-30 02:14:00.000000000 +0100 +++ new/argh-0.23.3/argh.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -argparse>=1.1 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/setup.cfg new/argh-0.23.3/setup.cfg --- old/argh-0.23.0/setup.cfg 2013-01-30 02:14:00.000000000 +0100 +++ new/argh-0.23.3/setup.cfg 2013-08-20 14:06:34.000000000 +0200 @@ -1,5 +1,5 @@ [egg_info] -tag_svn_revision = 0 -tag_date = 0 tag_build = +tag_date = 0 +tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/argh-0.23.0/setup.py new/argh-0.23.3/setup.py --- old/argh-0.23.0/setup.py 2013-01-30 02:12:50.000000000 +0100 +++ new/argh-0.23.3/setup.py 2013-08-20 14:00:34.000000000 +0200 @@ -58,6 +58,12 @@ sys.exit(errno) +if sys.version_info < (2,7): + install_requires = ['argparse >= 1.1'] +else: + install_requires = [] + + setup( # overview name = 'argh', @@ -68,8 +74,7 @@ version = __version__, packages = ['argh'], provides = ['argh'], - requires = ['python(>=2.6)', 'argparse(>=1.1)'], - install_requires = ['argparse>=1.1'], # for Python 2.6 (no bundled argparse; setuptools is likely to exist) + install_requires = install_requires, # testing tests_require=['pytest'], @@ -81,8 +86,7 @@ license = 'GNU Lesser General Public License (LGPL), Version 3', # more info - url = 'http://bitbucket.org/neithere/argh/', - download_url = 'http://bitbucket.org/neithere/argh/src/', + url = 'http://github.com/neithere/argh/', # categorization keywords = ('cli command line argparse optparse argument option'), -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
