diff -Nru python-heatclient-2.5.1/AUTHORS python-heatclient-3.1.0/AUTHORS --- python-heatclient-2.5.1/AUTHORS 2022-02-25 14:04:56.000000000 +0000 +++ python-heatclient-3.1.0/AUTHORS 2022-09-02 09:33:58.000000000 +0000 @@ -161,6 +161,7 @@ jacky06 ji-xuepeng kairat_kushaev +likui lingyongxu liu-sheng liuqing diff -Nru python-heatclient-2.5.1/ChangeLog python-heatclient-3.1.0/ChangeLog --- python-heatclient-2.5.1/ChangeLog 2022-02-25 14:04:56.000000000 +0000 +++ python-heatclient-3.1.0/ChangeLog 2022-09-02 09:33:58.000000000 +0000 @@ -1,6 +1,22 @@ CHANGES ======= +3.1.0 +----- + +* Accept sha256 hash for swift tempurl + +3.0.0 +----- + +* Drop lower-constraints.txt and its testing +* Encode urls in unit tests +* The Python 3.6 and Python 3.7 Support has been dropped since zed +* Bump tox minversion to 3.18.0 +* Remove six +* Add Python3 zed unit tests +* Update master for stable/yoga + 2.5.1 ----- @@ -23,6 +39,7 @@ * [ussuri][goal] Update contributor documentation * Add Python3 xena unit tests * Update master for stable/wallaby +* Replace deprecated UPPER\_CONSTRAINTS\_FILE variable 2.3.0 ----- diff -Nru python-heatclient-2.5.1/debian/changelog python-heatclient-3.1.0/debian/changelog --- python-heatclient-2.5.1/debian/changelog 2022-03-02 18:01:03.000000000 +0000 +++ python-heatclient-3.1.0/debian/changelog 2022-09-08 21:51:34.000000000 +0000 @@ -1,3 +1,11 @@ +python-heatclient (3.1.0-0ubuntu1) kinetic; urgency=medium + + * New upstream release for OpenStack Zed. + * d/control: Align (Build-)Depends with upstream. + * d/control: Update standards version to 4.6.1. + + -- Corey Bryant Thu, 08 Sep 2022 17:51:34 -0400 + python-heatclient (2.5.1-0ubuntu1) jammy; urgency=medium * New upstream release for OpenStack Yoga. diff -Nru python-heatclient-2.5.1/debian/control python-heatclient-3.1.0/debian/control --- python-heatclient-2.5.1/debian/control 2022-03-02 18:01:03.000000000 +0000 +++ python-heatclient-3.1.0/debian/control 2022-09-08 21:51:34.000000000 +0000 @@ -36,7 +36,6 @@ python3-reno, python3-requests (>= 2.14.2), python3-requests-mock (>= 1.2.0), - python3-six (>= 1.10.0), python3-sphinxcontrib.httpdomain (>= 1.3.0), python3-stestr (>= 2.0.0), python3-subunit, @@ -47,10 +46,9 @@ python3-testtools (>= 2.2.0), python3-yaml (>= 3.13), subunit, -Standards-Version: 4.1.3 -Vcs-Browser: https://git.launchpad.net/~ubuntu-openstack-dev/ubuntu/+source/python-heatclient +Standards-Version: 4.6.1 Vcs-Git: https://git.launchpad.net/~ubuntu-openstack-dev/ubuntu/+source/python-heatclient -Homepage: https://github.com/openstack/python-heatclient +Homepage: https://opendev.org/openstack/python-heatclient Testsuite: autopkgtest-pkg-python Package: python3-heatclient @@ -67,7 +65,6 @@ python3-pbr (>= 2.0.0), python3-prettytable (>= 0.7.2), python3-requests (>= 2.14.2), - python3-six (>= 1.10.0), python3-swiftclient (>= 1:3.2.0), python3-yaml (>= 3.13), ${misc:Depends}, diff -Nru python-heatclient-2.5.1/heatclient/common/base.py python-heatclient-3.1.0/heatclient/common/base.py --- python-heatclient-2.5.1/heatclient/common/base.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/common/base.py 2022-09-02 09:33:20.000000000 +0000 @@ -24,8 +24,7 @@ from oslo_utils import reflection from oslo_utils import strutils -import six -from six.moves.urllib import parse +from urllib import parse from heatclient._i18n import _ from heatclient import exc as exceptions @@ -207,8 +206,7 @@ return self.client.delete(url) -@six.add_metaclass(abc.ABCMeta) -class ManagerWithFind(BaseManager): +class ManagerWithFind(BaseManager, metaclass=abc.ABCMeta): """Manager with additional `find()`/`findall()` methods.""" @abc.abstractmethod diff -Nru python-heatclient-2.5.1/heatclient/common/deployment_utils.py python-heatclient-3.1.0/heatclient/common/deployment_utils.py --- python-heatclient-2.5.1/heatclient/common/deployment_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/common/deployment_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -13,10 +13,9 @@ import copy import uuid -import six -from six.moves.urllib import parse as urlparse from swiftclient import client as sc from swiftclient import utils as swiftclient_utils +from urllib import parse as urlparse from heatclient._i18n import _ from heatclient import exc @@ -102,7 +101,7 @@ key_header = 'x-account-meta-temp-url-key' if key_header not in swift_client.head_account(): swift_client.post_account({ - key_header: six.text_type(uuid.uuid4())[:32]}) + key_header: str(uuid.uuid4())[:32]}) key = swift_client.head_account()[key_header] project_path = swift_client.url.split('/')[-1] diff -Nru python-heatclient-2.5.1/heatclient/common/format_utils.py python-heatclient-3.1.0/heatclient/common/format_utils.py --- python-heatclient-2.5.1/heatclient/common/format_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/common/format_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -15,7 +15,6 @@ import sys from osc_lib.command import command -import six class RawFormat(command.ShowOne): @@ -63,7 +62,7 @@ """ if txt is None: return - lines = six.text_type(txt).splitlines() + lines = str(txt).splitlines() if truncate and len(lines) > truncate_limit: lines = lines[-truncate_limit:] if truncate_prefix is not None: diff -Nru python-heatclient-2.5.1/heatclient/common/http.py python-heatclient-3.1.0/heatclient/common/http.py --- python-heatclient-2.5.1/heatclient/common/http.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/common/http.py 2022-09-02 09:33:20.000000000 +0000 @@ -24,8 +24,7 @@ from oslo_utils import encodeutils from oslo_utils import importutils import requests -import six -from six.moves.urllib import parse +from urllib import parse from heatclient._i18n import _ from heatclient.common import utils @@ -151,7 +150,7 @@ dump.append('') if resp.content: content = resp.content - if isinstance(content, six.binary_type): + if isinstance(content, bytes): content = content.decode() dump.extend([content, '']) LOG.debug('\n'.join(dump)) diff -Nru python-heatclient-2.5.1/heatclient/common/template_utils.py python-heatclient-3.1.0/heatclient/common/template_utils.py --- python-heatclient-2.5.1/heatclient/common/template_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/common/template_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -15,10 +15,9 @@ from collections import abc from oslo_serialization import jsonutils -import six -from six.moves.urllib import error -from six.moves.urllib import parse -from six.moves.urllib import request +from urllib import error +from urllib import parse +from urllib import request from heatclient._i18n import _ from heatclient.common import environment_format @@ -92,7 +91,7 @@ % template_url) try: - if isinstance(tpl, six.binary_type): + if isinstance(tpl, bytes): tpl = tpl.decode('utf-8') template = template_format.parse(tpl) except ValueError as e: @@ -114,7 +113,7 @@ def ignore_if(key, value): if key != 'get_file' and key != 'type': return True - if not isinstance(value, six.string_types): + if not isinstance(value, str): return True if (key == 'type' and not value.endswith(('.yaml', '.template'))): @@ -130,7 +129,7 @@ def is_template(file_content): try: - if isinstance(file_content, six.binary_type): + if isinstance(file_content, bytes): file_content = file_content.decode('utf-8') template_format.parse(file_content) except (ValueError, TypeError): @@ -144,7 +143,7 @@ if recurse_if and recurse_if(from_data): if isinstance(from_data, dict): - recurse_data = six.itervalues(from_data) + recurse_data = from_data.values() else: recurse_data = from_data for value in recurse_data: diff -Nru python-heatclient-2.5.1/heatclient/common/utils.py python-heatclient-3.1.0/heatclient/common/utils.py --- python-heatclient-2.5.1/heatclient/common/utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/common/utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -22,10 +22,9 @@ from oslo_serialization import jsonutils from oslo_utils import encodeutils import prettytable -import six -from six.moves.urllib import error -from six.moves.urllib import parse -from six.moves.urllib import request +from urllib import error +from urllib import parse +from urllib import request import yaml from heatclient._i18n import _ @@ -123,10 +122,7 @@ row.append(data) pt.add_row(row) - if six.PY3: - print(encodeutils.safe_encode(pt.get_string(**kwargs)).decode()) - else: - print(encodeutils.safe_encode(pt.get_string(**kwargs))) + print(encodeutils.safe_encode(pt.get_string(**kwargs)).decode()) def link_formatter(links): @@ -286,10 +282,7 @@ pt.add_row(row) - if six.PY3: - print(encodeutils.safe_encode(pt.get_string()).decode()) - else: - print(encodeutils.safe_encode(pt.get_string())) + print(encodeutils.safe_encode(pt.get_string()).decode()) def find_resource(manager, name_or_id): diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/build_info.py python-heatclient-3.1.0/heatclient/osc/v1/build_info.py --- python-heatclient-2.5.1/heatclient/osc/v1/build_info.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/build_info.py 2022-09-02 09:33:20.000000000 +0000 @@ -17,7 +17,6 @@ from osc_lib.command import command from osc_lib import utils -import six from heatclient.common import utils as heat_utils @@ -41,6 +40,6 @@ 'api': heat_utils.json_formatter, 'engine': heat_utils.json_formatter, } - columns = sorted(list(six.iterkeys(result))) + columns = sorted(list(result.keys())) return columns, utils.get_dict_properties(result, columns, formatters=formatters) diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/resource.py python-heatclient-3.1.0/heatclient/osc/v1/resource.py --- python-heatclient-2.5.1/heatclient/osc/v1/resource.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/resource.py 2022-09-02 09:33:20.000000000 +0000 @@ -20,8 +20,7 @@ from osc_lib.i18n import _ from osc_lib import utils from oslo_serialization import jsonutils -import six -from six.moves.urllib import request +from urllib import request from heatclient.common import format_utils from heatclient.common import utils as heat_utils @@ -184,8 +183,8 @@ {'stack': args.stack, 'resource': args.resource}) - data = list(six.itervalues(metadata)) - columns = list(six.iterkeys(metadata)) + data = list(metadata.values()) + columns = list(metadata.keys()) return columns, data diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/resource_type.py python-heatclient-3.1.0/heatclient/osc/v1/resource_type.py --- python-heatclient-2.5.1/heatclient/osc/v1/resource_type.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/resource_type.py 2022-09-02 09:33:20.000000000 +0000 @@ -18,7 +18,6 @@ from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib.i18n import _ -import six from heatclient.common import format_utils from heatclient.common import utils as heat_utils @@ -80,8 +79,8 @@ raise exc.CommandError( _('Resource type not found: %s') % parsed_args.resource_type) - rows = list(six.itervalues(data)) - columns = list(six.iterkeys(data)) + rows = list(data.values()) + columns = list(data.keys()) return columns, rows diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/snapshot.py python-heatclient-3.1.0/heatclient/osc/v1/snapshot.py --- python-heatclient-2.5.1/heatclient/osc/v1/snapshot.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/snapshot.py 2022-09-02 09:33:20.000000000 +0000 @@ -20,7 +20,6 @@ from osc_lib import exceptions as exc from osc_lib.i18n import _ from osc_lib import utils -import six from heatclient.common import format_utils from heatclient import exc as heat_exc @@ -95,8 +94,8 @@ % {'snapshot_id': snapshot_id, 'stack_id': stack_id}) - rows = list(six.itervalues(data)) - columns = list(six.iterkeys(data)) + rows = list(data.values()) + columns = list(data.keys()) return columns, rows diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/software_config.py python-heatclient-3.1.0/heatclient/osc/v1/software_config.py --- python-heatclient-2.5.1/heatclient/osc/v1/software_config.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/software_config.py 2022-09-02 09:33:20.000000000 +0000 @@ -18,8 +18,7 @@ from osc_lib.command import command from osc_lib import exceptions as exc from osc_lib import utils -import six -from six.moves.urllib import request +from urllib import request import yaml from heatclient._i18n import _ @@ -181,8 +180,8 @@ config['name'] = args.name sc = heat_client.software_configs.create(**config).to_dict() - rows = list(six.itervalues(sc)) - columns = list(six.iterkeys(sc)) + rows = list(sc.values()) + columns = list(sc.keys()) return columns, rows diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/stack.py python-heatclient-3.1.0/heatclient/osc/v1/stack.py --- python-heatclient-2.5.1/heatclient/osc/v1/stack.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/stack.py 2022-09-02 09:33:20.000000000 +0000 @@ -20,8 +20,7 @@ from osc_lib import exceptions as exc from osc_lib import utils from oslo_serialization import jsonutils -import six -from six.moves.urllib import request +from urllib import request import yaml from heatclient._i18n import _ @@ -733,7 +732,7 @@ try: if not parsed_args.yes and sys.stdin.isatty(): - prompt_response = six.moves.input( + prompt_response = input( _("Are you sure you want to delete this stack(s) [y/N]? ") ).lower() if not prompt_response.startswith('y'): @@ -919,8 +918,8 @@ except IOError as e: raise exc.CommandError(str(e)) - data = list(six.itervalues(stack)) - columns = list(six.iterkeys(stack)) + data = list(stack.values()) + columns = list(stack.keys()) return columns, data @@ -963,8 +962,8 @@ except IOError as e: raise exc.CommandError(str(e)) - data = list(six.itervalues(data_info)) - columns = list(six.iterkeys(data_info)) + data = list(data_info.values()) + columns = list(data_info.keys()) return columns, data diff -Nru python-heatclient-2.5.1/heatclient/osc/v1/template.py python-heatclient-3.1.0/heatclient/osc/v1/template.py --- python-heatclient-2.5.1/heatclient/osc/v1/template.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/osc/v1/template.py 2022-09-02 09:33:20.000000000 +0000 @@ -16,7 +16,6 @@ from osc_lib.command import command from osc_lib import utils -import six from heatclient._i18n import _ from heatclient.common import format_utils @@ -181,6 +180,6 @@ fields['files_container'] = args.files_container validation = heat_client.stacks.validate(**fields) - data = list(six.itervalues(validation)) - columns = list(six.iterkeys(validation)) + data = list(validation.values()) + columns = list(validation.keys()) return columns, data diff -Nru python-heatclient-2.5.1/heatclient/shell.py python-heatclient-3.1.0/heatclient/shell.py --- python-heatclient-2.5.1/heatclient/shell.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/shell.py 2022-09-02 09:33:20.000000000 +0000 @@ -22,7 +22,6 @@ from keystoneauth1 import session as kssession from oslo_utils import encodeutils from oslo_utils import importutils -import six import heatclient from heatclient._i18n import _ @@ -610,7 +609,7 @@ if '--debug' in args or '-d' in args: raise else: - print(encodeutils.safe_encode(six.text_type(e)), file=sys.stderr) + print(encodeutils.safe_encode(str(e)), file=sys.stderr) sys.exit(1) diff -Nru python-heatclient-2.5.1/heatclient/tests/functional/osc/v1/base.py python-heatclient-3.1.0/heatclient/tests/functional/osc/v1/base.py --- python-heatclient-2.5.1/heatclient/tests/functional/osc/v1/base.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/functional/osc/v1/base.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,7 +12,6 @@ import os -import six from tempest.lib.cli import base from tempest.lib.cli import output_parser from tempest.lib import exceptions as tempest_exc @@ -48,7 +47,7 @@ obj = {} items = self.parser.listing(output) for item in items: - obj[item['Field']] = six.text_type(item['Value']) + obj[item['Field']] = str(item['Value']) return dict((self._key_name(k), v) for k, v in obj.items()) def _key_name(self, key): @@ -86,7 +85,7 @@ self.openstack(cmd) except tempest_exc.CommandFailed as e: msg = "Stack not found: %s" % id - if msg in six.text_type(e.stdout): + if msg in str(e.stdout): return raise diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/osc/fakes.py python-heatclient-3.1.0/heatclient/tests/unit/osc/fakes.py --- python-heatclient-2.5.1/heatclient/tests/unit/osc/fakes.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/osc/fakes.py 2022-09-02 09:33:20.000000000 +0000 @@ -16,7 +16,6 @@ import json import requests -import six class FakeStdout(object): @@ -41,5 +40,5 @@ self.headers.update(headers) self._content = json.dumps(data) - if not isinstance(self._content, six.binary_type): + if not isinstance(self._content, bytes): self._content = self._content.encode() diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_resource.py python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_resource.py --- python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_resource.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_resource.py 2022-09-02 09:33:20.000000000 +0000 @@ -305,7 +305,7 @@ self.assertEqual('Should only specify one of data or data-file', str(error)) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_resource_signal_file(self, urlopen): data = mock.Mock() data.read.side_effect = ['{"message":"Content"}'] diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_snapshot.py python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_snapshot.py --- python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_snapshot.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_snapshot.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,8 +12,8 @@ from unittest import mock +import io from osc_lib import exceptions as exc -import six from heatclient import exc as heat_exc from heatclient.osc.v1 import snapshot @@ -160,7 +160,7 @@ self.cmd.take_action, parsed_args) - @mock.patch('sys.stdin', spec=six.StringIO) + @mock.patch('sys.stdin', spec=io.StringIO) def test_snapshot_delete_prompt(self, mock_stdin): arglist = ['my_stack', 'snapshot_id'] mock_stdin.isatty.return_value = True @@ -173,7 +173,7 @@ self.stack_client.snapshot_delete.assert_called_with('my_stack', 'snapshot_id') - @mock.patch('sys.stdin', spec=six.StringIO) + @mock.patch('sys.stdin', spec=io.StringIO) def test_snapshot_delete_prompt_no(self, mock_stdin): arglist = ['my_stack', 'snapshot_id'] mock_stdin.isatty.return_value = True diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_software_config.py python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_software_config.py --- python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_software_config.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_software_config.py 2022-09-02 09:33:20.000000000 +0000 @@ -145,7 +145,7 @@ self.mock_client.software_configs.create.assert_called_with( **properties) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_config_create_config_file(self, urlopen): properties = { 'config': 'config', @@ -172,7 +172,7 @@ self.mock_client.software_configs.create.assert_called_with( **properties) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_config_create_definition_file(self, urlopen): definition = { 'inputs': [ diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_stack.py python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_stack.py --- python-heatclient-2.5.1/heatclient/tests/unit/osc/v1/test_stack.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/osc/v1/test_stack.py 2022-09-02 09:33:20.000000000 +0000 @@ -17,7 +17,6 @@ from osc_lib import exceptions as exc from osc_lib import utils -import six import testscenarios import yaml @@ -274,7 +273,7 @@ ex = self.assertRaises(exc.CommandError, self.cmd.take_action, parsed_args) - self.assertEqual("--rollback invalid value: foo", six.text_type(ex)) + self.assertEqual("--rollback invalid value: foo", str(ex)) def test_stack_update_parameters(self): template_path = ('/'.join(self.template_path.split('/')[:-1]) + @@ -720,7 +719,7 @@ self.stack_client.delete.assert_any_call('stack3') self.assertEqual('Unable to delete 1 of the 3 stacks.', str(error)) - @mock.patch('sys.stdin', spec=six.StringIO) + @mock.patch('sys.stdin', spec=io.StringIO) def test_stack_delete_prompt(self, mock_stdin): arglist = ['my_stack'] mock_stdin.isatty.return_value = True @@ -732,7 +731,7 @@ mock_stdin.readline.assert_called_with() self.stack_client.delete.assert_called_with('my_stack') - @mock.patch('sys.stdin', spec=six.StringIO) + @mock.patch('sys.stdin', spec=io.StringIO) def test_stack_delete_prompt_no(self, mock_stdin): arglist = ['my_stack'] mock_stdin.isatty.return_value = True diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_common_http.py python-heatclient-3.1.0/heatclient/tests/unit/test_common_http.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_common_http.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_common_http.py 2022-09-02 09:33:20.000000000 +0000 @@ -15,9 +15,9 @@ import socket from unittest import mock +import io from keystoneauth1 import adapter from oslo_serialization import jsonutils -import six import testtools from heatclient.common import http @@ -608,7 +608,7 @@ e = self.assertRaises(exc.HTTPNotFound, client.request, '', 'GET') # Assert that the raised exception can be converted to string - self.assertIsNotNone(six.text_type(e)) + self.assertIsNotNone(str(e)) def test_redirect_302_location(self): fake1 = fakes.FakeHTTPResponse( @@ -687,7 +687,7 @@ auth=mock.ANY) e = self.assertRaises(exc.InvalidEndpoint, client.request, '', 'GET', redirect=True) - self.assertEqual("Location not returned with 302", six.text_type(e)) + self.assertEqual("Location not returned with 302", str(e)) def test_no_redirect_302_no_location(self): fake = fakes.FakeHTTPResponse( @@ -716,7 +716,7 @@ e = self.assertRaises(exc.HTTPMultipleChoices, client.request, '', 'GET') # Assert that the raised exception can be converted to string - self.assertIsNotNone(six.text_type(e)) + self.assertIsNotNone(str(e)) def test_504_error_response(self): # for 504 we don't have specific exception type @@ -766,7 +766,7 @@ {} ) mock_dumps.return_value = "{'files': test}}" - data = six.BytesIO(b'test') + data = io.BytesIO(b'test') kwargs = {'endpoint_override': 'http://no.where/', 'data': {'files': data}} client = http.SessionClient(mock.ANY) diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_deployment_utils.py python-heatclient-3.1.0/heatclient/tests/unit/test_deployment_utils.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_deployment_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_deployment_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -13,7 +13,6 @@ from unittest import mock -import six import swiftclient.client import testscenarios import testtools @@ -231,7 +230,7 @@ if not self.result_error: raise e self.assertIsInstance(e, self.result_error) - self.assertEqual(self.result_error_msg, six.text_type(e)) + self.assertEqual(self.result_error_msg, str(e)) class TempURLSignalTest(testtools.TestCase): @@ -293,7 +292,7 @@ url = deployment_utils.create_temp_url(swift_client, 'bar', 60) self.assertFalse(swift_client.post_account.called) regexp = (r"http://fake-host.com:8080/v1/AUTH_demo/bar-%s" - r"/%s\?temp_url_sig=[0-9a-f]{40}&" + r"/%s\?temp_url_sig=[0-9a-f]{40,64}&" r"temp_url_expires=[0-9]{10}" % (uuid_pattern, uuid_pattern)) self.assertThat(url, matchers.MatchesRegex(regexp)) @@ -331,7 +330,7 @@ self.assertEqual(( 'Cannot use --os-no-client-auth, auth required to create ' 'a Swift TempURL.'), - six.text_type(e)) + str(e)) @mock.patch.object(deployment_utils, 'create_temp_url') @mock.patch.object(deployment_utils, 'create_swift_client') diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_environment_format.py python-heatclient-3.1.0/heatclient/tests/unit/test_environment_format.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_environment_format.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_environment_format.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,7 +12,6 @@ from unittest import mock -import six import testscenarios import testtools import yaml @@ -106,4 +105,4 @@ - incorrect """ ex = self.assertRaises(ValueError, environment_format.parse, yaml) - self.assertIn('but very:\n ^', six.text_type(ex)) + self.assertIn('but very:\n ^', str(ex)) diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_format_utils.py python-heatclient-3.1.0/heatclient/tests/unit/test_format_utils.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_format_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_format_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,8 +12,8 @@ # # Copyright 2015 IBM Corp. +import io import json -import six import yaml from heatclient.common import format_utils @@ -128,7 +128,7 @@ truncate_postfix='truncated')) def test_print_software_deployment_output(self): - out = six.StringIO() + out = io.StringIO() format_utils.print_software_deployment_output( {'deploy_stdout': ''}, out=out, name='deploy_stdout') self.assertEqual( @@ -137,7 +137,7 @@ ov = {'deploy_stdout': '', 'deploy_stderr': '1\n2\n3\n4\n5\n6\n7\n8\n9' '\n10\n11', 'deploy_status_code': 0} - out = six.StringIO() + out = io.StringIO() format_utils.print_software_deployment_output(ov, out=out, name='deploy_stderr') self.assertEqual( @@ -156,7 +156,7 @@ 11 (truncated, view all with --long) ''', out.getvalue()) - out = six.StringIO() + out = io.StringIO() format_utils.print_software_deployment_output(ov, out=out, name='deploy_stderr', long=True) diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_resource_formatter.py python-heatclient-3.1.0/heatclient/tests/unit/test_resource_formatter.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_resource_formatter.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_resource_formatter.py 2022-09-02 09:33:20.000000000 +0000 @@ -14,7 +14,7 @@ import json import os -import six +import io from heatclient.common import resource_formatter from heatclient.osc.v1 import resource @@ -94,7 +94,7 @@ self.resources.append(v1_resources.Resource(None, r)) def test_resource_list(self): - out = six.StringIO() + out = io.StringIO() formatter = resource_formatter.ResourceDotFormatter() formatter.emit_list(None, self.resources, out, None) diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_resources.py python-heatclient-3.1.0/heatclient/tests/unit/test_resources.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_resources.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_resources.py 2022-09-02 09:33:20.000000000 +0000 @@ -14,8 +14,8 @@ from unittest import mock -from six.moves.urllib import parse import testtools +from urllib import parse from heatclient.common import utils from heatclient.v1 import resources diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_shell.py python-heatclient-3.1.0/heatclient/tests/unit/test_shell.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_shell.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_shell.py 2022-09-02 09:33:20.000000000 +0000 @@ -18,15 +18,15 @@ import uuid import fixtures +import io from keystoneauth1 import fixture as keystone_fixture from oslo_serialization import jsonutils from oslo_utils import encodeutils from requests_mock.contrib import fixture as rm_fixture -import six -from six.moves.urllib import parse -from six.moves.urllib import request import testscenarios import testtools +from urllib import parse +from urllib import request import yaml from heatclient._i18n import _ @@ -411,7 +411,7 @@ def shell(self, argstr): orig = sys.stdout try: - sys.stdout = six.StringIO() + sys.stdout = io.StringIO() _shell = heatclient.shell.HeatShell() _shell.main(argstr.split()) self.subcommands = _shell.subcommands.keys() @@ -525,7 +525,7 @@ def shell(self, argstr): orig = sys.stdout try: - sys.stdout = six.StringIO() + sys.stdout = io.StringIO() _shell = heatclient.shell.HeatShell() _shell.main(argstr.split()) self.subcommands = _shell.subcommands.keys() @@ -1224,7 +1224,8 @@ self.useFixture(fixtures.MockPatchObject(utils, 'read_url_content', return_value='xxxxxx')) - url = 'file://%s/private_key.env' % TEST_VAR_DIR + url = 'file://' + request.pathname2url( + '%s/private_key.env' % TEST_VAR_DIR) template_file = os.path.join(TEST_VAR_DIR, 'minimal.template') create_text = self.shell( @@ -1254,7 +1255,8 @@ self.useFixture(fixtures.MockPatchObject(utils, 'read_url_content', return_value='xxxxxx')) - url = 'file://%s/private_key.env' % TEST_VAR_DIR + url = 'file://' + request.pathname2url( + '%s/private_key.env' % TEST_VAR_DIR) template_file = os.path.join(TEST_VAR_DIR, 'minimal.template') create_text = self.shell( @@ -1354,7 +1356,7 @@ def test_stack_create_url(self): self.register_keystone_auth_fixture() - url_content = six.StringIO( + url_content = io.StringIO( '{"AWSTemplateFormatVersion" : "2010-09-09"}') self.useFixture(fixtures.MockPatchObject(request, 'urlopen', return_value=url_content)) @@ -2001,7 +2003,7 @@ # the main thing this @mock.patch is doing here is keeping # sys.stdin untouched for later tests - @mock.patch('sys.stdin', new_callable=six.StringIO) + @mock.patch('sys.stdin', new_callable=io.StringIO) def test_stack_delete_prompt_with_tty(self, ms): self.register_keystone_auth_fixture() mock_stdin = mock.Mock() @@ -2025,7 +2027,7 @@ # the main thing this @mock.patch is doing here is keeping # sys.stdin untouched for later tests - @mock.patch('sys.stdin', new_callable=six.StringIO) + @mock.patch('sys.stdin', new_callable=io.StringIO) def test_stack_delete_prompt_with_tty_y(self, ms): self.register_keystone_auth_fixture() mock_stdin = mock.Mock() @@ -2159,7 +2161,7 @@ # the main thing this @mock.patch is doing here is keeping # sys.stdin untouched for later tests - @mock.patch('sys.stdin', new_callable=six.StringIO) + @mock.patch('sys.stdin', new_callable=io.StringIO) def test_snapshot_delete_prompt_with_tty(self, ms): self.register_keystone_auth_fixture() resp_dict = {"snapshot": { @@ -2189,7 +2191,7 @@ # the main thing this @mock.patch is doing here is keeping # sys.stdin untouched for later tests - @mock.patch('sys.stdin', new_callable=six.StringIO) + @mock.patch('sys.stdin', new_callable=io.StringIO) def test_snapshot_delete_prompt_with_tty_y(self, ms): self.register_keystone_auth_fixture() resp_dict = {"snapshot": { @@ -2477,7 +2479,7 @@ exc.CommandError, self.shell, 'output-show teststack/1 output1') self.assertIn('The Referenced Attribute (0 PublicIP) is incorrect.', - six.text_type(error)) + str(error)) class ShellTestActions(ShellBase): @@ -3548,8 +3550,8 @@ }} output = [ - six.StringIO(yaml.safe_dump(definition, indent=2)), - six.StringIO('the config script'), + io.StringIO(yaml.safe_dump(definition, indent=2)), + io.StringIO('the config script'), ] self.useFixture(fixtures.MockPatchObject(request, 'urlopen', side_effect=output)) @@ -4082,7 +4084,7 @@ def shell(self, argstr): orig = sys.stdout try: - sys.stdout = six.StringIO() + sys.stdout = io.StringIO() _shell = heatclient.shell.HeatShell() _shell.main(argstr.split()) self.subcommands = _shell.subcommands.keys() diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_template_format.py python-heatclient-3.1.0/heatclient/tests/unit/test_template_format.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_template_format.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_template_format.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,7 +12,6 @@ from unittest import mock -import six import testscenarios import testtools import yaml @@ -60,4 +59,4 @@ - incorrect """ ex = self.assertRaises(ValueError, template_format.parse, yaml) - self.assertIn('but very:\n ^', six.text_type(ex)) + self.assertIn('but very:\n ^', str(ex)) diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_template_utils.py python-heatclient-3.1.0/heatclient/tests/unit/test_template_utils.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_template_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_template_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -15,11 +15,11 @@ import tempfile from unittest import mock +import io from oslo_serialization import base64 -import six -from six.moves.urllib import error import testtools from testtools import matchers +from urllib import error import yaml from heatclient.common import template_utils @@ -37,8 +37,8 @@ if url: def side_effect(args): if url == args: - return six.BytesIO(content) - with mock.patch('six.moves.urllib.request.urlopen') as mock_url: + return io.BytesIO(content) + with mock.patch('urllib.request.urlopen') as mock_url: mock_url.side_effect = side_effect template_utils.resolve_environment_urls( jenv.get('resource_registry'), files, env_base_url) @@ -47,7 +47,7 @@ template_utils.resolve_environment_urls( jenv.get('resource_registry'), files, env_base_url) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_ignore_env_keys(self, mock_url): env_file = '/home/my/dir/env.yaml' env = b''' @@ -57,7 +57,7 @@ hooks: pre_create restricted_actions: replace ''' - mock_url.return_value = six.BytesIO(env) + mock_url.return_value = io.BytesIO(env) _, env_dict = template_utils.process_environment_and_files( env_file) self.assertEqual( @@ -67,7 +67,7 @@ env_dict) mock_url.assert_called_with('file://%s' % env_file) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_environment_file(self, mock_url): env_file = '/home/my/dir/env.yaml' @@ -75,8 +75,8 @@ resource_registry: "OS::Thingy": "file:///home/b/a.yaml" ''' - mock_url.side_effect = [six.BytesIO(env), six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env), io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] files, env_dict = template_utils.process_environment_and_files( env_file) @@ -92,7 +92,7 @@ mock.call('file:///home/b/a.yaml') ]) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_environment_relative_file(self, mock_url): env_file = '/home/my/dir/env.yaml' @@ -102,8 +102,8 @@ "OS::Thingy": a.yaml ''' - mock_url.side_effect = [six.BytesIO(env), six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env), io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] self.assertEqual( env_url, @@ -139,7 +139,7 @@ self.assertEqual({}, files) self.assertEqual({}, env) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_environment_relative_file_up(self, mock_url): env_file = '/home/my/dir/env.yaml' @@ -148,8 +148,8 @@ resource_registry: "OS::Thingy": ../bar/a.yaml ''' - mock_url.side_effect = [six.BytesIO(env), six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env), io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] env_url = 'file://%s' % env_file self.assertEqual( @@ -174,7 +174,7 @@ mock.call('file:///home/my/bar/a.yaml') ]) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_environment_url(self, mock_url): env = b''' resource_registry: @@ -182,8 +182,8 @@ ''' url = 'http://no.where/some/path/to/file.yaml' tmpl_url = 'http://no.where/some/path/to/a.yaml' - mock_url.side_effect = [six.BytesIO(env), six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env), io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] files, env_dict = template_utils.process_environment_and_files( url) @@ -197,12 +197,12 @@ mock.call(tmpl_url) ]) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_environment_empty_file(self, mock_url): env_file = '/home/my/dir/env.yaml' env = b'' - mock_url.return_value = six.BytesIO(env) + mock_url.return_value = io.BytesIO(env) files, env_dict = template_utils.process_environment_and_files( env_file) @@ -216,7 +216,7 @@ self.assertEqual({}, env) self.assertEqual({}, files) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_multiple_environments_and_files(self, mock_url): env_file1 = '/home/my/dir/env1.yaml' @@ -235,12 +235,12 @@ "OS::Thingy2": "file:///home/b/b.yaml" ''' - mock_url.side_effect = [six.BytesIO(env1), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(env2), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env1), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(env2), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] files, env = template_utils.process_multiple_environments_and_files( [env_file1, env_file2]) @@ -267,7 +267,7 @@ mock.call('file:///home/b/b.yaml') ]) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_multiple_environments_default_resources(self, mock_url): env_file1 = '/home/my/dir/env1.yaml' @@ -289,16 +289,16 @@ resource2: "OS::Thingy4": "file:///home/b/b.yaml" ''' - mock_url.side_effect = [six.BytesIO(env1), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(env2), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env1), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(env2), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] files, env = template_utils.process_multiple_environments_and_files( [env_file1, env_file2]) @@ -378,7 +378,7 @@ self.assertEqual(self.template_a.decode('utf-8'), files['http://no.where/path/to/b/a.yaml']) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_multiple_environments_and_files_tracker(self, mock_url): # Setup env_file1 = '/home/my/dir/env1.yaml' @@ -389,9 +389,9 @@ resource_registry: "OS::Thingy1": "file:///home/b/a.yaml" ''' - mock_url.side_effect = [six.BytesIO(env1), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env1), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] # Test env_file_list = [] @@ -419,7 +419,7 @@ ]) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_environment_relative_file_tracker(self, mock_url): env_file = '/home/my/dir/env.yaml' @@ -428,9 +428,9 @@ resource_registry: "OS::Thingy": a.yaml ''' - mock_url.side_effect = [six.BytesIO(env), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a)] + mock_url.side_effect = [io.BytesIO(env), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a)] self.assertEqual( env_url, @@ -460,7 +460,7 @@ ]) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_process_multiple_environments_empty_registry(self, mock_url): # Setup env_file1 = '/home/my/dir/env1.yaml' @@ -473,10 +473,10 @@ env2 = b''' resource_registry: ''' - mock_url.side_effect = [six.BytesIO(env1), - six.BytesIO(self.template_a), - six.BytesIO(self.template_a), - six.BytesIO(env2)] + mock_url.side_effect = [io.BytesIO(env1), + io.BytesIO(self.template_a), + io.BytesIO(self.template_a), + io.BytesIO(env2)] # Test env_file_list = [] @@ -654,11 +654,11 @@ matchers.MatchesRegex( 'Error parsing template file://%s ' % tmpl_file.name)) - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_get_template_contents_url(self, mock_url): tmpl = b'{"AWSTemplateFormatVersion" : "2010-09-09", "foo": "bar"}' url = 'http://no.where/path/to/a.yaml' - mock_url.return_value = six.BytesIO(tmpl) + mock_url.return_value = io.BytesIO(tmpl) files, tmpl_parsed = template_utils.get_template_contents( template_url=url) @@ -726,9 +726,9 @@ [{'path': '/tmp/%s' % filename, 'content': {'get_file': url}, 'encoding': 'b64'}]}}}}} - with mock.patch('six.moves.urllib.request.urlopen') as mock_url: + with mock.patch('urllib.request.urlopen') as mock_url: raw_content = base64.decode_as_bytes(content) - response = six.BytesIO(raw_content) + response = io.BytesIO(raw_content) mock_url.return_value = response files = {} template_utils.resolve_template_get_files( @@ -746,13 +746,7 @@ # zip has '\0' in stream self.assertIn(b'\0', base64.decode_as_bytes(content)) decoded_content = base64.decode_as_bytes(content) - if six.PY3: - self.assertRaises(UnicodeDecodeError, decoded_content.decode) - else: - self.assertRaises( - UnicodeDecodeError, - json.dumps, - {'content': decoded_content}) + self.assertRaises(UnicodeDecodeError, decoded_content.decode) self.check_non_utf8_content( filename=filename, content=content) @@ -762,13 +756,7 @@ # utf6 has '\0' in stream self.assertIn(b'\0', base64.decode_as_bytes(content)) decoded_content = base64.decode_as_bytes(content) - if six.PY3: - self.assertRaises(UnicodeDecodeError, decoded_content.decode) - else: - self.assertRaises( - UnicodeDecodeError, - json.dumps, - {'content': decoded_content}) + self.assertRaises(UnicodeDecodeError, decoded_content.decode) self.check_non_utf8_content(filename=filename, content=content) def test_get_gb18030_content(self): @@ -777,17 +765,11 @@ # gb18030 has no '\0' in stream self.assertNotIn('\0', base64.decode_as_bytes(content)) decoded_content = base64.decode_as_bytes(content) - if six.PY3: - self.assertRaises(UnicodeDecodeError, decoded_content.decode) - else: - self.assertRaises( - UnicodeDecodeError, - json.dumps, - {'content': decoded_content}) + self.assertRaises(UnicodeDecodeError, decoded_content.decode) self.check_non_utf8_content(filename=filename, content=content) -@mock.patch('six.moves.urllib.request.urlopen') +@mock.patch('urllib.request.urlopen') class TestTemplateGetFileFunctions(testtools.TestCase): hot_template = b'''heat_template_version: 2013-05-23 @@ -815,12 +797,12 @@ tmpl_file = '/home/my/dir/template.yaml' url = 'file:///home/my/dir/template.yaml' - mock_url.side_effect = [six.BytesIO(self.hot_template), - six.BytesIO(b'bar contents'), - six.BytesIO(b'foo contents'), - six.BytesIO(b'baz1 contents'), - six.BytesIO(b'baz2 contents'), - six.BytesIO(b'baz3 contents')] + mock_url.side_effect = [io.BytesIO(self.hot_template), + io.BytesIO(b'bar contents'), + io.BytesIO(b'foo contents'), + io.BytesIO(b'baz1 contents'), + io.BytesIO(b'baz2 contents'), + io.BytesIO(b'baz3 contents')] files, tmpl_parsed = template_utils.get_template_contents( template_file=tmpl_file) @@ -869,8 +851,8 @@ contents:\n\ value:\n\ get_file: foo.yaml\n''' - mock_url.side_effect = [six.BytesIO(contents), - six.BytesIO(b'foo contents')] + mock_url.side_effect = [io.BytesIO(contents), + io.BytesIO(b'foo contents')] files = template_utils.get_template_contents( template_file=tmpl_file)[0] self.assertEqual({foo_url: b'foo contents'}, files) @@ -892,8 +874,8 @@ template:\n\ value:\n\ get_file: foo.yaml\n''' - mock_url.side_effect = [six.BytesIO(contents), - six.BytesIO(b'foo contents')] + mock_url.side_effect = [io.BytesIO(contents), + io.BytesIO(b'foo contents')] # asserts that is fetched only once even though it is # referenced in the template twice files = template_utils.get_template_contents( @@ -935,18 +917,18 @@ type: string ''' - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_hot_template(self, mock_url): tmpl_file = '/home/my/dir/template.yaml' url = 'file:///home/my/dir/template.yaml' def side_effect(args): if url == args: - return six.BytesIO(self.hot_template) + return io.BytesIO(self.hot_template) if 'file:///home/my/dir/foo.yaml' == args: - return six.BytesIO(self.foo_template) + return io.BytesIO(self.foo_template) if 'file:///home/my/dir/spam/egg.yaml' == args: - return six.BytesIO(self.egg_template) + return io.BytesIO(self.egg_template) mock_url.side_effect = side_effect files, tmpl_parsed = template_utils.get_template_contents( @@ -1013,7 +995,7 @@ type: string ''' - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_hot_template(self, mock_url): tmpl_file = '/home/my/dir/template.yaml' url = 'file:///home/my/dir/template.yaml' @@ -1022,11 +1004,11 @@ def side_effect(args): if url == args: - return six.BytesIO(self.hot_template) + return io.BytesIO(self.hot_template) if foo_url == args: - return six.BytesIO(self.foo_template) + return io.BytesIO(self.foo_template) if bar_url == args: - return six.BytesIO(self.bar_template) + return io.BytesIO(self.bar_template) mock_url.side_effect = side_effect files, tmpl_parsed = template_utils.get_template_contents( @@ -1112,7 +1094,7 @@ type: string ''' - @mock.patch('six.moves.urllib.request.urlopen') + @mock.patch('urllib.request.urlopen') def test_env_nested_includes(self, mock_url): env_file = '/home/my/dir/env.yaml' env_url = 'file:///home/my/dir/env.yaml' @@ -1130,21 +1112,21 @@ def side_effect(args): if env_url == args: - return six.BytesIO(env) + return io.BytesIO(env) if template_url == args: - return six.BytesIO(self.hot_template) + return io.BytesIO(self.hot_template) if foo_url == args: - return six.BytesIO(self.foo_template) + return io.BytesIO(self.foo_template) if egg_url == args: - return six.BytesIO(self.egg_template) + return io.BytesIO(self.egg_template) if ham_url == args: - return six.BytesIO(b'ham contents') + return io.BytesIO(b'ham contents') if one_url == args: - return six.BytesIO(self.foo_template) + return io.BytesIO(self.foo_template) if two_url == args: - return six.BytesIO(self.foo_template) + return io.BytesIO(self.foo_template) if three_url == args: - return six.BytesIO(b'three contents') + return io.BytesIO(b'three contents') mock_url.side_effect = side_effect files, env_dict = template_utils.process_environment_and_files( diff -Nru python-heatclient-2.5.1/heatclient/tests/unit/test_utils.py python-heatclient-3.1.0/heatclient/tests/unit/test_utils.py --- python-heatclient-2.5.1/heatclient/tests/unit/test_utils.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/tests/unit/test_utils.py 2022-09-02 09:33:20.000000000 +0000 @@ -15,6 +15,7 @@ import os from unittest import mock +from urllib import request import testtools @@ -386,7 +387,7 @@ def test_normalise_file_path_to_url_relative(self): self.assertEqual( - 'file://%s/foo' % os.getcwd(), + 'file://' + request.pathname2url('%s/foo' % os.getcwd()), utils.normalise_file_path_to_url( 'foo')) diff -Nru python-heatclient-2.5.1/heatclient/v1/events.py python-heatclient-3.1.0/heatclient/v1/events.py --- python-heatclient-2.5.1/heatclient/v1/events.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/events.py 2022-09-02 09:33:20.000000000 +0000 @@ -15,7 +15,7 @@ import collections from oslo_utils import encodeutils -from six.moves.urllib import parse +from urllib import parse from heatclient.common import base from heatclient.common import utils diff -Nru python-heatclient-2.5.1/heatclient/v1/resources.py python-heatclient-3.1.0/heatclient/v1/resources.py --- python-heatclient-2.5.1/heatclient/v1/resources.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/resources.py 2022-09-02 09:33:20.000000000 +0000 @@ -14,7 +14,7 @@ # under the License. from oslo_utils import encodeutils -from six.moves.urllib import parse +from urllib import parse from heatclient.common import base from heatclient.common import utils diff -Nru python-heatclient-2.5.1/heatclient/v1/resource_types.py python-heatclient-3.1.0/heatclient/v1/resource_types.py --- python-heatclient-2.5.1/heatclient/v1/resource_types.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/resource_types.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,8 +12,7 @@ # under the License. from oslo_utils import encodeutils -import six -from six.moves.urllib import parse +from urllib import parse from heatclient.common import base from heatclient.common import utils @@ -21,7 +20,7 @@ class ResourceType(base.Resource): def __repr__(self): - if isinstance(self._info, six.string_types): + if isinstance(self._info, str): return "" % self._info else: return "" % self._info.get('resource_type') @@ -30,7 +29,7 @@ return self.manager.data(self, **kwargs) def _add_details(self, info): - if isinstance(info, six.string_types): + if isinstance(info, str): self.resource_type = info elif isinstance(info, dict): self.resource_type = info.get('resource_type') diff -Nru python-heatclient-2.5.1/heatclient/v1/shell.py python-heatclient-3.1.0/heatclient/v1/shell.py --- python-heatclient-2.5.1/heatclient/v1/shell.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/shell.py 2022-09-02 09:33:20.000000000 +0000 @@ -18,8 +18,7 @@ from oslo_serialization import jsonutils from oslo_utils import strutils -import six -from six.moves.urllib import request +from urllib import request import yaml from heatclient._i18n import _ @@ -306,7 +305,7 @@ try: if not args.yes and sys.stdin.isatty(): - prompt_response = six.moves.input( + prompt_response = input( _("Are you sure you want to delete this stack(s) [y/N]? ") ).lower() if not prompt_response.startswith('y'): @@ -542,7 +541,7 @@ try: rollback = strutils.bool_from_string(args.rollback, strict=True) except ValueError as ex: - raise exc.CommandError(six.text_type(ex)) + raise exc.CommandError(str(ex)) else: fields['disable_rollback'] = not(rollback) # TODO(pshchelo): remove the following 'else' clause after deprecation @@ -1067,7 +1066,7 @@ data_url = utils.normalise_file_path_to_url(data_file) data = request.urlopen(data_url).read() if data: - if isinstance(data, six.binary_type): + if isinstance(data, bytes): data = data.decode('utf-8') try: data = jsonutils.loads(data) diff -Nru python-heatclient-2.5.1/heatclient/v1/software_configs.py python-heatclient-3.1.0/heatclient/v1/software_configs.py --- python-heatclient-2.5.1/heatclient/v1/software_configs.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/software_configs.py 2022-09-02 09:33:20.000000000 +0000 @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from six.moves.urllib import parse +from urllib import parse from heatclient.common import base from heatclient.common import utils diff -Nru python-heatclient-2.5.1/heatclient/v1/software_deployments.py python-heatclient-3.1.0/heatclient/v1/software_deployments.py --- python-heatclient-2.5.1/heatclient/v1/software_deployments.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/software_deployments.py 2022-09-02 09:33:20.000000000 +0000 @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from six.moves.urllib import parse +from urllib import parse from heatclient.common import base from heatclient.common import utils diff -Nru python-heatclient-2.5.1/heatclient/v1/stacks.py python-heatclient-3.1.0/heatclient/v1/stacks.py --- python-heatclient-2.5.1/heatclient/v1/stacks.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/stacks.py 2022-09-02 09:33:20.000000000 +0000 @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from six.moves.urllib import parse +from urllib import parse from heatclient._i18n import _ from heatclient.common import base diff -Nru python-heatclient-2.5.1/heatclient/v1/template_versions.py python-heatclient-3.1.0/heatclient/v1/template_versions.py --- python-heatclient-2.5.1/heatclient/v1/template_versions.py 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/heatclient/v1/template_versions.py 2022-09-02 09:33:20.000000000 +0000 @@ -12,7 +12,7 @@ # under the License. from oslo_utils import encodeutils -from six.moves.urllib import parse +from urllib import parse from heatclient.common import base diff -Nru python-heatclient-2.5.1/lower-constraints.txt python-heatclient-3.1.0/lower-constraints.txt --- python-heatclient-2.5.1/lower-constraints.txt 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/lower-constraints.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -alabaster==0.7.10 -appdirs==1.3.0 -asn1crypto==0.23.0 -Babel==2.3.4 -cffi==1.14.0 -cliff==2.8.0 -cmd2==0.8.0 -coverage==4.0 -cryptography==2.7 -debtcollector==1.2.0 -decorator==4.3.0 -deprecation==1.0 -docutils==0.13.1 -dogpile.cache==0.6.2 -dulwich==0.15.0 -extras==1.0.0 -fasteners==0.7.0 -fixtures==3.0.0 -flake8==3.7.0 -future==0.16.0 -idna==2.6 -imagesize==0.7.1 -iso8601==0.1.11 -Jinja2==2.10 -jmespath==0.9.0 -jsonpatch==1.16 -jsonpointer==1.13 -jsonschema==2.6.0 -keystoneauth1==3.8.0 -linecache2==1.0.0 -MarkupSafe==1.0 -mccabe==0.6.0 -monotonic==0.6 -msgpack-python==0.5.6 -munch==2.1.0 -netaddr==0.7.18 -netifaces==0.10.4 -openstacksdk==0.15.0 -os-client-config==1.28.0 -os-service-types==1.2.0 -os-testr==1.0.0 -osc-lib==1.14.0 -oslo.concurrency==3.25.0 -oslo.config==5.2.0 -oslo.context==2.19.2 -oslo.i18n==3.15.3 -oslo.log==3.36.0 -oslo.serialization==2.18.0 -oslo.utils==3.33.0 -paramiko==2.0.0 -pbr==2.0.0 -pep8==1.5.7 -positional==1.2.1 -prettytable==0.7.2 -pyasn1==0.1.8 -pycparser==2.18 -pyflakes==2.1.0 -Pygments==2.2.0 -pyinotify==0.9.6 -pyOpenSSL==17.1.0 -pyparsing==2.1.0 -pyperclip==1.5.27 -python-cinderclient==3.3.0 -python-dateutil==2.5.3 -python-glanceclient==2.8.0 -python-keystoneclient==3.8.0 -python-mimeparse==1.6.0 -python-novaclient==9.1.0 -python-openstackclient==3.12.0 -python-subunit==1.0.0 -python-swiftclient==3.2.0 -pytz==2018.3 -PyYAML==3.13 -requests-mock==1.2.0 -requests==2.14.2 -requestsexceptions==1.2.0 -rfc3986==0.3.1 -simplejson==3.5.1 -six==1.10.0 -snowballstemmer==1.2.1 -stestr==2.0.0 -stevedore==1.20.0 -tempest==17.1.0 -testscenarios==0.4 -testtools==2.2.0 -traceback2==1.4.0 -unittest2==1.1.0 -urllib3==1.21.1 -warlock==1.2.0 -wrapt==1.7.0 diff -Nru python-heatclient-2.5.1/PKG-INFO python-heatclient-3.1.0/PKG-INFO --- python-heatclient-2.5.1/PKG-INFO 2022-02-25 14:04:56.762447400 +0000 +++ python-heatclient-3.1.0/PKG-INFO 2022-09-02 09:33:58.773675200 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: python-heatclient -Version: 2.5.1 +Version: 3.1.0 Summary: OpenStack Orchestration API Client Library Home-page: https://docs.openstack.org/python-heatclient/latest Author: OpenStack @@ -62,10 +62,8 @@ Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython -Requires-Python: >=3.6 +Requires-Python: >=3.8 diff -Nru python-heatclient-2.5.1/python_heatclient.egg-info/pbr.json python-heatclient-3.1.0/python_heatclient.egg-info/pbr.json --- python-heatclient-2.5.1/python_heatclient.egg-info/pbr.json 2022-02-25 14:04:56.000000000 +0000 +++ python-heatclient-3.1.0/python_heatclient.egg-info/pbr.json 2022-09-02 09:33:58.000000000 +0000 @@ -1 +1 @@ -{"git_version": "a9abc54", "is_release": true} \ No newline at end of file +{"git_version": "4935c90", "is_release": true} \ No newline at end of file diff -Nru python-heatclient-2.5.1/python_heatclient.egg-info/PKG-INFO python-heatclient-3.1.0/python_heatclient.egg-info/PKG-INFO --- python-heatclient-2.5.1/python_heatclient.egg-info/PKG-INFO 2022-02-25 14:04:56.000000000 +0000 +++ python-heatclient-3.1.0/python_heatclient.egg-info/PKG-INFO 2022-09-02 09:33:58.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: python-heatclient -Version: 2.5.1 +Version: 3.1.0 Summary: OpenStack Orchestration API Client Library Home-page: https://docs.openstack.org/python-heatclient/latest Author: OpenStack @@ -62,10 +62,8 @@ Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython -Requires-Python: >=3.6 +Requires-Python: >=3.8 diff -Nru python-heatclient-2.5.1/python_heatclient.egg-info/requires.txt python-heatclient-3.1.0/python_heatclient.egg-info/requires.txt --- python-heatclient-2.5.1/python_heatclient.egg-info/requires.txt 2022-02-25 14:04:56.000000000 +0000 +++ python-heatclient-3.1.0/python_heatclient.egg-info/requires.txt 2022-09-02 09:33:58.000000000 +0000 @@ -11,4 +11,3 @@ pbr!=2.1.0,>=2.0.0 python-swiftclient>=3.2.0 requests>=2.14.2 -six>=1.10.0 diff -Nru python-heatclient-2.5.1/python_heatclient.egg-info/SOURCES.txt python-heatclient-3.1.0/python_heatclient.egg-info/SOURCES.txt --- python-heatclient-2.5.1/python_heatclient.egg-info/SOURCES.txt 2022-02-25 14:04:56.000000000 +0000 +++ python-heatclient-3.1.0/python_heatclient.egg-info/SOURCES.txt 2022-09-02 09:33:58.000000000 +0000 @@ -7,7 +7,6 @@ LICENSE README.rst babel.cfg -lower-constraints.txt requirements.txt setup.cfg setup.py @@ -155,4 +154,5 @@ releasenotes/source/victoria.rst releasenotes/source/wallaby.rst releasenotes/source/xena.rst +releasenotes/source/yoga.rst tools/heat.bash_completion \ No newline at end of file diff -Nru python-heatclient-2.5.1/releasenotes/source/index.rst python-heatclient-3.1.0/releasenotes/source/index.rst --- python-heatclient-2.5.1/releasenotes/source/index.rst 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/releasenotes/source/index.rst 2022-09-02 09:33:20.000000000 +0000 @@ -7,6 +7,7 @@ :caption: Contents: unreleased + yoga xena wallaby victoria diff -Nru python-heatclient-2.5.1/releasenotes/source/yoga.rst python-heatclient-3.1.0/releasenotes/source/yoga.rst --- python-heatclient-2.5.1/releasenotes/source/yoga.rst 1970-01-01 00:00:00.000000000 +0000 +++ python-heatclient-3.1.0/releasenotes/source/yoga.rst 2022-09-02 09:33:20.000000000 +0000 @@ -0,0 +1,6 @@ +========================= +Yoga Series Release Notes +========================= + +.. release-notes:: + :branch: stable/yoga diff -Nru python-heatclient-2.5.1/requirements.txt python-heatclient-3.1.0/requirements.txt --- python-heatclient-2.5.1/requirements.txt 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/requirements.txt 2022-09-02 09:33:20.000000000 +0000 @@ -1,3 +1,7 @@ +# Requirements lower bounds listed here are our best effort to keep them up to +# date but we do not test them so no guarantee of having them all correct. If +# you find any incorrect lower bounds, let us know or propose a fix. + # 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. @@ -15,4 +19,3 @@ python-swiftclient>=3.2.0 # Apache-2.0 PyYAML>=3.13 # MIT requests>=2.14.2 # Apache-2.0 -six>=1.10.0 # MIT diff -Nru python-heatclient-2.5.1/setup.cfg python-heatclient-3.1.0/setup.cfg --- python-heatclient-2.5.1/setup.cfg 2022-02-25 14:04:56.762447400 +0000 +++ python-heatclient-3.1.0/setup.cfg 2022-09-02 09:33:58.773675200 +0000 @@ -7,7 +7,7 @@ author = OpenStack author_email = openstack-discuss@lists.openstack.org home_page = https://docs.openstack.org/python-heatclient/latest -python_requires = >=3.6 +python_requires = >=3.8 classifier = Development Status :: 5 - Production/Stable Environment :: Console @@ -18,8 +18,6 @@ Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3 :: Only diff -Nru python-heatclient-2.5.1/tox.ini python-heatclient-3.1.0/tox.ini --- python-heatclient-2.5.1/tox.ini 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/tox.ini 2022-09-02 09:33:20.000000000 +0000 @@ -1,7 +1,7 @@ [tox] envlist = pypy,py39,pep8 ignore_basepython_conflict = true -minversion = 3.1.0 +minversion = 3.18.0 skipsdist = True [testenv] @@ -9,12 +9,12 @@ setenv = VIRTUAL_ENV={envdir} usedevelop = True deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.py[c|o]" -delete stestr run --slowest {posargs} -whitelist_externals = find +allowlist_externals = find [testenv:debug] commands = oslo_debug_helper -t heatclient/tests {posargs} @@ -44,7 +44,7 @@ [testenv:docs] deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html @@ -59,12 +59,6 @@ [testenv:releasenotes] deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html - -[testenv:lower-constraints] -deps = - -c{toxinidir}/lower-constraints.txt - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt diff -Nru python-heatclient-2.5.1/.zuul.yaml python-heatclient-3.1.0/.zuul.yaml --- python-heatclient-2.5.1/.zuul.yaml 2022-02-25 14:04:25.000000000 +0000 +++ python-heatclient-3.1.0/.zuul.yaml 2022-09-02 09:33:20.000000000 +0000 @@ -20,8 +20,7 @@ - project: templates: - openstack-cover-jobs - - openstack-lower-constraints-jobs - - openstack-python3-yoga-jobs + - openstack-python3-zed-jobs - check-requirements - openstackclient-plugin-jobs - publish-openstack-docs-pti