Hello community,

here is the log from the commit of package python-oslo.config for 
openSUSE:Factory checked in at 2018-01-10 23:35:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.config (Old)
 and      /work/SRC/openSUSE:Factory/.python-oslo.config.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oslo.config"

Wed Jan 10 23:35:52 2018 rev:24 rq:562946 version:5.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.config/python-oslo.config.changes    
2017-09-29 11:56:39.376058732 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-oslo.config.new/python-oslo.config.changes   
    2018-01-10 23:35:59.205718376 +0100
@@ -1,0 +2,20 @@
+Thu Dec  7 20:33:05 UTC 2017 - cloud-de...@suse.de
+
+- update to version 5.1.0
+  - Remove setting of version/release from releasenotes
+  - Make help message include choices information for StrOpt
+  - Update reno for stable/pike
+  - Fix the incorrect file path
+  - Fix sphinx option generation when advanced=True
+  - Empty groupname will be 'DEFAULT' by default
+  - Remove the parameter enforce_type from set_override and set_default
+  - Correct documentation error in DeprecatedOpt
+  - Use boolean where expected
+  - Remove redundant colon in doc
+  - Implement OptGroup.__str__ for log messages
+  - Added exception when namespace option is missing
+  - Cleanup test-requirements
+  - Prefer SNAP_COMMON config files
+  - Updated from global requirements
+
+-------------------------------------------------------------------

Old:
----
  oslo.config-4.11.1.tar.gz

New:
----
  oslo.config-5.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-oslo.config.spec ++++++
--- /var/tmp/diff_new_pack.HaEWZz/_old  2018-01-10 23:36:01.617605211 +0100
+++ /var/tmp/diff_new_pack.HaEWZz/_new  2018-01-10 23:36:01.621605024 +0100
@@ -16,40 +16,64 @@
 #
 
 
-%global sname oslo.config
 Name:           python-oslo.config
-Version:        4.11.1
+Version:        5.1.0
 Release:        0
 Summary:        OpenStack common configuration library
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            https://launchpad.net/%{sname}
-Source0:        
https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
+Url:            https://launchpad.net/oslo.config
+Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.config/oslo.config-5.1.0.tar.gz
 BuildRequires:  openstack-macros
-BuildRequires:  python-PyYAML >= 3.10.0
-BuildRequires:  python-debtcollector >= 1.2.0
 BuildRequires:  python-devel
-BuildRequires:  python-fixtures >= 3.0.0
-BuildRequires:  python-mock >= 2.0
-BuildRequires:  python-netaddr >= 0.7.13
-BuildRequires:  python-oslo.i18n >= 2.1.0
-BuildRequires:  python-oslotest >= 1.10.0
-BuildRequires:  python-pbr >= 2.0.0
-BuildRequires:  python-python-subunit >= 0.0.18
-BuildRequires:  python-rfc3986 >= 0.3.1
-BuildRequires:  python-six >= 1.9.0
-BuildRequires:  python-stevedore >= 1.20.0
-BuildRequires:  python-testrepository >= 0.0.18
-BuildRequires:  python-testscenarios >= 0.4
-BuildRequires:  python-testtools >= 1.4.0
-Requires:       python-PyYAML >= 3.10.0
+BuildRequires:  python2-PyYAML >= 3.10
+BuildRequires:  python2-debtcollector >= 1.2.0
+BuildRequires:  python2-fixtures >= 3.0.0
+BuildRequires:  python2-mock >= 2.0.0
+BuildRequires:  python2-netaddr >= 0.7.18
+BuildRequires:  python2-oslo.i18n >= 3.15.3
+BuildRequires:  python2-oslotest >= 1.10.0
+BuildRequires:  python2-pbr >= 2.0.0
+BuildRequires:  python2-python-subunit >= 1.0.0
+BuildRequires:  python2-rfc3986 >= 0.3.1
+BuildRequires:  python2-six >= 1.10.0
+BuildRequires:  python2-stevedore >= 1.20.0
+BuildRequires:  python2-testrepository >= 0.0.18
+BuildRequires:  python2-testscenarios >= 0.4
+BuildRequires:  python2-testtools >= 2.2.0
+BuildRequires:  python3-PyYAML >= 3.10
+BuildRequires:  python3-debtcollector >= 1.2.0
+BuildRequires:  python3-devel
+BuildRequires:  python3-fixtures >= 3.0.0
+BuildRequires:  python3-mock >= 2.0.0
+BuildRequires:  python3-netaddr >= 0.7.18
+BuildRequires:  python3-oslo.i18n >= 3.15.3
+BuildRequires:  python3-oslotest >= 1.10.0
+BuildRequires:  python3-pbr >= 2.0.0
+BuildRequires:  python3-python-subunit >= 1.0.0
+BuildRequires:  python3-rfc3986 >= 0.3.1
+BuildRequires:  python3-six >= 1.10.0
+BuildRequires:  python3-stevedore >= 1.20.0
+BuildRequires:  python3-testrepository >= 0.0.18
+BuildRequires:  python3-testscenarios >= 0.4
+BuildRequires:  python3-testtools >= 2.2.0
+Requires:       python-PyYAML >= 3.10
 Requires:       python-debtcollector >= 1.2.0
