Hello community, here is the log from the commit of package python-osc-lib for openSUSE:Factory checked in at 2020-10-26 16:16:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-osc-lib (Old) and /work/SRC/openSUSE:Factory/.python-osc-lib.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-osc-lib" Mon Oct 26 16:16:21 2020 rev:13 rq:841203 version:2.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-osc-lib/python-osc-lib.changes 2020-06-05 20:15:40.382860943 +0200 +++ /work/SRC/openSUSE:Factory/.python-osc-lib.new.3463/python-osc-lib.changes 2020-10-26 16:16:58.150966778 +0100 @@ -1,0 +2,26 @@ +Fri Oct 9 19:07:24 UTC 2020 - [email protected] + +- update to version 2.2.1 + - Add a couple of release notes + - Update master for stable/ussuri + - Add get_osc_show_columns_for_sdk_resource function + - Add Python3 victoria unit tests + - Fix the misspelling of "argument" + - Stop using lib-forward-testing + - Revert "Add error message when occurrence Forbidden error" + - Cleanup py27 support + - Stop configuring install_command in tox and stop use pip. + - Fix the requirement of keystoneauth1. + - Use mock from unittest + - Remove commandmanager subclass + - Remove .testr.conf + - Update hacking for Python3 + - Add pep8 import order check + - Remove six library from dependencies + - Switch to newer openstackdocstheme and reno versions + - Update to hacking 3.0 + - Replace assertItemsEqual with assertCountEqual + - Remove Babel from requirements + - Save the results from the early authentication + +------------------------------------------------------------------- Old: ---- osc-lib-2.0.0.tar.gz New: ---- osc-lib-2.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-osc-lib.spec ++++++ --- /var/tmp/diff_new_pack.0UzhMo/_old 2020-10-26 16:16:59.070967517 +0100 +++ /var/tmp/diff_new_pack.0UzhMo/_new 2020-10-26 16:16:59.074967521 +0100 @@ -17,18 +17,18 @@ Name: python-osc-lib -Version: 2.0.0 +Version: 2.2.1 Release: 0 Summary: OpenStackClient Library License: Apache-2.0 Group: Development/Languages/Python URL: https://docs.openstack.org/developer/osc-lib -Source0: https://files.pythonhosted.org/packages/source/o/osc-lib/osc-lib-2.0.0.tar.gz +Source0: https://files.pythonhosted.org/packages/source/o/osc-lib/osc-lib-2.2.1.tar.gz BuildRequires: openstack-macros -BuildRequires: python3-Babel >= 2.3.4 -BuildRequires: python3-cliff >= 2.8.0 +BuildRequires: python3-Babel +BuildRequires: python3-cliff >= 3.2.0 BuildRequires: python3-fixtures -BuildRequires: python3-keystoneauth1 >= 3.7.0 +BuildRequires: python3-keystoneauth1 >= 3.14.0 BuildRequires: python3-mock BuildRequires: python3-openstacksdk >= 0.15.0 BuildRequires: python3-oslo.i18n >= 3.15.3 @@ -38,7 +38,7 @@ BuildRequires: python3-pbr >= 2.0.0 BuildRequires: python3-requests-mock BuildRequires: python3-simplejson >= 3.5.1 -BuildRequires: python3-six >= 1.10.0 +BuildRequires: python3-six BuildRequires: python3-stestr BuildRequires: python3-stevedore >= 1.20.0 BuildRequires: python3-testtools @@ -51,15 +51,15 @@ %package -n python3-osc-lib Summary: OpenStackClient Library Group: Development/Languages/Python -Requires: python3-Babel >= 2.3.4 -Requires: python3-cliff >= 2.8.0 -Requires: python3-keystoneauth1 >= 3.7.0 +Requires: python3-Babel +Requires: python3-cliff >= 3.2.0 +Requires: python3-keystoneauth1 >= 3.14.0 Requires: python3-openstacksdk >= 0.15.0 Requires: python3-oslo.i18n >= 3.15.3 Requires: python3-oslo.utils >= 3.33.0 Requires: python3-pbr >= 2.0.0 Requires: python3-simplejson >= 3.5.1 -Requires: python3-six >= 1.10.0 +Requires: python3-six Requires: python3-stevedore >= 1.20.0 %description -n python3-osc-lib @@ -80,7 +80,7 @@ Documentation for the OpenStack client library. %prep -%autosetup -p1 -n osc-lib-2.0.0 +%autosetup -p1 -n osc-lib-2.2.1 %py_req_cleanup %build ++++++ _service ++++++ --- /var/tmp/diff_new_pack.0UzhMo/_old 2020-10-26 16:16:59.102967543 +0100 +++ /var/tmp/diff_new_pack.0UzhMo/_new 2020-10-26 16:16:59.106967546 +0100 @@ -1,8 +1,8 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/osc-lib/osc-lib.spec.j2</param> + <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/victoria/openstack/osc-lib/osc-lib.spec.j2</param> <param name="output-name">python-osc-lib.spec</param> - <param name="requirements">https://opendev.org/openstack/osc-lib/raw/branch/stable/ussuri/requirements.txt</param> + <param name="requirements">https://opendev.org/openstack/osc-lib/raw/branch/stable/victoria/requirements.txt</param> <param name="changelog-email">[email protected]</param> <param name="changelog-provider">gh,openstack,osc-lib</param> </service> ++++++ osc-lib-2.0.0.tar.gz -> osc-lib-2.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/.testr.conf new/osc-lib-2.2.1/.testr.conf --- old/osc-lib-2.0.0/.testr.conf 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/.testr.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./osc_lib/tests} $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list -group_regex=([^\.]+\.)+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/.zuul.yaml new/osc-lib-2.2.1/.zuul.yaml --- old/osc-lib-2.0.0/.zuul.yaml 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/.zuul.yaml 2020-09-08 14:29:08.000000000 +0200 @@ -1,10 +1,9 @@ - project: templates: - check-requirements - - lib-forward-testing - lib-forward-testing-python3 - openstack-lower-constraints-jobs - - openstack-python3-ussuri-jobs + - openstack-python3-victoria-jobs - osc-tox-unit-tips - publish-openstack-docs-pti - release-notes-jobs-python3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/AUTHORS new/osc-lib-2.2.1/AUTHORS --- old/osc-lib-2.0.0/AUTHORS 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/AUTHORS 2020-09-08 14:29:53.000000000 +0200 @@ -8,11 +8,13 @@ Alex Schultz <[email protected]> Alexander Ignatov <[email protected]> Alexander Tsamutali <[email protected]> +Alfredo Moralejo <[email protected]> Alvaro Lopez Garcia <[email protected]> Amey Bhide <[email protected]> Andreas Jaeger <[email protected]> Andreas Jaeger <[email protected]> Andrey Kurilin <[email protected]> +Artem Goncharov <[email protected]> Atsushi SAKAI <[email protected]> Bar Elharar <[email protected]> Bharat Kunwar <[email protected]> @@ -29,6 +31,7 @@ Corey Bryant <[email protected]> Cyril Roelandt <[email protected]> Daisuke Fujita <[email protected]> +Daniel Bengtsson <[email protected]> Daniel Gonzalez <[email protected]> Daniel Speichert <[email protected]> Dao Cong Tien <[email protected]> @@ -42,6 +45,7 @@ Dougal Matthews <[email protected]> Eric Brown <[email protected]> Eric Fried <[email protected]> +Feilong Wang <[email protected]> Florent Flament <[email protected]> Ghanshyam Mann <[email protected]> Guojian Shao <[email protected]> @@ -78,6 +82,7 @@ Marek Aufart <[email protected]> Marek Denis <[email protected]> Mark Vanderwiel <[email protected]> +Masayuki Igawa <[email protected]> Matt Fischer <[email protected]> Matt Joyce <[email protected]> Matt Riedemann <[email protected]> @@ -97,6 +102,7 @@ Qiu Yu <[email protected]> Rabi Mishra <[email protected]> Reedip <[email protected]> +Riccardo Pittau <[email protected]> Richard Theis <[email protected]> Rodrigo Duarte Sousa <[email protected]> Roey Chen <[email protected]> @@ -136,6 +142,7 @@ jiaxi <[email protected]> jichenjc <[email protected]> kavithahr <[email protected]> +lijunjie <[email protected]> lin-hua-cheng <[email protected]> luqitao <[email protected]> pengyuesheng <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/ChangeLog new/osc-lib-2.2.1/ChangeLog --- old/osc-lib-2.0.0/ChangeLog 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/ChangeLog 2020-09-08 14:29:53.000000000 +0200 @@ -1,6 +1,39 @@ CHANGES ======= +2.2.1 +----- + + +2.2.0 +----- + +* Fix the misspelling of "argument" +* Remove commandmanager subclass +* Stop configuring install\_command in tox and stop use pip +* Add get\_osc\_show\_columns\_for\_sdk\_resource function +* Switch to newer openstackdocstheme and reno versions + +2.1.0 +----- + +* Add a couple of release notes +* Remove .testr.conf +* Remove six library from dependencies +* Save the results from the early authentication +* Add pep8 import order check +* Use mock from unittest +* Remove Babel from requirements +* Add Python3 victoria unit tests +* Update master for stable/ussuri +* Cleanup py27 support +* Fix the requirement of keystoneauth1 +* Update to hacking 3.0 +* Update hacking for Python3 +* Revert "Add error message when occurrence Forbidden error" +* Replace assertItemsEqual with assertCountEqual +* Stop using lib-forward-testing + 2.0.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/PKG-INFO new/osc-lib-2.2.1/PKG-INFO --- old/osc-lib-2.0.0/PKG-INFO 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/PKG-INFO 2020-09-08 14:29:53.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: osc-lib -Version: 2.0.0 +Version: 2.2.1 Summary: OpenStackClient Library Home-page: https://docs.openstack.org/osc-lib/latest/ Author: OpenStack @@ -78,6 +78,9 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Requires-Python: >=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/doc/requirements.txt new/osc-lib-2.2.1/doc/requirements.txt --- old/osc-lib-2.0.0/doc/requirements.txt 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/doc/requirements.txt 2020-09-08 14:29:08.000000000 +0200 @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -openstackdocstheme>=1.18.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/doc/source/conf.py new/osc-lib-2.2.1/doc/source/conf.py --- old/osc-lib-2.0.0/doc/source/conf.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/doc/source/conf.py 2020-09-08 14:29:08.000000000 +0200 @@ -15,9 +15,6 @@ import os import sys -import openstackdocstheme -import pbr.version - # NOTE(blk-u): Path for our Sphinx extension, remove when # https://launchpad.net/bugs/1260495 is fixed. sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) @@ -37,10 +34,9 @@ ] # openstackdocstheme options -repository_name = 'openstack/osc-lib' -bug_project = 'python-openstackclient' -bug_tag = 'osc-lib' -html_last_updated_fmt = '%Y-%m-%d %H:%M' +openstackdocs_repo_name = 'openstack/osc-lib' +openstackdocs_auto_name = False +openstackdocs_use_storyboard = True # Add any paths that contain templates here, relative to this directory. #templates_path = ['_templates'] @@ -57,17 +53,6 @@ # General information about the project. project = u'OpenStackClient CLI Base' -# 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. -# -version_info = pbr.version.VersionInfo('osc-lib') -# -# The short X.Y version. -version = version_info.version_string() -# The full version, including alpha/beta/rc tags. -release = version_info.release_string() - # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None @@ -98,7 +83,7 @@ #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['osc_lib.'] @@ -117,10 +102,6 @@ # documentation. #html_theme_options = {} -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] -html_theme_path = [openstackdocstheme.get_html_theme_path()] - # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". #html_title = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/lower-constraints.txt new/osc-lib-2.2.1/lower-constraints.txt --- old/osc-lib-2.0.0/lower-constraints.txt 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/lower-constraints.txt 2020-09-08 14:29:08.000000000 +0200 @@ -1,10 +1,9 @@ alabaster==0.7.10 amqp==2.1.1 appdirs==1.3.0 -Babel==2.3.4 bandit==1.4.0 cachetools==2.0.0 -cliff==2.8.0 +cliff==3.2.0 cmd2==0.8.0 contextlib2==0.4.0 coverage==4.0 @@ -19,6 +18,7 @@ fasteners==0.7.0 fixtures==3.0.0 flake8==2.2.4 +flake8-import-order==0.17.1 future==0.16.0 futurist==1.2.0 gitdb==0.6.4 @@ -31,19 +31,17 @@ jmespath==0.9.0 jsonpatch==1.16 jsonpointer==1.13 -keystoneauth1==3.7.0 +keystoneauth1==3.14.0 kombu==4.0.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 monotonic==0.6 mox3==0.20.0 msgpack-python==0.4.0 munch==2.1.0 netaddr==0.7.18 netifaces==0.10.4 -openstackdocstheme==1.18.1 openstacksdk==0.15.0 os-service-types==1.2.0 os-testr==1.0.0 @@ -76,7 +74,6 @@ python-subunit==1.0.0 pytz==2013.6 PyYAML==3.12 -reno==2.5.0 repoze.lru==0.7 requests==2.14.2 requests-mock==1.1.0 @@ -84,11 +81,8 @@ rfc3986==0.3.1 Routes==2.3.1 simplejson==3.5.1 -six==1.10.0 smmap==0.9.0 snowballstemmer==1.2.1 -Sphinx==1.6.2 -sphinxcontrib-websupport==1.0.1 statsd==3.2.1 stestr==1.0.0 stevedore==1.20.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/api/api.py new/osc-lib-2.2.1/osc_lib/api/api.py --- old/osc-lib-2.0.0/osc_lib/api/api.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/api/api.py 2020-09-08 14:29:08.000000000 +0200 @@ -13,11 +13,9 @@ """Base API Library""" -import simplejson as json -import six - from keystoneauth1 import exceptions as ksa_exceptions from keystoneauth1 import session as ksa_session +import simplejson as json from osc_lib import exceptions from osc_lib.i18n import _ @@ -91,7 +89,7 @@ :return: The modified endpoint """ - if isinstance(endpoint, six.string_types): + if isinstance(endpoint, str): return endpoint.rstrip('/') else: return endpoint diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/cli/client_config.py new/osc-lib-2.2.1/osc_lib/cli/client_config.py --- old/osc-lib-2.0.0/osc_lib/cli/client_config.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/cli/client_config.py 2020-09-08 14:29:08.000000000 +0200 @@ -17,9 +17,7 @@ from openstack.config import exceptions as sdk_exceptions from openstack.config import loader as config - from oslo_utils import strutils -import six LOG = logging.getLogger(__name__) @@ -76,7 +74,7 @@ return config def _auth_v2_ignore_v3(self, config): - """Remove v3 arguemnts if present for v2 plugin + """Remove v3 arguments if present for v2 plugin Migrated from clientmanager.setup_auth() """ @@ -159,7 +157,7 @@ if LOG.isEnabledFor(logging.DEBUG): LOG.debug("auth_config_hook(): %s", - strutils.mask_password(six.text_type(config))) + strutils.mask_password(str(config))) return config def _validate_auth(self, config, loader, fixed_argparse=None): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/cli/format_columns.py new/osc-lib-2.2.1/osc_lib/cli/format_columns.py --- old/osc-lib-2.0.0/osc_lib/cli/format_columns.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/cli/format_columns.py 2020-09-08 14:29:08.000000000 +0200 @@ -16,6 +16,7 @@ """Formattable column for specify content type""" from cliff import columns + from osc_lib import utils diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/clientmanager.py new/osc-lib-2.2.1/osc_lib/clientmanager.py --- old/osc-lib-2.0.0/osc_lib/clientmanager.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/clientmanager.py 2020-09-08 14:29:08.000000000 +0200 @@ -17,12 +17,10 @@ import copy import logging -import sys from openstack.config import loader as config # noqa from openstack import connection from oslo_utils import strutils -import six from osc_lib.api import auth from osc_lib import exceptions @@ -48,8 +46,7 @@ except AttributeError as err: # Make sure the failure propagates. Otherwise, the plugin just # quietly isn't there. - new_err = exceptions.PluginAttributeError(err) - six.reraise(new_err.__class__, new_err, sys.exc_info()[2]) + raise exceptions.PluginAttributeError(err) from err return self._handle diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/command/command.py new/osc-lib-2.2.1/osc_lib/command/command.py --- old/osc-lib-2.0.0/osc_lib/command/command.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/command/command.py 2020-09-08 14:29:08.000000000 +0200 @@ -18,7 +18,6 @@ from cliff import command from cliff import lister from cliff import show -import six from osc_lib import exceptions from osc_lib.i18n import _ @@ -33,8 +32,7 @@ return super(CommandMeta, mcs).__new__(mcs, name, bases, cls_dict) [email protected]_metaclass(CommandMeta) -class Command(command.Command): +class Command(command.Command, metaclass=CommandMeta): def run(self, parsed_args): self.log.debug('run(%s)', parsed_args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/command/commandmanager.py new/osc-lib-2.2.1/osc_lib/command/commandmanager.py --- old/osc-lib-2.0.0/osc_lib/command/commandmanager.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/command/commandmanager.py 2020-09-08 14:29:08.000000000 +0200 @@ -13,47 +13,9 @@ # under the License. # -"""Modify cliff.CommandManager""" - -import pkg_resources - import cliff.commandmanager class CommandManager(cliff.commandmanager.CommandManager): - """Add additional functionality to cliff.CommandManager - - Load additional command groups after initialization - Add _command_group() methods - """ - - def __init__(self, namespace, convert_underscores=True): - self.group_list = [] - super(CommandManager, self).__init__(namespace, convert_underscores) - - def load_commands(self, namespace): - self.group_list.append(namespace) - return super(CommandManager, self).load_commands(namespace) - - def add_command_group(self, group=None): - """Adds another group of command entrypoints""" - if group: - self.load_commands(group) - - def get_command_groups(self): - """Returns a list of the loaded command groups""" - return self.group_list - - def get_command_names(self, group=None): - """Returns a list of commands loaded for the specified group""" - group_list = [] - if group is not None: - for ep in pkg_resources.iter_entry_points(group): - cmd_name = ( - ep.name.replace('_', ' ') - if self.convert_underscores - else ep.name - ) - group_list.append(cmd_name) - return group_list - return list(self.commands.keys()) + """Noop subclass for transition purposes.""" + pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/shell.py new/osc-lib-2.2.1/osc_lib/shell.py --- old/osc-lib-2.0.0/osc_lib/shell.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/shell.py 2020-09-08 14:29:08.000000000 +0200 @@ -17,22 +17,20 @@ """Command-line interface to the OpenStack APIs""" import getpass -import locale import logging import sys import traceback from cliff import app from cliff import command +from cliff import commandmanager from cliff import complete from cliff import help from oslo_utils import importutils from oslo_utils import strutils -import six from osc_lib.cli import client_config as cloud_config from osc_lib import clientmanager -from osc_lib.command import commandmanager from osc_lib.command import timing from osc_lib import exceptions as exc from osc_lib.i18n import _ @@ -490,7 +488,8 @@ # let the command decide whether we need a scoped token self.client_manager.validate_scope() # Trigger the Identity client to initialize - self.client_manager.auth_ref + self.client_manager.session.auth.auth_ref = \ + self.client_manager.auth_ref return def clean_up(self, cmd, result, err): @@ -522,12 +521,6 @@ def main(argv=None): if argv is None: argv = sys.argv[1:] - if six.PY2: - # Emulate Py3, decode argv into Unicode based on locale so that - # commands always see arguments as text instead of binary data - encoding = locale.getpreferredencoding() - if encoding: - argv = map(lambda arg: arg.decode(encoding), argv) return OpenStackShell().run(argv) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/cli/test_identity.py new/osc-lib-2.2.1/osc_lib/tests/cli/test_identity.py --- old/osc-lib-2.0.0/osc_lib/tests/cli/test_identity.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/cli/test_identity.py 2020-09-08 14:29:08.000000000 +0200 @@ -11,8 +11,8 @@ # under the License. import argparse +from unittest import mock -import mock from openstack import exceptions from openstack.identity.v3 import project import testtools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/cli/test_parseractions.py new/osc-lib-2.2.1/osc_lib/tests/cli/test_parseractions.py --- old/osc-lib-2.0.0/osc_lib/tests/cli/test_parseractions.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/cli/test_parseractions.py 2020-09-08 14:29:08.000000000 +0200 @@ -136,7 +136,7 @@ {'req1': 'aaa', 'req2': 'bbb'}, {'req1': '', 'req2': ''}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) def test_empty_required_optional(self): self.parser.add_argument( @@ -160,7 +160,7 @@ {'req1': 'aaa', 'req2': 'bbb'}, {'req1': '', 'req2': ''}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) def test_error_values_with_comma(self): data_list = [ @@ -254,7 +254,7 @@ expect = [ {'req1': 'aaa,bbb'}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) results = self.parser.parse_args([ '--test', 'req1=', @@ -263,7 +263,7 @@ expect = [ {'req1': ''}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) results = self.parser.parse_args([ '--test', 'req1=aaa,bbb', @@ -274,7 +274,7 @@ {'req1': 'aaa,bbb'}, {'req1': ''}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) def test_mkvca_optional(self): results = self.parser.parse_args([ @@ -284,7 +284,7 @@ expect = [ {'req1': 'aaa,bbb'}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) results = self.parser.parse_args([ '--test', 'req1=aaa,bbb', @@ -295,7 +295,7 @@ {'req1': 'aaa,bbb'}, {'req1': '', 'opt2': 'ccc'}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) try: results = self.parser.parse_args([ @@ -318,7 +318,7 @@ 'req1': 'aaa,bbb', 'opt2': 'ccc', }] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) def test_mkvca_no_required_optional(self): self.parser.add_argument( @@ -339,7 +339,7 @@ expect = [ {'req1': 'aaa,bbb'}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) results = self.parser.parse_args([ '--test-empty', 'xyz=aaa,bbb', @@ -349,7 +349,7 @@ expect = [ {'xyz': 'aaa,bbb'}, ] - self.assertItemsEqual(expect, actual) + self.assertCountEqual(expect, actual) def test_mkvca_invalid_key(self): try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/command/test_command.py new/osc-lib-2.2.1/osc_lib/tests/command/test_command.py --- old/osc-lib-2.0.0/osc_lib/tests/command/test_command.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/command/test_command.py 2020-09-08 14:29:08.000000000 +0200 @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock from osc_lib.command import command from osc_lib import exceptions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/command/test_commandmanager.py new/osc-lib-2.2.1/osc_lib/tests/command/test_commandmanager.py --- old/osc-lib-2.0.0/osc_lib/tests/command/test_commandmanager.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/command/test_commandmanager.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,107 +0,0 @@ -# Copyright 2012-2013 OpenStack Foundation -# -# 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. -# - -import mock - -from osc_lib.command import commandmanager -from osc_lib.tests import utils - - -class FakeCommand(object): - - @classmethod - def load(cls): - return cls - - def __init__(self): - return - -FAKE_CMD_ONE = FakeCommand -FAKE_CMD_TWO = FakeCommand -FAKE_CMD_ALPHA = FakeCommand -FAKE_CMD_BETA = FakeCommand - - -class FakeCommandManager(commandmanager.CommandManager): - commands = {} - - def load_commands(self, namespace): - if namespace == 'test': - self.commands['one'] = FAKE_CMD_ONE - self.commands['two'] = FAKE_CMD_TWO - self.group_list.append(namespace) - elif namespace == 'greek': - self.commands['alpha'] = FAKE_CMD_ALPHA - self.commands['beta'] = FAKE_CMD_BETA - self.group_list.append(namespace) - - -class TestCommandManager(utils.TestCase): - - def test_add_command_group(self): - mgr = FakeCommandManager('test') - - # Make sure add_command() still functions - mock_cmd_one = mock.Mock() - mgr.add_command('mock', mock_cmd_one) - cmd_mock, name, args = mgr.find_command(['mock']) - self.assertEqual(mock_cmd_one, cmd_mock) - - # Find a command added in initialization - cmd_one, name, args = mgr.find_command(['one']) - self.assertEqual(FAKE_CMD_ONE, cmd_one) - - # Load another command group - mgr.add_command_group('greek') - - # Find a new command - cmd_alpha, name, args = mgr.find_command(['alpha']) - self.assertEqual(FAKE_CMD_ALPHA, cmd_alpha) - - # Ensure that the original commands were not overwritten - cmd_two, name, args = mgr.find_command(['two']) - self.assertEqual(FAKE_CMD_TWO, cmd_two) - - def test_get_command_groups(self): - mgr = FakeCommandManager('test') - - # Make sure add_command() still functions - mock_cmd_one = mock.Mock() - mgr.add_command('mock', mock_cmd_one) - cmd_mock, name, args = mgr.find_command(['mock']) - self.assertEqual(mock_cmd_one, cmd_mock) - - # Load another command group - mgr.add_command_group('greek') - - gl = mgr.get_command_groups() - self.assertEqual(['test', 'greek'], gl) - - def test_get_command_names(self): - mock_cmd_one = mock.Mock() - mock_cmd_one.name = 'one' - mock_cmd_two = mock.Mock() - mock_cmd_two.name = 'cmd two' - mock_pkg_resources = mock.Mock( - return_value=[mock_cmd_one, mock_cmd_two], - ) - with mock.patch( - 'pkg_resources.iter_entry_points', - mock_pkg_resources, - ) as iter_entry_points: - mgr = commandmanager.CommandManager('test') - iter_entry_points.assert_called_once_with('test') - cmds = mgr.get_command_names('test') - self.assertEqual(['one', 'cmd two'], cmds) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/fakes.py new/osc-lib-2.2.1/osc_lib/tests/fakes.py --- old/osc-lib-2.0.0/osc_lib/tests/fakes.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/fakes.py 2020-09-08 14:29:08.000000000 +0200 @@ -13,9 +13,8 @@ # under the License. # -import mock -import six import sys +from unittest import mock from keystoneauth1 import fixture @@ -178,7 +177,7 @@ self._loaded = loaded def _add_details(self, info): - for (k, v) in six.iteritems(info): + for (k, v) in info.items(): setattr(self, k, v) def _add_methods(self, methods): @@ -189,7 +188,7 @@ @value. When users access the attribute with (), @value will be returned, which looks like a function call. """ - for (name, ret) in six.iteritems(methods): + for (name, ret) in methods.items(): method = mock.MagicMock(return_value=ret) setattr(self, name, method) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/test_clientmanager.py new/osc-lib-2.2.1/osc_lib/tests/test_clientmanager.py --- old/osc-lib-2.0.0/osc_lib/tests/test_clientmanager.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/test_clientmanager.py 2020-09-08 14:29:08.000000000 +0200 @@ -14,7 +14,7 @@ # import copy -import mock +from unittest import mock from keystoneauth1.access import service_catalog from keystoneauth1 import exceptions as ksa_exceptions @@ -23,7 +23,6 @@ from keystoneauth1 import loading from keystoneauth1 import noauth from keystoneauth1 import token_endpoint - from openstack.config import cloud_config from openstack.config import defaults from openstack import connection diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/test_logs.py new/osc-lib-2.2.1/osc_lib/tests/test_logs.py --- old/osc-lib-2.0.0/osc_lib/tests/test_logs.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/test_logs.py 2020-09-08 14:29:08.000000000 +0200 @@ -12,7 +12,7 @@ # import logging -import mock +from unittest import mock from osc_lib import logs from osc_lib.tests import utils diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/test_shell.py new/osc-lib-2.2.1/osc_lib/tests/test_shell.py --- old/osc-lib-2.0.0/osc_lib/tests/test_shell.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/test_shell.py 2020-09-08 14:29:08.000000000 +0200 @@ -14,15 +14,15 @@ # import copy -import mock import os import sys +from unittest import mock + import testtools from osc_lib import shell from osc_lib.tests import utils -from openstack.config import loader as config # noqa DEFAULT_AUTH_URL = "http://127.0.0.1:5000/v2.0/" DEFAULT_PROJECT_ID = "xxxx-yyyy-zzzz" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/utils/__init__.py new/osc-lib-2.2.1/osc_lib/tests/utils/__init__.py --- old/osc-lib-2.0.0/osc_lib/tests/utils/__init__.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/utils/__init__.py 2020-09-08 14:29:08.000000000 +0200 @@ -17,19 +17,16 @@ import contextlib import copy import json as jsonutils -import mock import os +from unittest import mock from cliff import columns as cliff_columns import fixtures from keystoneauth1 import loading - from openstack.config import cloud_region from openstack.config import defaults - from oslo_utils import importutils from requests_mock.contrib import fixture -import six import testtools from osc_lib import clientmanager @@ -123,11 +120,7 @@ with super(TestCase, self).subTest(*args, **kwargs): yield except TypeError: - # NOTE(elhararb): subTest is supported by unittest only from PY3.4 - if six.PY2: - yield - else: - raise + raise except AttributeError: # TODO(elhararb): remove this except clause when subTest is # enabled in testtools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/utils/test_tags.py new/osc-lib-2.2.1/osc_lib/tests/utils/test_tags.py --- old/osc-lib-2.0.0/osc_lib/tests/utils/test_tags.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/utils/test_tags.py 2020-09-08 14:29:08.000000000 +0200 @@ -13,7 +13,7 @@ # under the License. import argparse -import mock +from unittest import mock from osc_lib.tests import utils as test_utils from osc_lib.utils import tags @@ -37,19 +37,19 @@ actual = getattr(parsed_args, 'tags', []) expected = ['tag1', 'tag2'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) actual = getattr(parsed_args, 'any_tags', []) expected = ['tag4'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) actual = getattr(parsed_args, 'not_tags', []) expected = ['tag5'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) actual = getattr(parsed_args, 'not_any_tags', []) expected = ['tag6'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) def test_get_tag_filtering_args(self): parser = argparse.ArgumentParser() @@ -76,12 +76,12 @@ parsed_args = parser.parse_args(['--tag', 'tag1']) actual = getattr(parsed_args, 'tags', []) expected = ['tag1'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) parsed_args = parser.parse_args(['--no-tag']) actual = getattr(parsed_args, 'no-tag', []) expected = [] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) def test_add_tag_option_to_parser_for_set(self): parser = argparse.ArgumentParser() @@ -90,12 +90,12 @@ parsed_args = parser.parse_args(['--tag', 'tag1']) actual = getattr(parsed_args, 'tags', []) expected = ['tag1'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) parsed_args = parser.parse_args(['--no-tag']) actual = getattr(parsed_args, 'no-tag', []) expected = [] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) def test_add_tag_option_to_parser_for_unset(self): parser = argparse.ArgumentParser() @@ -108,12 +108,12 @@ parsed_args = parser.parse_args(['--tag', 'tag1']) actual = getattr(parsed_args, 'tags', []) expected = ['tag1'] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) parsed_args = parser.parse_args(['--all-tag']) actual = getattr(parsed_args, 'all-tag', []) expected = [] - self.assertItemsEqual(expected, actual) + self.assertCountEqual(expected, actual) def test_update_tags_for_set(self): mock_client = mock.MagicMock() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/tests/utils/test_utils.py new/osc-lib-2.2.1/osc_lib/tests/utils/test_utils.py --- old/osc-lib-2.0.0/osc_lib/tests/utils/test_utils.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/tests/utils/test_utils.py 2020-09-08 14:29:08.000000000 +0200 @@ -13,12 +13,11 @@ # under the License. # -import six import time +from unittest import mock import uuid from cliff import columns as cliff_columns -import mock from osc_lib.cli import format_columns from osc_lib import exceptions @@ -206,11 +205,7 @@ item4 = {'a': 1} items = [item1, item2, item3, item4] sort_str = 'a' - expect_items = [item3, item4, item1, item2] - if six.PY2: - self.assertEqual(expect_items, utils.sort_items(items, sort_str)) - else: - self.assertRaises(TypeError, utils.sort_items, items, sort_str) + self.assertRaises(TypeError, utils.sort_items, items, sort_str) def test_sort_items_with_different_type_int(self): item1 = {'a': 2} @@ -848,3 +843,48 @@ format_columns.ListColumn(['x', 'y', 'z'])] ] self.assertListItemEqual(expected, actual) + + +class TestSDKUtils(test_utils.TestCase): + + def setUp(self): + super(TestSDKUtils, self).setUp() + + def _test_get_osc_show_columns_for_sdk_resource( + self, sdk_resource, column_map, + expected_display_columns, expected_attr_columns): + display_columns, attr_columns = \ + utils.get_osc_show_columns_for_sdk_resource( + sdk_resource, column_map) + self.assertEqual(expected_display_columns, display_columns) + self.assertEqual(expected_attr_columns, attr_columns) + + def test_get_osc_show_columns_for_sdk_resource_empty(self): + self._test_get_osc_show_columns_for_sdk_resource( + {}, {}, tuple(), tuple()) + + def test_get_osc_show_columns_for_sdk_resource_empty_map(self): + self._test_get_osc_show_columns_for_sdk_resource( + {'foo': 'foo1'}, {}, + ('foo',), ('foo',)) + + def test_get_osc_show_columns_for_sdk_resource_empty_data(self): + self._test_get_osc_show_columns_for_sdk_resource( + {}, {'foo': 'foo_map'}, + ('foo_map',), ('foo_map',)) + + def test_get_osc_show_columns_for_sdk_resource_map(self): + self._test_get_osc_show_columns_for_sdk_resource( + {'foo': 'foo1'}, {'foo': 'foo_map'}, + ('foo_map',), ('foo',)) + + def test_get_osc_show_columns_for_sdk_resource_map_dup(self): + self._test_get_osc_show_columns_for_sdk_resource( + {'foo': 'foo1', 'foo_map': 'foo1'}, {'foo': 'foo_map'}, + ('foo_map',), ('foo',)) + + def test_get_osc_show_columns_for_sdk_resource_map_full(self): + self._test_get_osc_show_columns_for_sdk_resource( + {'foo': 'foo1', 'bar': 'bar1'}, + {'foo': 'foo_map', 'new': 'bar'}, + ('bar', 'foo_map'), ('bar', 'foo')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib/utils/__init__.py new/osc-lib-2.2.1/osc_lib/utils/__init__.py --- old/osc-lib-2.0.0/osc_lib/utils/__init__.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib/utils/__init__.py 2020-09-08 14:29:08.000000000 +0200 @@ -19,7 +19,6 @@ import getpass import logging import os -import six import time import warnings @@ -51,7 +50,7 @@ # volume v1, convert it to a list in order to change # the column name. column_headers = list(column_headers) - for old_col, new_col in six.iteritems(column_map): + for old_col, new_col in column_map.items(): if old_col in columns: LOG.warning(_('The column "%(old_column)s" was deprecated, ' 'please use "%(new_column)s" replace.') % { @@ -79,7 +78,7 @@ return show_object show_object = copy.deepcopy(show_object) - for old_col, new_col in six.iteritems(column_map): + for old_col, new_col in column_map.items(): if old_col in columns: LOG.warning(_('The column "%(old_column)s" was deprecated, ' 'please use "%(new_column)s" replace.') % { @@ -261,16 +260,6 @@ 'resource': manager.resource_class.__name__.lower(), 'id': name_or_id, }) - - if type(ex).__name__ == 'Forbidden': - msg = _( - "You are not authorized to find %(resource)s with the " - "name '%(id)s'." - ) - raise exceptions.CommandError(msg % { - 'resource': manager.resource_class.__name__.lower(), - 'id': name_or_id, - }) else: pass @@ -316,7 +305,7 @@ # is completely handled in the terminal case. output = output + format_dict(data[s], prefix=key_str) + ", " elif data[s] is not None: - output = output + key_str + "='" + six.text_type(data[s]) + "', " + output = output + key_str + "='" + str(data[s]) + "', " else: output = output + key_str + "=, " return output[:-2] @@ -714,3 +703,50 @@ callback(progress) time.sleep(sleep_time) return retval + + +def get_osc_show_columns_for_sdk_resource( + sdk_resource, + osc_column_map, + invisible_columns=None +): + """Get and filter the display and attribute columns for an SDK resource. + + Common utility function for preparing the output of an OSC show command. + Some of the columns may need to get renamed, others made invisible. + + :param sdk_resource: An SDK resource + :param osc_column_map: A hash of mappings for display column names + :param invisible_columns: A list of invisible column names + + :returns: Two tuples containing the names of the display and attribute + columns + """ + + if getattr(sdk_resource, 'allow_get', None) is not None: + resource_dict = sdk_resource.to_dict( + body=True, headers=False, ignore_none=False) + else: + resource_dict = sdk_resource + + # Build the OSC column names to display for the SDK resource. + attr_map = {} + display_columns = list(resource_dict.keys()) + invisible_columns = [] if invisible_columns is None else invisible_columns + for col_name in invisible_columns: + if col_name in display_columns: + display_columns.remove(col_name) + for sdk_attr, osc_attr in osc_column_map.items(): + if sdk_attr in display_columns: + attr_map[osc_attr] = sdk_attr + display_columns.remove(sdk_attr) + if osc_attr not in display_columns: + display_columns.append(osc_attr) + sorted_display_columns = sorted(display_columns) + + # Build the SDK attribute names for the OSC column names. + attr_columns = [] + for column in sorted_display_columns: + new_column = attr_map[column] if column in attr_map else column + attr_columns.append(new_column) + return tuple(sorted_display_columns), tuple(attr_columns) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib.egg-info/PKG-INFO new/osc-lib-2.2.1/osc_lib.egg-info/PKG-INFO --- old/osc-lib-2.0.0/osc_lib.egg-info/PKG-INFO 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib.egg-info/PKG-INFO 2020-09-08 14:29:53.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: osc-lib -Version: 2.0.0 +Version: 2.2.1 Summary: OpenStackClient Library Home-page: https://docs.openstack.org/osc-lib/latest/ Author: OpenStack @@ -78,6 +78,9 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Requires-Python: >=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib.egg-info/SOURCES.txt new/osc-lib-2.2.1/osc_lib.egg-info/SOURCES.txt --- old/osc-lib-2.0.0/osc_lib.egg-info/SOURCES.txt 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib.egg-info/SOURCES.txt 2020-09-08 14:29:53.000000000 +0200 @@ -1,7 +1,6 @@ .coveragerc .mailmap .stestr.conf -.testr.conf .zuul.yaml AUTHORS ChangeLog @@ -68,7 +67,6 @@ osc_lib/tests/cli/test_parseractions.py osc_lib/tests/command/__init__.py osc_lib/tests/command/test_command.py -osc_lib/tests/command/test_commandmanager.py osc_lib/tests/command/test_timing.py osc_lib/tests/utils/__init__.py osc_lib/tests/utils/test_columns.py @@ -81,6 +79,7 @@ releasenotes/notes/1.0-summary-47dcce446d6a512b.yaml releasenotes/notes/add-KeyValueAppendAction-class-f830e71152d6b91e.yaml releasenotes/notes/add-MultiKeyValueCommaAction-class-01dd254a287d70d2.yaml +releasenotes/notes/add_sdk_utils-d0c338eba682f2c8.yaml releasenotes/notes/arg-precedence-1ba9fd6929650830.yaml releasenotes/notes/auth-type-none-d96760912605f822.yaml releasenotes/notes/bug-1558690-1528b637f2c0a449.yaml @@ -93,6 +92,9 @@ releasenotes/notes/keystone-to-keystone-9b2e55b051775322.yaml releasenotes/notes/none-auth-cli-48ab0e48d4852941.yaml releasenotes/notes/os-profile-as-environment-variable-a5e232e9ca7c5171.yaml +releasenotes/notes/remove-babel-50abc5b548455bb2.yaml +releasenotes/notes/remove-group-subclass-82134e6915c7c782.yaml +releasenotes/notes/save-results-4473cb5731c0c763.yaml releasenotes/notes/shell-argv-decode-cdc13dc0c4ec07af.yaml releasenotes/source/conf.py releasenotes/source/index.rst @@ -104,5 +106,6 @@ releasenotes/source/stein.rst releasenotes/source/train.rst releasenotes/source/unreleased.rst +releasenotes/source/ussuri.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib.egg-info/pbr.json new/osc-lib-2.2.1/osc_lib.egg-info/pbr.json --- old/osc-lib-2.0.0/osc_lib.egg-info/pbr.json 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib.egg-info/pbr.json 2020-09-08 14:29:53.000000000 +0200 @@ -1 +1 @@ -{"git_version": "fea31fb", "is_release": true} \ No newline at end of file +{"git_version": "d55bc86", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/osc_lib.egg-info/requires.txt new/osc-lib-2.2.1/osc_lib.egg-info/requires.txt --- old/osc-lib-2.0.0/osc_lib.egg-info/requires.txt 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/osc_lib.egg-info/requires.txt 2020-09-08 14:29:53.000000000 +0200 @@ -1,10 +1,8 @@ -pbr!=2.1.0,>=2.0.0 -six>=1.10.0 -Babel!=2.4.0,>=2.3.4 -cliff!=2.9.0,>=2.8.0 -keystoneauth1>=3.7.0 +cliff>=3.2.0 +keystoneauth1>=3.14.0 openstacksdk>=0.15.0 oslo.i18n>=3.15.3 oslo.utils>=3.33.0 +pbr!=2.1.0,>=2.0.0 simplejson>=3.5.1 stevedore>=1.20.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/notes/add_sdk_utils-d0c338eba682f2c8.yaml new/osc-lib-2.2.1/releasenotes/notes/add_sdk_utils-d0c338eba682f2c8.yaml --- old/osc-lib-2.0.0/releasenotes/notes/add_sdk_utils-d0c338eba682f2c8.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/notes/add_sdk_utils-d0c338eba682f2c8.yaml 2020-09-08 14:29:08.000000000 +0200 @@ -0,0 +1,5 @@ +--- +features: + - | + Integrate get_osc_show_columns_for_sdk_resource function to ease showing + SDK resources. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/notes/remove-babel-50abc5b548455bb2.yaml new/osc-lib-2.2.1/releasenotes/notes/remove-babel-50abc5b548455bb2.yaml --- old/osc-lib-2.0.0/releasenotes/notes/remove-babel-50abc5b548455bb2.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/notes/remove-babel-50abc5b548455bb2.yaml 2020-09-08 14:29:08.000000000 +0200 @@ -0,0 +1,4 @@ +--- +other: + - | + Removed ``Babel`` from requirements as it is not a runtime requirement. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/notes/remove-group-subclass-82134e6915c7c782.yaml new/osc-lib-2.2.1/releasenotes/notes/remove-group-subclass-82134e6915c7c782.yaml --- old/osc-lib-2.0.0/releasenotes/notes/remove-group-subclass-82134e6915c7c782.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/notes/remove-group-subclass-82134e6915c7c782.yaml 2020-09-08 14:29:08.000000000 +0200 @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The ``osc_lib.command.commandmanager.CommandManager`` class is a + direct subclass of ``cliff.commandmanager.CommandManager``. The extra + osc_lib functionality has been shifted upstream into cliff. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/notes/save-results-4473cb5731c0c763.yaml new/osc-lib-2.2.1/releasenotes/notes/save-results-4473cb5731c0c763.yaml --- old/osc-lib-2.0.0/releasenotes/notes/save-results-4473cb5731c0c763.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/notes/save-results-4473cb5731c0c763.yaml 2020-09-08 14:29:08.000000000 +0200 @@ -0,0 +1,5 @@ +--- +fixes: + - | + Save the results from the early authentication so + double authentication can be avoided. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/source/conf.py new/osc-lib-2.2.1/releasenotes/source/conf.py --- old/osc-lib-2.0.0/releasenotes/source/conf.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/source/conf.py 2020-09-08 14:29:08.000000000 +0200 @@ -27,8 +27,6 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -import openstackdocstheme - # sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ @@ -43,6 +41,7 @@ extensions = [ 'reno.sphinxext', 'sphinx.ext.extlinks', + 'openstackdocstheme', ] # Set aliases for extlinks @@ -84,6 +83,11 @@ project = u'osc-lib Release Notes' copyright = u'2016, osc-lib Developers' +# openstackdocstheme options +openstackdocs_repo_name = 'openstack/osc-lib' +openstackdocs_auto_name = False +openstackdocs_use_storyboard = True + # Release notes do not need a version in the title, they span # multiple versions. # The full version, including alpha/beta/rc tags. @@ -132,7 +136,7 @@ # show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] @@ -152,10 +156,6 @@ # # html_theme_options = {} -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] -html_theme_path = [openstackdocstheme.get_html_theme_path()] - # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". # html_title = None @@ -186,12 +186,6 @@ # # html_extra_path = [] -# If not None, a 'Last updated on:' timestamp is inserted at every page -# bottom, using the given strftime format. -# The empty string is equivalent to '%b %d, %Y'. -# -# html_last_updated_fmt = '%b %d, %Y' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/source/index.rst new/osc-lib-2.2.1/releasenotes/source/index.rst --- old/osc-lib-2.0.0/releasenotes/source/index.rst 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/source/index.rst 2020-09-08 14:29:08.000000000 +0200 @@ -6,6 +6,7 @@ :maxdepth: 1 unreleased + ussuri train stein rocky diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/releasenotes/source/ussuri.rst new/osc-lib-2.2.1/releasenotes/source/ussuri.rst --- old/osc-lib-2.0.0/releasenotes/source/ussuri.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-lib-2.2.1/releasenotes/source/ussuri.rst 2020-09-08 14:29:08.000000000 +0200 @@ -0,0 +1,6 @@ +=========================== +Ussuri Series Release Notes +=========================== + +.. release-notes:: + :branch: stable/ussuri diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/requirements.txt new/osc-lib-2.2.1/requirements.txt --- old/osc-lib-2.0.0/requirements.txt 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/requirements.txt 2020-09-08 14:29:08.000000000 +0200 @@ -2,11 +2,9 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. pbr!=2.1.0,>=2.0.0 # Apache-2.0 -six>=1.10.0 # MIT -Babel!=2.4.0,>=2.3.4 # BSD -cliff!=2.9.0,>=2.8.0 # Apache-2.0 -keystoneauth1>=3.7.0 # Apache-2.0 +cliff>=3.2.0 # Apache-2.0 +keystoneauth1>=3.14.0 # Apache-2.0 openstacksdk>=0.15.0 # Apache-2.0 oslo.i18n>=3.15.3 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/setup.cfg new/osc-lib-2.2.1/setup.cfg --- old/osc-lib-2.0.0/setup.cfg 2020-01-14 17:56:40.000000000 +0100 +++ new/osc-lib-2.2.1/setup.cfg 2020-09-08 14:29:53.000000000 +0200 @@ -6,6 +6,7 @@ author = OpenStack author-email = [email protected] home-page = https://docs.openstack.org/osc-lib/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,6 +14,8 @@ License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/setup.py new/osc-lib-2.2.1/setup.py --- old/osc-lib-2.0.0/setup.py 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/setup.py 2020-09-08 14:29:08.000000000 +0200 @@ -13,17 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/test-requirements.txt new/osc-lib-2.2.1/test-requirements.txt --- old/osc-lib-2.0.0/test-requirements.txt 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/test-requirements.txt 2020-09-08 14:29:08.000000000 +0200 @@ -1,20 +1,15 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking<0.11,>=0.10.0 +hacking>=3.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD -mock>=2.0.0 # BSD oslotest>=3.2.0 # Apache-2.0 requests-mock>=1.1.0 # Apache-2.0 -sphinx!=1.6.6,>=1.6.2 # BSD os-testr>=1.0.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT osprofiler>=1.4.0 # Apache-2.0 bandit>=1.1.0 # Apache-2.0 - -# Documentation -openstackdocstheme>=1.18.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 +flake8-import-order>=0.17.1 # LGPLv3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-lib-2.0.0/tox.ini new/osc-lib-2.2.1/tox.ini --- old/osc-lib-2.0.0/tox.ini 2020-01-14 17:55:57.000000000 +0100 +++ new/osc-lib-2.2.1/tox.ini 2020-09-08 14:29:08.000000000 +0200 @@ -6,9 +6,7 @@ [testenv] basepython = python3 usedevelop = True -install_command = pip install {opts} {packages} -setenv = VIRTUAL_ENV={envdir} - OS_STDOUT_CAPTURE=1 +setenv = OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 deps = @@ -20,10 +18,10 @@ [testenv:unit-tips] commands = - pip install -q -e "git+file://{toxinidir}/../cliff#egg=cliff" - pip install -q -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth" - pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk" - pip freeze + python -m pip install -q -e "git+file://{toxinidir}/../cliff#egg=cliff" + python -m pip install -q -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth" + python -m pip install -q -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk" + python -m pip freeze stestr run {posargs} whitelist_externals = stestr @@ -60,7 +58,10 @@ exclude = .git,.tox,dist,doc,*lib/python*,*egg,build,tools # If 'ignore' is not set there are default errors and warnings that are set # Doc: http://flake8.readthedocs.org/en/latest/config.html#default -ignore = __ +ignore = W504 +import-order-style = pep8 +application-import-names = osc_lib +filename = *.py [testenv:lower-constraints] deps =
