23119246 Upgrade oslo.config to 3.9.0
authorLaszlo Peter <laszlo.peter@oracle.com>
Wed, 07 Sep 2016 14:48:31 -0700
changeset 6799 8a4da6a752d7
parent 6798 dd6058afd589
child 6800 33b8302961f5
23119246 Upgrade oslo.config to 3.9.0
components/python/oslo.config/Makefile
components/python/oslo.config/oslo.config-PYVER.p5m
components/python/oslo.config/oslo.config.license
components/python/oslo.config/patches/disable-oslo-deprecation.patch
components/python/oslo.config/patches/launchpad-1438314.patch
components/python/oslo.config/patches/requirements.patch
--- a/components/python/oslo.config/Makefile	Wed Sep 07 14:48:31 2016 -0700
+++ b/components/python/oslo.config/Makefile	Wed Sep 07 14:48:31 2016 -0700
@@ -26,36 +26,36 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		oslo.config
-COMPONENT_VERSION=	1.9.3
+COMPONENT_VERSION=	3.9.0
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:ab54e67776d9bbee86ba8cce9393ba3186e6e63de926e9797598dc35fe790140
+    sha256:ec7bdf4a3d85f90cf07d2fa03a20783558ad0f490d71bd8faf50bf4ee2923df1
 COMPONENT_ARCHIVE_URL=	$(call pypi_url)
-COMPONENT_PROJECT_URL=	https://launchpad.net/oslo.config
+COMPONENT_PROJECT_URL=	http://docs.openstack.org/developer/oslo.config/
 COMPONENT_BUGDB=	python-mod/oslo.config
 
-TPNO=			25738
+TPNO=			28362
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/setup.py.mk
 include $(WS_MAKE_RULES)/ips.mk
 
+ASLR_MODE = $(ASLR_NOT_APPLICABLE)
+
 COMPONENT_POST_INSTALL_ACTION += \
-	($(TOUCH) $(PROTO_DIR)/usr/lib/python$(PYTHON_VERSION)/vendor-packages/oslo/__init__.py; \
-	 $(PYTHON) -m compileall $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES); \
-	 cd $(PROTO_DIR)/usr/bin ; \
-	 $(MV) -f oslo-config-generator oslo-config-generator-$(PYTHON_VERSION))
-
-ASLR_MODE = $(ASLR_NOT_APPLICABLE)
+    ($(TOUCH) $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES)/oslo/__init__.py; \
+     $(PYTHON) -m compileall $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES); \
+     cd $(PROTO_DIR)/usr/bin ; \
+     $(MV) -f oslo-config-generator oslo-config-generator-$(PYTHON_VERSION))
 
 # common targets
 build:		$(BUILD_NO_ARCH)
 
 install:	$(INSTALL_NO_ARCH)
 
-# see $(COMPONENT_SRC)/test-requirements.txt for the python modules
+# See $(COMPONENT_SRC)/test-requirements.txt for the Python modules
 # required to execute unittests.
 test:		$(NO_TESTS)
 
-system-test:    $(NO_TESTS)
+system-test:	$(NO_TESTS)
--- a/components/python/oslo.config/oslo.config-PYVER.p5m	Wed Sep 07 14:48:31 2016 -0700
+++ b/components/python/oslo.config/oslo.config-PYVER.p5m	Wed Sep 07 14:48:31 2016 -0700
@@ -27,6 +27,7 @@
 # continue to do so for now by dropping the dependency on the
 # corresponding netaddr as the latter is not Python 3 ready.
 <transform depend fmri=library/python/netaddr-3\d type=require -> drop>
+#
 set name=pkg.fmri \
     value=pkg:/library/python/oslo.config-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 set name=pkg.summary value="Oslo configuration library"
@@ -45,31 +46,25 @@
 link path=usr/bin/oslo-config-generator target=oslo-config-generator-$(PYVER) \
     mediator=python mediator-version=$(PYVER)
 file path=usr/bin/oslo-config-generator-$(PYVER)
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER)-nspkg.pth
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/PKG-INFO
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/SOURCES.txt
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/dependency_links.txt
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/entry_points.txt
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/namespace_packages.txt
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/not-zip-safe
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/pbr.json
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/requires.txt
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo.config-$(COMPONENT_VERSION)-py$(PYVER).egg-info/top_level.txt
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/__init__.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/cfg.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/cfgfilter.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/fixture.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/generator.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/iniparser.py
-file path=usr/lib/python$(PYVER)/vendor-packages/oslo/config/types.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/__init__.py
+file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/_list_opts.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/cfg.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/cfgfilter.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/fixture.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/generator.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/iniparser.py
+file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/sphinxconfiggen.py
+file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/sphinxext.py
 file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/types.py