-Requires:       python-netaddr >= 0.7.13
-Requires:       python-oslo.i18n >= 2.1.0
+Requires:       python-netaddr >= 0.7.18
+Requires:       python-oslo.i18n >= 3.15.3
 Requires:       python-rfc3986 >= 0.3.1
-Requires:       python-six >= 1.9.0
+Requires:       python-six >= 1.10.0
 Requires:       python-stevedore >= 1.20.0
 BuildArch:      noarch
+%if 0%{?suse_version}
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+%else
+# on RDO, update-alternatives is in chkconfig
+Requires(post): chkconfig
+Requires(postun): chkconfig
+%endif
+%python_subpackages
 
 %description
 The Oslo project intends to produce a python library containing
@@ -60,42 +84,50 @@
 The oslo-config library is a command line and configuration file
 parsing library from the Oslo project.
 
-%package doc
+%package -n python-oslo.config-doc
 Summary:        Documentation for OpenStack common configuration library
 Group:          Development/Languages/Python
 BuildRequires:  python-Sphinx
-BuildRequires:  python-openstackdocstheme >= 1.16.0
+BuildRequires:  python-openstackdocstheme >= 1.17.0
 
-%description doc
+%description -n python-oslo.config-doc
 Documentation for the oslo-config library.
 
 %prep
-%autosetup -n %{sname}-%{version}
+%autosetup -p1 -n oslo.config-5.1.0
 %py_req_cleanup
 sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
 
 %build
-%{py2_build}
+%{python_build}
 
 %{__python2} setup.py build_sphinx
 # remove the sphinx-build leftovers
 rm -rf doc/build/html/.{doctrees,buildinfo}
 
 %install
-%{py2_install}
+%{python_install}
+%python_clone -a %{buildroot}%{_bindir}/oslo-config-generator
+
+%post
+%python_install_alternative oslo-config-generator
+
+%postun
+%python_uninstall_alternative oslo-config-generator
 
 %check
-%{__python2} setup.py testr
+%{python_expand rm -rf .testrepository
+$python setup.py testr
+}
 
-%files
-%doc README.rst
+%files %{python_files}
 %license LICENSE
