Hello community, here is the log from the commit of package python-knack for openSUSE:Factory checked in at 2020-08-19 18:51:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-knack (Old) and /work/SRC/openSUSE:Factory/.python-knack.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-knack" Wed Aug 19 18:51:48 2020 rev:13 rq:827650 version:0.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-knack/python-knack.changes 2020-06-19 17:24:22.372065871 +0200 +++ /work/SRC/openSUSE:Factory/.python-knack.new.3399/python-knack.changes 2020-08-19 18:53:09.475730291 +0200 @@ -1,0 +2,6 @@ +Tue Aug 18 12:22:19 UTC 2020 - John Paul Adrian Glaubitz <[email protected]> + +- Update to version 0.7.2 + * [Config] Support listing sections (#217) + +------------------------------------------------------------------- Old: ---- knack-0.7.1.tar.gz New: ---- knack-0.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-knack.spec ++++++ --- /var/tmp/diff_new_pack.OCucQi/_old 2020-08-19 18:53:10.967731084 +0200 +++ /var/tmp/diff_new_pack.OCucQi/_new 2020-08-19 18:53:10.971731086 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-knack -Version: 0.7.1 +Version: 0.7.2 Release: 0 Summary: A Command-Line Interface framework License: MIT ++++++ knack-0.7.1.tar.gz -> knack-0.7.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/HISTORY.rst new/knack-0.7.2/HISTORY.rst --- old/knack-0.7.1/HISTORY.rst 2020-05-09 05:30:08.000000000 +0200 +++ new/knack-0.7.2/HISTORY.rst 2020-07-27 10:54:28.000000000 +0200 @@ -3,6 +3,10 @@ Release History =============== +0.7.2 +++++++++ +* [Config] Support listing sections (#217) + 0.7.1 ++++++++ * Rollback `get_config_parser` in `config.py` (#205) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/PKG-INFO new/knack-0.7.2/PKG-INFO --- old/knack-0.7.1/PKG-INFO 2020-05-09 05:30:13.000000000 +0200 +++ new/knack-0.7.2/PKG-INFO 2020-07-27 10:54:36.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: knack -Version: 0.7.1 +Version: 0.7.2 Summary: A Command-Line Interface framework Home-page: https://github.com/microsoft/knack Author: Microsoft Corporation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/knack/cli.py new/knack-0.7.2/knack/cli.py --- old/knack-0.7.1/knack/cli.py 2020-05-09 05:30:08.000000000 +0200 +++ new/knack-0.7.2/knack/cli.py 2020-07-27 10:54:28.000000000 +0200 @@ -91,8 +91,8 @@ self.output = self.output_cls(cli_ctx=self) self.result = None self.query = query_cls(cli_ctx=self) - self.only_show_errors = self.config.get('core', 'only_show_errors', fallback=False) - self.enable_color = not self.config.get('core', 'no_color', fallback=False) + self.only_show_errors = self.config.getboolean('core', 'only_show_errors', fallback=False) + self.enable_color = not self.config.getboolean('core', 'no_color', fallback=False) @staticmethod def _should_show_version(args): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/knack/config.py new/knack-0.7.2/knack/config.py --- old/knack-0.7.1/knack/config.py 2020-05-09 05:30:08.000000000 +0200 +++ new/knack-0.7.2/knack/config.py 2020-07-27 10:54:28.000000000 +0200 @@ -97,10 +97,20 @@ raise last_ex # pylint:disable=raising-bad-type return fallback + def sections(self): + combined_sections = [] + # Go through the config chain and combine all sections + for config in self._config_file_chain if self.use_local_config else self._config_file_chain[-1:]: + sections = config.sections() + for section in sections: + if section not in combined_sections: + combined_sections.append(section) + return combined_sections + def items(self, section): import re pattern = self.env_var_name(section, '.+') - candidates = [(k.split('_')[-1], os.environ[k], k) for k in os.environ.keys() if re.match(pattern, k)] + candidates = [(k.split('_')[-1], os.environ[k], k) for k in os.environ if re.match(pattern, k)] result = {c[0]: c for c in candidates} for config in self._config_file_chain if self.use_local_config else self._config_file_chain[-1:]: try: @@ -174,13 +184,16 @@ def items(self, section): return self.config_parser.items(section) if self.config_parser else [] + def sections(self): + return self.config_parser.sections() if self.config_parser else [] + def has_option(self, section, option): return self.config_parser.has_option(section, option) if self.config_parser else False def get(self, section, option): if self.config_parser: return self.config_parser.get(section, option) - raise configparser.NoOptionError(section, option) + raise configparser.NoOptionError(option, section) def getint(self, section, option): return int(self.get(section, option)) @@ -234,6 +247,3 @@ for section in self.config_parser.sections(): self.config_parser.remove_section(section) self.set(self.config_parser) - - def sections(self): - return self.config_parser.sections() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/knack/introspection.py new/knack-0.7.2/knack/introspection.py --- old/knack-0.7.1/knack/introspection.py 2020-05-09 05:30:08.000000000 +0200 +++ new/knack-0.7.2/knack/introspection.py 2020-07-27 10:54:28.000000000 +0200 @@ -54,10 +54,9 @@ temp = lines[index].strip() if any(temp.startswith(x) for x in param_breaks): break - else: - if temp: - arg_desc += (' ' + temp) - index += 1 + if temp: + arg_desc += (' ' + temp) + index += 1 option_descs[arg_name] = arg_desc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/knack/testsdk/base.py new/knack-0.7.2/knack/testsdk/base.py --- old/knack-0.7.1/knack/testsdk/base.py 2020-05-09 05:30:08.000000000 +0200 +++ new/knack-0.7.2/knack/testsdk/base.py 2020-07-27 10:54:28.000000000 +0200 @@ -179,7 +179,7 @@ @classmethod def _custom_request_query_matcher(cls, r1, r2): """ Ensure method, path, and query parameters match. """ - from six.moves.urllib_parse import urlparse, parse_qs # pylint: disable=relative-import, useless-suppression + from six.moves.urllib_parse import urlparse, parse_qs # pylint: disable=useless-suppression url1 = urlparse(r1.uri) url2 = urlparse(r2.uri) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/knack.egg-info/PKG-INFO new/knack-0.7.2/knack.egg-info/PKG-INFO --- old/knack-0.7.1/knack.egg-info/PKG-INFO 2020-05-09 05:30:13.000000000 +0200 +++ new/knack-0.7.2/knack.egg-info/PKG-INFO 2020-07-27 10:54:36.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: knack -Version: 0.7.1 +Version: 0.7.2 Summary: A Command-Line Interface framework Home-page: https://github.com/microsoft/knack Author: Microsoft Corporation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knack-0.7.1/setup.py new/knack-0.7.2/setup.py --- old/knack-0.7.1/setup.py 2020-05-09 05:30:08.000000000 +0200 +++ new/knack-0.7.2/setup.py 2020-07-27 10:54:28.000000000 +0200 @@ -9,7 +9,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = '0.7.1' +VERSION = '0.7.2' DEPENDENCIES = [ 'argcomplete',