+file path=usr/lib/python$(PYVER)/vendor-packages/oslo_config/version.py
 #
 license oslo.config.license license="Apache v2.0"
 
@@ -77,12 +72,9 @@
 depend type=optional \
     fmri=library/python-2/oslo.config-$(PYV)@1.2.1,5.12-5.12.0.0.0.44.0
 
-# force a dependency on the Python runtime
-depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
-    pkg.debug.depend.path=usr/bin
-
-# force a dependency on argparse; pkgdepend work is needed to flush this out.
-depend type=require fmri=library/python/argparse-$(PYV)
+# force a dependency on debtcollector; pkgdepend work is needed to flush this
+# out.
+depend type=require fmri=library/python/debtcollector-$(PYV)
 
 # force a dependency on netaddr; pkgdepend work is needed to flush this out.
 depend type=require fmri=library/python/netaddr-$(PYV)
@@ -91,6 +83,9 @@
 depend type=require \
     fmri=library/python/oslo.config@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
 
+# force a dependency on pbr; pkgdepend work is needed to flush this out.
+depend type=require fmri=library/python/pbr-$(PYV)
+
 # force a dependency on setuptools; pkgdepend work is needed to flush this out.
 depend type=require fmri=library/python/setuptools-$(PYV)
 
--- a/components/python/oslo.config/oslo.config.license	Wed Sep 07 14:48:31 2016 -0700
+++ b/components/python/oslo.config/oslo.config.license	Wed Sep 07 14:48:31 2016 -0700
@@ -4,12 +4,11 @@
  
 You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.  A copy of the license is also reproduced below.
 
-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.
+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.
 
-		                 Apache License
+                                 Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
 
@@ -183,31 +182,3 @@
       defend, and hold each Contributor harmless for any liability
       incurred by, or claims asserted against, such Contributor by reason
       of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   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.