-%{_bindir}/oslo-config-generator
-%{python2_sitelib}/oslo_config
-%{python2_sitelib}/*.egg-info
+%python_alternative %{_bindir}/oslo-config-generator
+%{python_sitelib}/oslo_config
+%{python_sitelib}/*.egg-info
 
-%files doc
-%doc doc/build/html
+%files -n python-oslo.config-doc
+%doc doc/build/html README.rst
 %license LICENSE
 
 %changelog

++++++ _service ++++++
--- /var/tmp/diff_new_pack.HaEWZz/_old  2018-01-10 23:36:01.653603522 +0100
+++ /var/tmp/diff_new_pack.HaEWZz/_new  2018-01-10 23:36:01.653603522 +0100
@@ -1,8 +1,8 @@
 <services>
   <service mode="disabled" name="renderspec">
-    <param 
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/pike/openstack/oslo.config/oslo.config.spec.j2</param>
+    <param 
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/oslo.config/oslo.config.spec.j2</param>
     <param name="output-name">python-oslo.config.spec</param>
-    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/pike/global-requirements.txt</param>
+    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/requirements.txt</param>
     <param name="changelog-email">cloud-de...@suse.de</param>
     <param name="changelog-provider">gh,openstack,oslo.config</param>
   </service>

++++++ oslo.config-4.11.1.tar.gz -> oslo.config-5.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/AUTHORS 
new/oslo.config-5.1.0/AUTHORS
--- old/oslo.config-4.11.1/AUTHORS      2017-09-27 06:25:24.000000000 +0200
+++ new/oslo.config-5.1.0/AUTHORS       2017-11-20 17:28:15.000000000 +0100
@@ -59,6 +59,7 @@
 Jakub Libosvar <libos...@redhat.com>
 James Carey <jeca...@us.ibm.com>
 James E. Blair <jebl...@openstack.org>
+James Page <james.p...@ubuntu.com>
 Jamie Lennox <jamielen...@gmail.com>
 Jamie Lennox <jamielen...@redhat.com>
 Jason Kölker <ja...@koelker.net>
@@ -76,6 +77,8 @@
 Joshua Harlow <jxhar...@godaddy.com>
 Julien Danjou <jul...@danjou.info>
 Kevin L. Mitchell <kevin.mitch...@rackspace.com>
+Kiseok Kim <kise...@gmail.com>
+Lance Bragstad <lbrags...@gmail.com>
 Lars Butler <lars.but...@gmail.com>
 Laurence Miao <laurence.m...@gmail.com>
 Lianhao Lu <lianhao...@intel.com>
@@ -87,6 +90,7 @@
 Mark Vanderwiel <vande...@us.ibm.com>
 Markus Zoeller <mzoel...@de.ibm.com>
 Masaki Matsushita <glass.s...@gmail.com>
+Matt Riedemann <mriedem...@gmail.com>
 Matt Riedemann <mrie...@us.ibm.com>
 Matthew Treinish <mtrein...@kortar.org>
 Maxim Kulkin <mkul...@mirantis.com>
@@ -113,6 +117,7 @@
 Sascha Peilicke <sasc...@gmx.de>
 Sascha Peilicke <speili...@suse.com>
 Sean Dague <s...@dague.net>
+Sean Pryor <spryor@tachyon.localdomain>
 Sergey Lukjanov <slukja...@mirantis.com>
 Shane Wang <shane.w...@intel.com>
 Stephen Finucane <sfinu...@redhat.com>
@@ -122,6 +127,7 @@
 Takashi NATSUME <natsume.taka...@lab.ntt.co.jp>
 Thomas Bechtold <tbecht...@suse.com>
 Thomas Herve <the...@redhat.com>
+Thomas Morin <thomas.mo...@orange.com>
 Tim Miller <tim.mille...@gmail.com>
 Tom Cammann <tom.camm...@hp.com>
 Tong Damon Da <ton...@outlook.com>
@@ -134,6 +140,7 @@
 Vu Cong Tuan <tua...@vn.fujitsu.com>
 Xi Yang <yang...@99cloud.net>
 YAMAMOTO Takashi <yamam...@valinux.co.jp>
+Yaguo Zhou <zhouya...@gmail.com>
 Yibo Cai <yibo....@linaro.org>
 Yuriy Taraday <yorik....@gmail.com>
 Yuval Brik <yu...@brik.org.il>
@@ -142,9 +149,11 @@
 ZhongShengping <chd...@163.com>
 Zhongyue Luo <lzye...@gmail.com>
 Zhongyue Luo <zhongyue....@intel.com>
+Zuul <z...@review.openstack.org>
 avnish <avnish....@nectechnologies.in>
 bhavani.cr <bhavan...@nectechnologies.in>
 blue55 <yl...@fiberhome.com>
+chenxing <chen.x...@99cloud.net>
 gengchc2 <geng.changc...@zte.com.cn>
 hnyang <hny...@fiberhome.com>
 howardlee <lihongwe...@inspur.com>
@@ -153,6 +162,7 @@
 llg8212 <lilin...@huawei.com>
 loooosy <syluo5...@fiberhome.com>
 lzyeval <lzye...@gmail.com>
+melissaml <ma....@99cloud.net>
 ricolin <rico....@easystack.cn>
 skudriashev <skudrias...@griddynamics.com>
 sonu.kumar <sonu.ku...@nectechnologies.in>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/ChangeLog 
new/oslo.config-5.1.0/ChangeLog
--- old/oslo.config-4.11.1/ChangeLog    2017-09-27 06:25:24.000000000 +0200
+++ new/oslo.config-5.1.0/ChangeLog     2017-11-20 17:28:15.000000000 +0100
@@ -1,13 +1,48 @@
 CHANGES
 =======
 
-4.11.1
+5.1.0
+-----
+
+* Remove setting of version/release from releasenotes
+* Updated from global requirements
+* Make help message include choices information for StrOpt
+
+5.0.0
+-----
+
+* Remove the parameter enforce\_type from set\_override and set\_default
+* Correct documentation error in DeprecatedOpt
+
+4.13.2
 ------
 
+* Prefer SNAP\_COMMON config files
+
+4.13.1
+------
+
+* Implement OptGroup.\_\_str\_\_ for log messages
+* Cleanup test-requirements
+
+4.13.0
+------
+
+* Updated from global requirements
+* Use boolean where expected
+* Fix sphinx option generation when advanced=True
+* Updated from global requirements
+
+4.12.0
+------
+
+* Remove redundant colon in doc
+* Updated from global requirements
+* Update reno for stable/pike
 * Updated from global requirements
 * Empty groupname will be 'DEFAULT' by default
-* Update UPPER\_CONSTRAINTS\_FILE for stable/pike
-* Update .gitreview for stable/pike
+* Added exception when namespace option is missing
+* Fix the incorrect file path
 
 4.11.0
 ------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/PKG-INFO 
new/oslo.config-5.1.0/PKG-INFO
--- old/oslo.config-4.11.1/PKG-INFO     2017-09-27 06:25:25.000000000 +0200
+++ new/oslo.config-5.1.0/PKG-INFO      2017-11-20 17:28:16.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.config
-Version: 4.11.1
+Version: 5.1.0
 Summary: Oslo Configuration API
 Home-page: https://docs.openstack.org/oslo.config/latest/
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/doc/source/cli/generator.rst 
new/oslo.config-5.1.0/doc/source/cli/generator.rst
--- old/oslo.config-4.11.1/doc/source/cli/generator.rst 2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/doc/source/cli/generator.rst  2017-11-20 
17:25:42.000000000 +0100
@@ -311,7 +311,7 @@
       nova.api = nova.config:list_api_opts
       nova.compute = nova.config:list_compute_opts
 
-and generate a config file specific to each program::
+and generate a config file specific to each program:
 
 .. code-block:: shell
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo.config.egg-info/PKG-INFO 
new/oslo.config-5.1.0/oslo.config.egg-info/PKG-INFO
--- old/oslo.config-4.11.1/oslo.config.egg-info/PKG-INFO        2017-09-27 
06:25:24.000000000 +0200
+++ new/oslo.config-5.1.0/oslo.config.egg-info/PKG-INFO 2017-11-20 
17:28:15.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.config
-Version: 4.11.1
+Version: 5.1.0
 Summary: Oslo Configuration API
 Home-page: https://docs.openstack.org/oslo.config/latest/
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo.config.egg-info/SOURCES.txt 
new/oslo.config-5.1.0/oslo.config.egg-info/SOURCES.txt
--- old/oslo.config-4.11.1/oslo.config.egg-info/SOURCES.txt     2017-09-27 
06:25:25.000000000 +0200
+++ new/oslo.config-5.1.0/oslo.config.egg-info/SOURCES.txt      2017-11-20 
17:28:16.000000000 +0100
@@ -88,6 +88,7 @@
 releasenotes/source/mitaka.rst
 releasenotes/source/newton.rst
 releasenotes/source/ocata.rst
+releasenotes/source/pike.rst
 releasenotes/source/unreleased.rst
 releasenotes/source/_static/.placeholder
 releasenotes/source/_templates/.placeholder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo.config.egg-info/pbr.json 
new/oslo.config-5.1.0/oslo.config.egg-info/pbr.json
--- old/oslo.config-4.11.1/oslo.config.egg-info/pbr.json        2017-09-27 
06:25:24.000000000 +0200
+++ new/oslo.config-5.1.0/oslo.config.egg-info/pbr.json 2017-11-20 
17:28:15.000000000 +0100
@@ -1 +1 @@
-{"git_version": "fb07389", "is_release": true}
\ No newline at end of file
+{"git_version": "eb6ff02", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo.config.egg-info/requires.txt 
new/oslo.config-5.1.0/oslo.config.egg-info/requires.txt
--- old/oslo.config-4.11.1/oslo.config.egg-info/requires.txt    2017-09-27 
06:25:24.000000000 +0200
+++ new/oslo.config-5.1.0/oslo.config.egg-info/requires.txt     2017-11-20 
17:28:15.000000000 +0100
@@ -1,7 +1,7 @@
 debtcollector>=1.2.0
-netaddr!=0.7.16,>=0.7.13
-six>=1.9.0
+netaddr>=0.7.18
+six>=1.10.0
 stevedore>=1.20.0
-oslo.i18n!=3.15.2,>=2.1.0
+oslo.i18n>=3.15.3
 rfc3986>=0.3.1
-PyYAML>=3.10.0
+PyYAML>=3.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo_config/cfg.py 
new/oslo.config-5.1.0/oslo_config/cfg.py
--- old/oslo.config-4.11.1/oslo_config/cfg.py   2017-09-27 06:23:18.000000000 
+0200
+++ new/oslo.config-5.1.0/oslo_config/cfg.py    2017-11-20 17:25:42.000000000 
+0100
@@ -656,8 +656,8 @@
     If a project is specified and installed from a snap package, following
     directories are also returned:
 
-      ${SNAP}/etc/${project}
       ${SNAP_COMMON}/etc/${project}
+      ${SNAP}/etc/${project}
 
     Otherwise, if project is not specified, these directories are returned:
 
@@ -672,8 +672,8 @@
         _fixpath('~'),
         os.path.join('/etc', project) if project else None,
         '/etc',
-        os.path.join(snap, "etc", project) if snap and project else None,
         os.path.join(snap_c, "etc", project) if snap_c and project else None,
+        os.path.join(snap, "etc", project) if snap and project else None,
     ]
     return [x for x in cfg_dirs if x]
 
@@ -724,8 +724,8 @@
       ~/
       /etc/${project}/
       /etc/
-      ${SNAP}/etc/${project}
       ${SNAP_COMMON}/etc/${project}
+      ${SNAP}/etc/${project}
 
     We return an absolute path for (at most) one of each the default config
     files, for the topmost directory it exists in.
@@ -756,8 +756,8 @@
       ~/
       /etc/${project}/
       /etc/
-      ${SNAP}/etc/${project}
       ${SNAP_COMMON}/etc/${project}
+      ${SNAP}/etc/${project}
 
     We return an absolute path for each of the two config dirs,
     in the first place we find it (iff we find it).
@@ -1194,7 +1194,7 @@
         [group2]
         opt2=val21,val22
 
-    Then the value of "[group1]/opt1" will be ['val11', 'val12', 'val21',
+    Then the value of "[group1]/opt1" will be ['val10', 'val11', 'val21',
     'val22'].
 
     .. versionadded:: 1.2
@@ -1251,7 +1251,7 @@
     """
 
     def __init__(self, name, choices=None, quotes=None,
-                 regex=None, ignore_case=None, max_length=None, **kwargs):
+                 regex=None, ignore_case=False, max_length=None, **kwargs):
         super(StrOpt, self).__init__(name,
                                      type=types.String(
                                          choices=choices,
@@ -1261,6 +1261,27 @@
                                          max_length=max_length),
                                      **kwargs)
 
+    def _get_choice_text(self, choice):
+        if choice is None:
+            return '<None>'
+        elif choice == '':
+            return "''"
+        return six.text_type(choice)
+
+    def _get_argparse_kwargs(self, group, **kwargs):
+        """Extends the base argparse keyword dict for the config dir option."""
+        kwargs = super(StrOpt, self)._get_argparse_kwargs(group)
+
+        if getattr(self.type, 'choices', None):
+            choices_text = ', '.join([self._get_choice_text(choice)
+                                      for choice in self.type.choices])
+            if kwargs['help'] is not None:
+                kwargs['help'] += (' Allowed values: %s\n' % choices_text)
+            else:
+                kwargs['help'] = (' Allowed values: %s\n' % choices_text)
+
+        return kwargs
+
 
 class BoolOpt(Opt):
 
@@ -1829,6 +1850,9 @@
         """Clear this group's option parsing state."""
         self._argparse_group = None
 
+    def __str__(self):
+        return self.name
+
 
 class ParseError(iniparser.ParseError):
     def __init__(self, msg, lineno, line, filename):
@@ -2705,12 +2729,8 @@
         __import__(module_str)
         self._get_group(group)
 
-    @removals.removed_kwarg('enforce_type', "The argument enforce_type has "
-                            "changed its default value to True and then will"
-                            " be removed completely.",
-                            version='4.0', removal_version='5.0')
     @__clear_cache
-    def set_override(self, name, override, group=None, enforce_type=True):
+    def set_override(self, name, override, group=None):
         """Override an opt value.
 
         Override the command line, config file and default values of a
@@ -2719,21 +2739,15 @@
         :param name: the name/dest of the opt
         :param override: the override value
         :param group: an option OptGroup object or group name
-        :param enforce_type: a boolean whether to convert the override
-         value to the option's type, None is *not* converted even
-         if enforce_type is True.
+
         :raises: NoSuchOptError, NoSuchGroupError
         """
         opt_info = self._get_opt_info(name, group)
         opt_info['override'] = self._get_enforced_type_value(
-            opt_info['opt'], override, enforce_type)
+            opt_info['opt'], override)
 
-    @removals.removed_kwarg('enforce_type', "The argument enforce_type has "
-                            "changed its default value to True and then will"
-                            " be removed completely.",
-                            version='4.0', removal_version='5.0')
     @__clear_cache
-    def set_default(self, name, default, group=None, enforce_type=True):
+    def set_default(self, name, default, group=None):
         """Override an opt's default value.
 
         Override the default value of given option. A command line or
@@ -2742,27 +2756,18 @@
         :param name: the name/dest of the opt
         :param default: the default value
         :param group: an option OptGroup object or group name
-        :param enforce_type: a boolean whether to convert the default
-         value to the option's type, None is *not* converted even
-         if enforce_type is True.
+
         :raises: NoSuchOptError, NoSuchGroupError
         """
         opt_info = self._get_opt_info(name, group)
         opt_info['default'] = self._get_enforced_type_value(
-            opt_info['opt'], default, enforce_type)
+            opt_info['opt'], default)
 
-    def _get_enforced_type_value(self, opt, value, enforce_type):
+    def _get_enforced_type_value(self, opt, value):
         if value is None:
             return None
-        try:
-            converted = self._convert_value(value, opt)
-        except (ValueError, TypeError):
-            if enforce_type:
-                raise
-        if enforce_type:
-            return converted
-        else:
-            return value
+
+        return self._convert_value(value, opt)
 
     @__clear_cache
     def clear_override(self, name, group=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo_config/fixture.py 
new/oslo.config-5.1.0/oslo_config/fixture.py
--- old/oslo.config-4.11.1/oslo_config/fixture.py       2017-09-27 
06:23:17.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/fixture.py        2017-11-20 
17:25:42.000000000 +0100
@@ -63,19 +63,11 @@
         the specified configuration option group, otherwise the overrides
         are applied to the ``default`` group.
 
-        If a `enforce_type` is supplied, will convert the override
-        value to the option's type before overriding.
         """
 
         group = kw.pop('group', None)
-        enforce_type = kw.pop('enforce_type', True)
         for k, v in kw.items():
-            if enforce_type is False:
-                self.conf.set_override(k, v, group, enforce_type=False)
-            else:
-                # this removes the deprecation warning if you are just
-                # using defaults
-                self.conf.set_override(k, v, group)
+            self.conf.set_override(k, v, group)
 
     def _unregister_config_opts(self):
         for group in self._registered_config_opts:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo_config/generator.py 
new/oslo.config-5.1.0/oslo_config/generator.py
--- old/oslo.config-4.11.1/oslo_config/generator.py     2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/generator.py      2017-11-20 
17:25:42.000000000 +0100
@@ -18,7 +18,7 @@
 """Sample configuration generator
 
 Tool for generating a sample configuration file. See
-../doc/source/generator.rst for details.
+../doc/source/cli/generator.rst for details.
 
 .. versionadded:: 1.4
 """
@@ -748,7 +748,13 @@
     logging.basicConfig(level=logging.WARN)
     conf = cfg.ConfigOpts()
     register_cli_opts(conf)
-    conf(args, version=version)
+    try:
+        conf(args, version=version)
+    except cfg.RequiredOptError:
+        conf.print_help()
+        if not sys.argv[1:]:
+            raise SystemExit
+        raise
     generate(conf)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo_config/sphinxext.py 
new/oslo.config-5.1.0/oslo_config/sphinxext.py
--- old/oslo.config-4.11.1/oslo_config/sphinxext.py     2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/sphinxext.py      2017-11-20 
17:25:42.000000000 +0100
@@ -125,7 +125,7 @@
         try:
             if opt.mutable:
                 yield _indent(
-                    ':Mutable: This option can be changed without restarting.',
+                    ':Mutable: This option can be changed without restarting.'
                 )
         except AttributeError as err:
             # NOTE(dhellmann): keystoneauth defines its own Opt class,
@@ -147,11 +147,11 @@
                               (opt.dest, err))
         if opt.advanced:
             yield _indent(
-                ':Advanced Option: intended for advanced users and not used',)
+                ':Advanced Option: Intended for advanced users and not used')
             yield _indent(
-                ':by the majority of users, and might have a significant',)
+                'by the majority of users, and might have a significant', 6)
             yield _indent(
-                ':effect on stability and/or performance.',)
+                'effect on stability and/or performance.', 6)
         yield ''
 
         try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo_config/tests/test_cfg.py 
new/oslo.config-5.1.0/oslo_config/tests/test_cfg.py
--- old/oslo.config-4.11.1/oslo_config/tests/test_cfg.py        2017-09-27 
06:23:17.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/tests/test_cfg.py 2017-11-20 
17:25:42.000000000 +0100
@@ -167,6 +167,32 @@
         self.assertIn('optional', f.getvalue())
         self.assertIn('-h, --help', f.getvalue())
 
+    def test_print_strOpt_with_choices_help(self):
+        f = moves.StringIO()
+        cli_opts = [
+            cfg.StrOpt('aa', short='a', default='xx',
+                       choices=['xx', 'yy', 'zz'],
+                       help='StrOpt with choices.'),
+            cfg.StrOpt('bb', short='b', default='yy',
+                       choices=[None, 'yy', 'zz'],
+                       help='StrOpt with choices.'),
+            cfg.StrOpt('cc', short='c', default='zz',
+                       choices=['', 'yy', 'zz'],
+                       help='StrOpt with choices.'),
+        ]
+        self.conf.register_cli_opts(cli_opts)
+        self.conf([])
+        self.conf.print_help(file=f)
+        self.assertIn('usage: test FOO BAR', f.getvalue())
+        self.assertIn('optional', f.getvalue())
+        self.assertIn('-h, --help', f.getvalue())
+        self.assertIn('StrOpt with choices. Allowed values: xx, yy, zz',
+                      f.getvalue())
+        self.assertIn('StrOpt with choices. Allowed values: <None>, yy, zz',
+                      f.getvalue())
+        self.assertIn("StrOpt with choices. Allowed values: '', yy, zz",
+                      f.getvalue())
+
     def test_print_sorted_help(self):
         f = moves.StringIO()
         self.conf.register_cli_opt(cfg.StrOpt('abc'))
@@ -224,7 +250,8 @@
         self.assertEqual(cfg.find_config_files(project='blaa'), config_files)
 
     def test_find_config_files_snap(self):
-        config_files = ['/snap/nova/current/etc/blaa/blaa.conf']
+        config_files = ['/snap/nova/current/etc/blaa/blaa.conf',
+                        '/var/snap/nova/common/etc/blaa/blaa.conf']
         fake_env = {'SNAP': '/snap/nova/current/',
                     'SNAP_COMMON': '/var/snap/nova/common/'}
 
@@ -233,7 +260,8 @@
                         lambda p: p in config_files))
         self.useFixture(fixtures.MonkeyPatch('os.environ', fake_env))
 
-        self.assertEqual(cfg.find_config_files(project='blaa'), config_files)
+        self.assertEqual(cfg.find_config_files(project='blaa'),
+                         ['/var/snap/nova/common/etc/blaa/blaa.conf'])
 
     def test_find_config_files_with_extension(self):
         config_files = ['/etc/foo.json']
@@ -2235,6 +2263,7 @@
         self.assertTrue(hasattr(self.conf, 'blaa'))
         self.assertTrue(hasattr(self.conf.blaa, 'foo'))
         self.assertEqual('bar', self.conf.blaa.foo)
+        self.assertEqual('blaa', str(blaa_group))
 
     def test_autocreate_group_by_name(self):
         self.conf.register_cli_opt(cfg.StrOpt('foo'), group='blaa')
@@ -3301,15 +3330,6 @@
         self.conf.clear_override('foo')
         self.assertIsNone(self.conf.foo)
 
-    def test_no_enforce_type_str_override(self):
-        self.conf.register_opt(cfg.StrOpt('foo'))
-        self.conf.set_override('foo', True, enforce_type=False)
-        self.conf([])
-        # Ensure we don't change the provided type by mistake
-        self.assertEqual(True, self.conf.foo)
-        self.conf.clear_override('foo')
-        self.assertIsNone(self.conf.foo)
-
     def test_enforce_type_wrong_type_override(self):
         self.conf.register_opt(cfg.IntOpt('foo'))
         self.assertRaises(ValueError, self.conf.set_override,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/oslo_config/tests/test_fixture.py 
new/oslo.config-5.1.0/oslo_config/tests/test_fixture.py
--- old/oslo.config-4.11.1/oslo_config/tests/test_fixture.py    2017-09-27 
06:23:17.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/tests/test_fixture.py     2017-11-20 
17:25:42.000000000 +0100
@@ -46,12 +46,7 @@
         f = self._make_fixture()
         self.assertEqual(5, f.conf.get('test2'))
         self.assertEqual('a', f.conf.get('test3'))
-        # with enforce_type=False
-        f.config(test2=-1, enforce_type=False)
-        self.assertEqual(-1, f.conf.get('test2'))
-        f.config(test3='c', enforce_type=False)
-        self.assertEqual('c', f.conf.get('test3'))
-        # with enforce_type=True
+        # enforce type will always be true now
         self.assertRaises(ValueError, f.config, test2=-1)
         self.assertRaises(ValueError, f.config, test3='c')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.config-4.11.1/oslo_config/tests/test_generator.py 
new/oslo.config-5.1.0/oslo_config/tests/test_generator.py
--- old/oslo.config-4.11.1/oslo_config/tests/test_generator.py  2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/tests/test_generator.py   2017-11-20 
17:25:42.000000000 +0100
@@ -1581,10 +1581,10 @@
         with mock.patch('pkg_resources.iter_entry_points', fake_eps):
             self.assertRaises(FakeException, generator.generate, self.conf)
 
-    def test_generator_call_with_no_arguments_raises_error(self):
+    def test_generator_call_with_no_arguments_raises_system_exit(self):
         testargs = ['oslo-config-generator']
         with mock.patch('sys.argv', testargs):
-            self.assertRaises(cfg.RequiredOptError, generator.main, [])
+            self.assertRaises(SystemExit, generator.main, [])
 
 
 class ChangeDefaultsTestCase(base.BaseTestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.config-4.11.1/oslo_config/tests/test_sphinxext.py 
new/oslo.config-5.1.0/oslo_config/tests/test_sphinxext.py
--- old/oslo.config-4.11.1/oslo_config/tests/test_sphinxext.py  2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/oslo_config/tests/test_sphinxext.py   2017-11-20 
17:25:42.000000000 +0100
@@ -359,9 +359,9 @@
 
           :Type: string
           :Default: ``<None>``
-          :Advanced Option: intended for advanced users and not used
-          :by the majority of users, and might have a significant
-          :effect on stability and/or performance.
+          :Advanced Option: Intended for advanced users and not used
+              by the majority of users, and might have a significant
+              effect on stability and/or performance.
 
         ''').lstrip(), results)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/releasenotes/source/conf.py 
new/oslo.config-5.1.0/releasenotes/source/conf.py
--- old/oslo.config-4.11.1/releasenotes/source/conf.py  2017-09-27 
06:23:17.000000000 +0200
+++ new/oslo.config-5.1.0/releasenotes/source/conf.py   2017-11-20 
17:25:42.000000000 +0100
@@ -64,16 +64,12 @@
 project = u'oslo.config Release Notes'
 copyright = u'2016, oslo.config Developers'
 
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-from oslo_config.version import version_info as oslo_config_version
+# Release notes do not need a version in the title, they span
+# multiple versions.
 # The full version, including alpha/beta/rc tags.
-release = oslo_config_version.version_string_with_vcs()
+release = ''
 # The short X.Y version.
-version = oslo_config_version.canonical_version_string()
+version = ''
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/releasenotes/source/index.rst 
new/oslo.config-5.1.0/releasenotes/source/index.rst
--- old/oslo.config-4.11.1/releasenotes/source/index.rst        2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/releasenotes/source/index.rst 2017-11-20 
17:25:42.000000000 +0100
@@ -6,6 +6,7 @@
     :maxdepth: 1
 
     unreleased
+    pike
     ocata
     newton
     mitaka
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/releasenotes/source/pike.rst 
new/oslo.config-5.1.0/releasenotes/source/pike.rst
--- old/oslo.config-4.11.1/releasenotes/source/pike.rst 1970-01-01 
01:00:00.000000000 +0100
+++ new/oslo.config-5.1.0/releasenotes/source/pike.rst  2017-11-20 
17:25:42.000000000 +0100
@@ -0,0 +1,6 @@
+===================================
+ Pike Series Release Notes
+===================================
+
+.. release-notes::
+   :branch: stable/pike
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/requirements.txt 
new/oslo.config-5.1.0/requirements.txt
--- old/oslo.config-4.11.1/requirements.txt     2017-09-27 06:23:18.000000000 
+0200
+++ new/oslo.config-5.1.0/requirements.txt      2017-11-20 17:25:42.000000000 
+0100
@@ -3,9 +3,9 @@
 # process, which may cause wedges in the gate later.
 
 debtcollector>=1.2.0 # Apache-2.0
-netaddr!=0.7.16,>=0.7.13 # BSD
-six>=1.9.0 # MIT
+netaddr>=0.7.18 # BSD
+six>=1.10.0 # MIT
 stevedore>=1.20.0 # Apache-2.0
-oslo.i18n!=3.15.2,>=2.1.0 # Apache-2.0
+oslo.i18n>=3.15.3 # Apache-2.0
 rfc3986>=0.3.1 # Apache-2.0
-PyYAML>=3.10.0 # MIT
+PyYAML>=3.10 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/test-requirements.txt 
new/oslo.config-5.1.0/test-requirements.txt
--- old/oslo.config-4.11.1/test-requirements.txt        2017-09-27 
06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/test-requirements.txt 2017-11-20 17:25:42.000000000 
+0100
@@ -4,10 +4,9 @@
 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
 
 fixtures>=3.0.0 # Apache-2.0/BSD
-python-subunit>=0.0.18 # Apache-2.0/BSD
 testrepository>=0.0.18 # Apache-2.0/BSD
 testscenarios>=0.4 # Apache-2.0/BSD
-testtools>=1.4.0 # MIT
+testtools>=2.2.0 # MIT
 oslotest>=1.10.0 # Apache-2.0
 
 # when we can require tox>= 1.4, this can go into tox.ini:
@@ -17,11 +16,11 @@
 
 # this is required for the docs build jobs
 sphinx>=1.6.2 # BSD
-openstackdocstheme>=1.16.0 # Apache-2.0
-reno!=2.3.1,>=1.8.0 # Apache-2.0
+openstackdocstheme>=1.17.0 # Apache-2.0
+reno>=2.5.0 # Apache-2.0
 
 # mocking framework
-mock>=2.0 # BSD
+mock>=2.0.0 # BSD
 
 # Bandit security code scanner
 bandit>=1.1.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.config-4.11.1/tox.ini 
new/oslo.config-5.1.0/tox.ini
--- old/oslo.config-4.11.1/tox.ini      2017-09-27 06:23:18.000000000 +0200
+++ new/oslo.config-5.1.0/tox.ini       2017-11-20 17:25:42.000000000 +0100
@@ -8,7 +8,7 @@
     VIRTUAL_ENV={envdir}
     BRANCH_NAME=master
     CLIENT_NAME=oslo.config
-install_command = {toxinidir}/tools/tox_install.sh 
{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike}
 {opts} {packages}
+install_command = {toxinidir}/tools/tox_install.sh 
{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
 {opts} {packages}
 deps = -r{toxinidir}/test-requirements.txt
 commands =
   python setup.py test --coverage --coverage-package-name=oslo_config 
--slowest --testr-args='{posargs}'


Reply via email to