Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-knack for openSUSE:Factory checked in at 2023-08-14 22:36:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-knack (Old) and /work/SRC/openSUSE:Factory/.python-knack.new.11712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-knack" Mon Aug 14 22:36:29 2023 rev:21 rq:1103927 version:0.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-knack/python-knack.changes 2022-12-07 17:36:15.560964361 +0100 +++ /work/SRC/openSUSE:Factory/.python-knack.new.11712/python-knack.changes 2023-08-14 22:36:48.156813921 +0200 @@ -1,0 +2,7 @@ +Mon Aug 14 13:08:03 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to version 0.11.0 + * Declare support for Python 3.11 and drop support for Python 3.7 (#275) + * Stop converting argument's `bool` default value to `DefaultInt` (#273) + +------------------------------------------------------------------- Old: ---- knack-0.10.1.tar.gz New: ---- knack-0.11.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-knack.spec ++++++ --- /var/tmp/diff_new_pack.LQ6koR/_old 2023-08-14 22:36:48.624816885 +0200 +++ /var/tmp/diff_new_pack.LQ6koR/_new 2023-08-14 22:36:48.628816910 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-knack # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-knack -Version: 0.10.1 +Version: 0.11.0 Release: 0 Summary: A Command-Line Interface framework License: MIT ++++++ knack-0.10.1.tar.gz -> knack-0.11.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/HISTORY.rst new/knack-0.11.0/HISTORY.rst --- old/knack-0.10.1/HISTORY.rst 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/HISTORY.rst 2023-07-26 08:19:43.000000000 +0200 @@ -3,6 +3,12 @@ Release History =============== +0.11.0 +++++++ + +* Declare support for Python 3.11 and drop support for Python 3.7 (#275) +* Stop converting argument's `bool` default value to `DefaultInt` (#273) + 0.10.1 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/PKG-INFO new/knack-0.11.0/PKG-INFO --- old/knack-0.10.1/PKG-INFO 2022-12-01 04:11:50.773054600 +0100 +++ new/knack-0.11.0/PKG-INFO 2023-07-26 08:20:00.156813600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: knack -Version: 0.10.1 +Version: 0.11.0 Summary: A Command-Line Interface framework Home-page: https://github.com/microsoft/knack Author: Microsoft Corporation @@ -11,10 +11,10 @@ Classifier: Intended Audience :: System Administrators Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: License :: OSI Approved :: MIT License License-File: LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/cli.py new/knack-0.11.0/knack/cli.py --- old/knack-0.10.1/knack/cli.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/cli.py 2023-07-26 08:19:43.000000000 +0200 @@ -104,7 +104,7 @@ def _should_show_version(args): return args and (args[0] == '--version' or args[0] == '-v') - def get_cli_version(self): # pylint: disable=no-self-use + def get_cli_version(self): """ Get the CLI Version. Override this to define how to get the CLI version :return: The CLI version @@ -112,7 +112,7 @@ """ return '' - def get_runtime_version(self): # pylint: disable=no-self-use + def get_runtime_version(self): """ Get the runtime information. :return: Runtime information @@ -169,7 +169,7 @@ for func in handlers: func(self, **kwargs) - def exception_handler(self, ex): # pylint: disable=no-self-use + def exception_handler(self, ex): """ The default exception handler """ if isinstance(ex, CLIError): logger.error(ex) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/commands.py new/knack-0.11.0/knack/commands.py --- old/knack-0.10.1/knack/commands.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/commands.py 2023-07-26 08:19:43.000000000 +0200 @@ -124,7 +124,10 @@ # that coincides with the default if isinstance(arg_default, str): arg_default = DefaultStr(arg_default) - elif isinstance(arg_default, int): + elif isinstance(arg_default, int) and not isinstance(arg_default, bool): + # bool's is_default is ignored for now, because + # 1. bool is a subclass of int, so isinstance(True, int) cannot distinguish between int and bool + # 2. bool is not extendable according to https://stackoverflow.com/a/2172204/2199657 arg_default = DefaultInt(arg_default) # update the default if arg_default: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/completion.py new/knack-0.11.0/knack/completion.py --- old/knack-0.10.1/knack/completion.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/completion.py 2023-07-26 08:19:43.000000000 +0200 @@ -34,7 +34,7 @@ self.cli_ctx = cli_ctx self.cli_ctx.data['completer_active'] = ARGCOMPLETE_ENV_NAME in os.environ - def get_completion_args(self, is_completion=False, comp_line=None): # pylint: disable=no-self-use + def get_completion_args(self, is_completion=False, comp_line=None): """ Get the args that will be used to tab completion if completion is active. """ is_completion = is_completion or os.environ.get(ARGCOMPLETE_ENV_NAME) comp_line = comp_line or os.environ.get('COMP_LINE') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/deprecation.py new/knack-0.11.0/knack/deprecation.py --- old/knack-0.10.1/knack/deprecation.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/deprecation.py 2023-07-26 08:19:43.000000000 +0200 @@ -94,12 +94,10 @@ message_func=message_func or _default_get_message ) - # pylint: disable=no-self-use def _version_less_than_or_equal_to(self, v1, v2): """ Returns true if v1 <= v2. """ - # pylint: disable=no-name-in-module, import-error - from distutils.version import LooseVersion - return LooseVersion(v1) <= LooseVersion(v2) + from packaging.version import parse + return parse(v1) <= parse(v2) def expired(self): if self.expiration: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/introspection.py new/knack-0.11.0/knack/introspection.py --- old/knack-0.10.1/knack/introspection.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/introspection.py 2023-07-26 08:19:43.000000000 +0200 @@ -67,45 +67,23 @@ """ Extracts basic argument data from an operation's signature and docstring excluded_params: List of params to ignore and not extract. By default we ignore ['self', 'kwargs']. """ - args = [] - try: - # only supported in python3 - falling back to argspec if not available - sig = inspect.signature(operation) - args = sig.parameters - except AttributeError: - sig = inspect.getargspec(operation) # pylint: disable=deprecated-method, useless-suppression - args = sig.args + sig = inspect.signature(operation) + args = sig.parameters arg_docstring_help = option_descriptions(operation) excluded_params = excluded_params or ['self', 'kwargs'] for arg_name in [a for a in args if a not in excluded_params]: - try: - # this works in python3 - default = args[arg_name].default - required = default == inspect.Parameter.empty # pylint: disable=no-member, useless-suppression - except TypeError: - arg_defaults = (dict(zip(sig.args[-len(sig.defaults):], sig.defaults)) - if sig.defaults - else {}) - default = arg_defaults.get(arg_name) - required = arg_name not in arg_defaults - + default = args[arg_name].default + required = default == inspect.Parameter.empty action = 'store_' + str(not default).lower() if isinstance(default, bool) else None - - try: - default = (default - if default != inspect._empty # pylint: disable=protected-access - else None) - except AttributeError: - pass - + command_argument_default = default if default != inspect.Parameter.empty else None options_list = ['--' + arg_name.replace('_', '-')] help_str = arg_docstring_help.get(arg_name) yield (arg_name, CLICommandArgument(arg_name, options_list=options_list, required=required, - default=default, + default=command_argument_default, help=help_str, action=action)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/invocation.py new/knack-0.11.0/knack/invocation.py --- old/knack-0.10.1/knack/invocation.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/invocation.py 2023-07-26 08:19:43.000000000 +0200 @@ -54,7 +54,7 @@ prog=self.cli_ctx.name, parents=[self._global_parser]) self.commands_loader = commands_loader_cls(cli_ctx=self.cli_ctx) - def _filter_params(self, args): # pylint: disable=no-self-use + def _filter_params(self, args): # Consider - we are using any args that start with an underscore (_) as 'private' # arguments and remove them from the arguments that we pass to the actual function. params = {key: value @@ -88,7 +88,7 @@ return ' '.join(nouns) - def _validate_cmd_level(self, ns, cmd_validator): # pylint: disable=no-self-use + def _validate_cmd_level(self, ns, cmd_validator): if cmd_validator: cmd_validator(ns) try: @@ -96,7 +96,7 @@ except AttributeError: pass - def _validate_arg_level(self, ns, **_): # pylint: disable=no-self-use + def _validate_arg_level(self, ns, **_): for validator in getattr(ns, '_argument_validators', []): validator(ns) try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/log.py new/knack-0.11.0/knack/log.py --- old/knack-0.10.1/knack/log.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/log.py 2023-07-26 08:19:43.000000000 +0200 @@ -180,7 +180,7 @@ @staticmethod def _get_log_dir(cli_ctx): - default_dir = (os.path.join(cli_ctx.config.config_dir, 'logs')) + default_dir = os.path.join(cli_ctx.config.config_dir, 'logs') return os.path.expanduser(cli_ctx.config.get('logging', 'log_dir', fallback=default_dir)) def _get_console_log_levels(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/output.py new/knack-0.11.0/knack/output.py --- old/knack-0.10.1/knack/output.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/output.py 2023-07-26 08:19:43.000000000 +0200 @@ -129,7 +129,7 @@ self.cli_ctx.register_event(EVENT_PARSER_GLOBAL_CREATE, OutputProducer.on_global_arguments) self.cli_ctx.register_event(EVENT_INVOKER_POST_PARSE_ARGS, OutputProducer.handle_output_argument) - def out(self, obj, formatter=None, out_file=None): # pylint: disable=no-self-use + def out(self, obj, formatter=None, out_file=None): """ Produces the output using the command result. The method does not return a result as the output is written straight to the output file. @@ -157,7 +157,7 @@ print(output.encode('ascii', 'ignore').decode('utf-8', 'ignore'), file=out_file, end='') - def get_formatter(self, format_type): # pylint: disable=no-self-use + def get_formatter(self, format_type): # remove color if stdout is not a tty if not self.cli_ctx.enable_color and format_type == 'jsonc': return OutputProducer._FORMAT_DICT['json'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/testsdk/base.py new/knack-0.11.0/knack/testsdk/base.py --- old/knack-0.10.1/knack/testsdk/base.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/testsdk/base.py 2023-07-26 08:19:43.000000000 +0200 @@ -33,7 +33,7 @@ def cmd(self, command, checks=None, expect_failure=False): return ExecutionResult(self.cli, command, expect_failure=expect_failure).assert_with_checks(checks) - def create_random_name(self, prefix, length): # pylint: disable=no-self-use + def create_random_name(self, prefix, length): return create_random_name(prefix=prefix, length=length) def create_temp_file(self, size_kb, full_random=False): @@ -117,7 +117,7 @@ # set up cassette cm = self.vcr.use_cassette(self.recording_file) - self.cassette = cm.__enter__() + self.cassette = cm.__enter__() # pylint: disable=unnecessary-dunder-call self.addCleanup(cm.__exit__) if not self.in_recording: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/testsdk/patches.py new/knack-0.11.0/knack/testsdk/patches.py --- old/knack-0.10.1/knack/testsdk/patches.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/testsdk/patches.py 2023-07-26 08:19:43.000000000 +0200 @@ -18,5 +18,5 @@ if not isinstance(unit_test, unittest.TestCase): raise CliTestError('The patch can be only used in unit test') mp = mock.patch(target, replacement) - mp.__enter__() + mp.__enter__() # pylint: disable=unnecessary-dunder-call unit_test.addCleanup(mp.__exit__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/testsdk/recording_processors.py new/knack-0.11.0/knack/testsdk/recording_processors.py --- old/knack-0.10.1/knack/testsdk/recording_processors.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/testsdk/recording_processors.py 2023-07-26 08:19:43.000000000 +0200 @@ -5,10 +5,10 @@ class RecordingProcessor(object): - def process_request(self, request): # pylint: disable=no-self-use + def process_request(self, request): return request - def process_response(self, response): # pylint: disable=no-self-use + def process_response(self, response): return response @classmethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack/util.py new/knack-0.11.0/knack/util.py --- old/knack-0.10.1/knack/util.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/knack/util.py 2023-07-26 08:19:43.000000000 +0200 @@ -86,7 +86,6 @@ self._get_tag = tag_func self._get_message = message_func - # pylint: disable=no-self-use def hidden(self): return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack.egg-info/PKG-INFO new/knack-0.11.0/knack.egg-info/PKG-INFO --- old/knack-0.10.1/knack.egg-info/PKG-INFO 2022-12-01 04:11:50.000000000 +0100 +++ new/knack-0.11.0/knack.egg-info/PKG-INFO 2023-07-26 08:20:00.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: knack -Version: 0.10.1 +Version: 0.11.0 Summary: A Command-Line Interface framework Home-page: https://github.com/microsoft/knack Author: Microsoft Corporation @@ -11,10 +11,10 @@ Classifier: Intended Audience :: System Administrators Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: License :: OSI Approved :: MIT License License-File: LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/knack.egg-info/requires.txt new/knack-0.11.0/knack.egg-info/requires.txt --- old/knack-0.10.1/knack.egg-info/requires.txt 2022-12-01 04:11:50.000000000 +0100 +++ new/knack-0.11.0/knack.egg-info/requires.txt 2023-07-26 08:20:00.000000000 +0200 @@ -1,5 +1,6 @@ argcomplete jmespath +packaging pygments pyyaml tabulate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/setup.py new/knack-0.11.0/setup.py --- old/knack-0.10.1/setup.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/setup.py 2023-07-26 08:19:43.000000000 +0200 @@ -8,11 +8,12 @@ import sys from setuptools import setup -VERSION = '0.10.1' +VERSION = '0.11.0' DEPENDENCIES = [ 'argcomplete', 'jmespath', + 'packaging', 'pygments', 'pyyaml', 'tabulate' @@ -37,10 +38,10 @@ 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: MIT License', ], packages=['knack', 'knack.testsdk'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.10.1/tests/test_query.py new/knack-0.11.0/tests/test_query.py --- old/knack-0.10.1/tests/test_query.py 2022-12-01 04:11:30.000000000 +0100 +++ new/knack-0.11.0/tests/test_query.py 2023-07-26 08:19:43.000000000 +0200 @@ -38,12 +38,12 @@ (We are not testing JMESPath itself here) ''' - def test_query_valid_1(self): # pylint: disable=no-self-use + def test_query_valid_1(self): query = 'length(@)' # Should not raise any exception as it is valid CLIQuery.jmespath_type(query) - def test_query_valid_2(self): # pylint: disable=no-self-use + def test_query_valid_2(self): query = "[?propertyX.propertyY.propertyZ=='AValue'].[col1,col2]" # Should not raise any exception as it is valid CLIQuery.jmespath_type(query)