-
--- a/components/python/oslo.config/patches/disable-oslo-deprecation.patch	Wed Sep 07 14:48:31 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-This patch removes the legacy oslo namespace deprecation check from the
-oslo.config library. The deprecated() function is left to satisfy the
-unit tests. It is not suitable for the upstream and should be removed
-once all of the relevant consumers have switched over to the new
-namespace.
-
---- oslo.config-1.6.0/oslo/config/__init__.py.~1~	2015-01-05 10:32:34.000000000 -0800
-+++ oslo.config-1.6.0/oslo/config/__init__.py	2015-03-02 12:24:59.359891746 -0800
-@@ -23,6 +23,3 @@ def deprecated():
-         DeprecationWarning,
-         stacklevel=3,
-     )
--
--
--deprecated()
--- a/components/python/oslo.config/patches/launchpad-1438314.patch	Wed Sep 07 14:48:31 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-From 8ddd9180967fae11803b59e92cab0e51faa99cf6 Mon Sep 17 00:00:00 2001
-From: Ben Nemec <[email protected]>
-Date: Tue, 31 Mar 2015 15:37:25 +0000
-Subject: Fix logging of deprecated opts with dest override
-
-When a deprecated opt is used and the new opt name has the dest
-property overridden, we were logging the dest property instead of
-the actual opt name in the deprecation warning.  This is confusing
-because it leads to log messages such as:
-
-Option "username" from group "nova" is deprecated. Use option
-"username" from group "nova".
-
-This is nonsense.  In this case the proper new name was "user-name"
-but because it had a dest override of "username" that's what was
-logged.
-
-Because the deprecation check code does not have access to the
-actual opt itself, we need to pass the undeprecated name down from
-the opt into the namespace code that does the check.
-
-I also tried simply adding a (group, name) tuple to the beginning
-of the names list, but this subtly broke the CLI opt tests because
-there are specific combinations of - and _ variants expected, and
-this seems to violate those assumptions.  I did not pursue it any
-further because I felt it was better to simply be explicit about
-the current name and not mess around with adding non-existent opt
-names to the lookup list solely for logging purposes.
-
-Change-Id: Ib1ea8ae2d60a9c508935bad27d7ddc2cdb5ab505
-Closes-Bug: #1438314
----
- oslo_config/cfg.py            | 14 +++++++++-----
- oslo_config/tests/test_cfg.py | 16 ++++++++++++++++
- 2 files changed, 25 insertions(+), 5 deletions(-)
-
-diff --git a/oslo_config/cfg.py b/oslo_config/cfg.py
-index 77fd44d..f472139 100644
---- a/oslo_config/cfg.py
-+++ b/oslo_config/cfg.py
-@@ -717,6 +717,7 @@ class Opt(object):
-         :param group_name: a group name
-         """
-         names = [(group_name, self.dest)]
-+        current_name = (group_name, self.name)
- 
-         for opt in self.deprecated_opts:
-             dname, dgroup = opt.name, opt.group
-@@ -724,7 +725,8 @@ class Opt(object):
-                 names.append((dgroup if dgroup else group_name,
-                               dname if dname else self.dest))
- 
--        value = namespace._get_value(names, self.multi, self.positional)
-+        value = namespace._get_value(names, self.multi, self.positional,
-+                                     current_name)
-         # The previous line will raise a KeyError if no value is set in the
-         # config file, so we'll only log deprecations for set options.
-         if self.deprecated_for_removal and not self._logged_deprecation:
-@@ -1469,7 +1471,7 @@ class MultiConfigParser(object):
-     def get(self, names, multi=False):
-         return self._get(names, multi=multi)
- 
--    def _get(self, names, multi=False, normalized=False):
-+    def _get(self, names, multi=False, normalized=False, current_name=None):
-         """Fetch a config file value from the parsed files.
- 
-         :param names: a list of (section, name) tuples
-@@ -1488,7 +1490,8 @@ class MultiConfigParser(object):
-                 if section not in sections:
-                     continue
-                 if name in sections[section]:
--                    self._check_deprecated((section, name), names[0],
-+                    current_name = current_name or names[0]
-+                    self._check_deprecated((section, name), current_name,
-                                            names[1:])
-                     val = sections[section][name]
-                     if multi:
-@@ -1641,7 +1644,7 @@ class _Namespace(argparse.Namespace):
- 
-         raise KeyError
- 
--    def _get_value(self, names, multi, positional):
-+    def _get_value(self, names, multi, positional, current_name):
-         """Fetch a value from config files.
- 
-         Multiple names for a given configuration option may be supplied so
-@@ -1658,7 +1661,8 @@ class _Namespace(argparse.Namespace):
-             pass
- 
-         names = [(g if g is not None else 'DEFAULT', n) for g, n in names]
--        values = self._parser._get(names, multi=multi, normalized=True)
-+        values = self._parser._get(names, multi=multi, normalized=True,
-+                                   current_name=current_name)
-         return values if multi else values[-1]
- 
- 
-diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py
-index 5518f53..e007494 100644
---- a/oslo_config/tests/test_cfg.py
-+++ b/oslo_config/tests/test_cfg.py
-@@ -3724,3 +3724,19 @@ class DeprecationWarningTests(DeprecationWarningTestBase):
-                     'removal.  Its value may be silently ignored in the '
-                     'future.\n')
-         self.assertEqual(expected, self.log_fixture.output)
-+
-+    def test_deprecated_with_dest(self):
-+        self.conf.register_group(cfg.OptGroup('other'))
-+        self.conf.register_opt(cfg.StrOpt('foo-bar', deprecated_name='bar',
-+                                          dest='foo'),
-+                               group='other')
-+        content = 'bar=baz'
-+        paths = self.create_tempfiles([('test',
-+                                        '[other]\n' +
-+                                        content + '\n')])
-+
-+        self.conf(['--config-file', paths[0]])
-+        self.assertEqual('baz', self.conf.other.foo)
-+        expected = (self._parser_class._deprecated_opt_message %
-+                    ('bar', 'other', 'foo-bar', 'other') + '\n')
-+        self.assertEqual(expected, self.log_fixture.output)
--- 
-cgit v0.11.2
-
--- a/components/python/oslo.config/patches/requirements.patch	Wed Sep 07 14:48:31 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-In-house patch to remove the dependency on argparse.  Since we use
-Python 2.7 only for OpenStack, argparse is already included.  If this
-line is present, stevedore will fail to find the pip package for it,
-causing a cascade of failures to other tools.
-
---- oslo.config-1.9.3/requirements.txt.orig	2015-08-02 01:56:12.150390781 -0400
-+++ oslo.config-1.9.3/requirements.txt	2015-08-02 01:56:21.014379452 -0400
-@@ -3,7 +3,6 @@
- # process, which may cause wedges in the gate later.
- 
- pbr>=0.6,!=0.7,<1.0
--argparse
- netaddr>=0.7.12
- six>=1.9.0
- stevedore>=1.1.0  # Apache-2.0
-
---- oslo.config-1.9.3/oslo.config.egg-info/requires.txt.orig	2015-08-02 17:13:11.346987523 -0400
-+++ oslo.config-1.9.3/oslo.config.egg-info/requires.txt	2015-08-02 01:56:41.173806019 -0400
-@@ -1,5 +1,4 @@
- pbr>=0.6,!=0.7,<1.0
--argparse
- netaddr>=0.7.12
- six>=1.9.0
- stevedore>=1.1.0  # Apache-2.0