Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-glanceclient for openSUSE:Factory checked in at 2023-03-07 16:49:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-glanceclient (Old) and /work/SRC/openSUSE:Factory/.python-glanceclient.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-glanceclient" Tue Mar 7 16:49:47 2023 rev:37 rq:1069831 version:4.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-glanceclient/python-glanceclient.changes 2023-01-05 15:00:56.341047522 +0100 +++ /work/SRC/openSUSE:Factory/.python-glanceclient.new.31432/python-glanceclient.changes 2023-03-07 16:50:22.813599061 +0100 @@ -1,0 +2,11 @@ +Tue Mar 7 06:57:00 UTC 2023 - cloud-de...@suse.de + +- update to version 4.3.0 + - Fix functional tests and docs generation + - Release notes for 4.3.0 + - Unhardcode the value of DEFAULT_PAGE_SIZE from the tests + - Remove unicode-related Python2-only code + - Boolean options: use strict checking + - Replace osc with glance commands + +------------------------------------------------------------------- Old: ---- python-glanceclient-4.2.0.tar.gz New: ---- python-glanceclient-4.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-glanceclient.spec ++++++ --- /var/tmp/diff_new_pack.2rcX6C/_old 2023-03-07 16:50:23.697603713 +0100 +++ /var/tmp/diff_new_pack.2rcX6C/_new 2023-03-07 16:50:23.705603755 +0100 @@ -17,14 +17,14 @@ Name: python-glanceclient -Version: 4.2.0 +Version: 4.3.0 Release: 0 Epoch: 0 Summary: Python API and CLI for OpenStack Glance License: Apache-2.0 Group: Development/Languages/Python URL: https://docs.openstack.org/python-glanceclient -Source0: https://files.pythonhosted.org/packages/source/p/python-glanceclient/python-glanceclient-4.2.0.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/python-glanceclient/python-glanceclient-4.3.0.tar.gz BuildRequires: openstack-macros BuildRequires: python3-PrettyTable >= 0.7.1 BuildRequires: python3-ddt @@ -81,15 +81,15 @@ This package contains auto-generated documentation. %prep -%autosetup -p1 -n python-glanceclient-4.2.0 +%autosetup -p1 -n python-glanceclient-4.3.0 %py_req_cleanup %build %py3_build # generate html docs -PBR_VERSION=4.2.0 %sphinx_build -b html doc/source doc/build/html -PBR_VERSION=4.2.0 %sphinx_build -b man doc/source doc/build/man +PBR_VERSION=4.3.0 %sphinx_build -b html doc/source doc/build/html +PBR_VERSION=4.3.0 %sphinx_build -b man doc/source doc/build/man # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} rm -rf doc/build/man/.{doctrees,buildinfo} @@ -100,7 +100,7 @@ install -p -D -m 644 doc/build/man/glance.1 %{buildroot}%{_mandir}/man1/glance.1 %check -python3 -m stestr.cli run +%{openstack_stestr_run} %files -n python3-glanceclient %license LICENSE ++++++ python-glanceclient-4.2.0.tar.gz -> python-glanceclient-4.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/ChangeLog new/python-glanceclient-4.3.0/ChangeLog --- old/python-glanceclient-4.2.0/ChangeLog 2022-11-16 14:50:20.000000000 +0100 +++ new/python-glanceclient-4.3.0/ChangeLog 2023-02-17 11:32:00.000000000 +0100 @@ -1,10 +1,20 @@ CHANGES ======= +4.3.0 +----- + +* Release notes for 4.3.0 +* Fix functional tests and docs generation +* Boolean options: use strict checking +* Unhardcode the value of DEFAULT\_PAGE\_SIZE from the tests +* Remove unicode-related Python2-only code + 4.2.0 ----- * schema\_args: Do not generate option for read-only properties +* Replace osc with glance commands * Switch to 2023.1 Python3 unit tests and generic template name * Update master for stable/zed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/PKG-INFO new/python-glanceclient-4.3.0/PKG-INFO --- old/python-glanceclient-4.2.0/PKG-INFO 2022-11-16 14:50:20.700069700 +0100 +++ new/python-glanceclient-4.3.0/PKG-INFO 2023-02-17 11:32:00.971442200 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: python-glanceclient -Version: 4.2.0 +Version: 4.3.0 Summary: OpenStack Image API Client Library Home-page: https://docs.openstack.org/python-glanceclient/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/doc/source/cli/property-keys.rst new/python-glanceclient-4.3.0/doc/source/cli/property-keys.rst --- old/python-glanceclient-4.2.0/doc/source/cli/property-keys.rst 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/doc/source/cli/property-keys.rst 2023-02-17 11:31:32.000000000 +0100 @@ -7,14 +7,14 @@ services. Properties can be set on an image at the time of image creation or they -can be set on an existing image. Use the :command:`openstack image create` -and :command:`openstack image set` commands respectively. +can be set on an existing image. Use the :command:`glance image-create` +and :command:`glance image-update` commands respectively. For example: .. code-block:: console - $ openstack image set IMG-UUID --property architecture=x86_64 + $ glance image-update IMG-UUID --property architecture=x86_64 For a list of image properties that can be used to affect the behavior of other services, refer to `Useful image properties @@ -27,3 +27,8 @@ For more information, refer to `Manage images <https://docs.openstack.org/glance/latest/admin/manage-images.html>`_ in the Glance Administration Guide. + +.. note:: + + Boolean properties expect one of the following values: '0', '1', 'f', + 'false', 'n', 'no', 'off', 'on', 't', 'true', 'y', 'yes' (case-insensitive). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/doc/source/conf.py new/python-glanceclient-4.3.0/doc/source/conf.py --- old/python-glanceclient-4.2.0/doc/source/conf.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/doc/source/conf.py 2023-02-17 11:31:32.000000000 +0100 @@ -57,7 +57,7 @@ # General information about the project. project = 'python-glanceclient' -copyright = u'OpenStack Foundation' +copyright = 'OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True @@ -83,8 +83,8 @@ # -- Options for man page output ---------------------------------------------- # Grouping the document tree for man pages. -# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' +# List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual' man_pages = [ - ('cli/glance', 'glance', u'Client for OpenStack Images API', - [u'OpenStack Foundation'], 1), + ('cli/glance', 'glance', 'Client for OpenStack Images API', + ['OpenStack Foundation'], 1), ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/common/utils.py new/python-glanceclient-4.3.0/glanceclient/common/utils.py --- old/python-glanceclient-4.2.0/glanceclient/common/utils.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/common/utils.py 2023-02-17 11:31:32.000000000 +0100 @@ -103,7 +103,7 @@ typemap = { 'string': encodeutils.safe_decode, 'integer': int, - 'boolean': strutils.bool_from_string, + 'boolean': lambda x: strutils.bool_from_string(x, strict=True), 'array': list } @@ -271,34 +271,11 @@ field_name = field.lower().replace(' ', '_') data = getattr(o, field_name, None) or '' row.append(data) - count = 0 - # Converts unicode values in list to string - for part in row: - count = count + 1 - if isinstance(part, list): - part = unicode_key_value_to_string(part) - row[count - 1] = part pt.add_row(row) print(encodeutils.safe_decode(pt.get_string())) -def _encode(src): - """remove extra 'u' in PY2.""" - return src - - -def unicode_key_value_to_string(src): - """Recursively converts dictionary keys to strings.""" - if isinstance(src, dict): - return dict((_encode(k), - _encode(unicode_key_value_to_string(v))) - for k, v in src.items()) - if isinstance(src, list): - return [unicode_key_value_to_string(l) for l in src] - return _encode(src) - - def print_dict(d, max_column_width=80): pt = prettytable.PrettyTable(['Property', 'Value'], caching=False) pt.align = 'l' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/functional/v1/test_readonly_glance.py new/python-glanceclient-4.3.0/glanceclient/tests/functional/v1/test_readonly_glance.py --- old/python-glanceclient-4.2.0/glanceclient/tests/functional/v1/test_readonly_glance.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/functional/v1/test_readonly_glance.py 2023-02-17 11:31:32.000000000 +0100 @@ -51,7 +51,14 @@ commands = [] cmds_start = lines.index('Positional arguments:') - cmds_end = lines.index('Optional arguments:') + try: + # Starting in Python 3.10, argparse displays options in the + # "Options:" section... + cmds_end = lines.index('Options:') + except ValueError: + # ... but before Python 3.10, options were displayed in the + # "Optional arguments:" section. + cmds_end = lines.index('Optional arguments:') command_pattern = re.compile(r'^ {4}([a-z0-9\-\_]+)') for line in lines[cmds_start:cmds_end]: match = command_pattern.match(line) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/functional/v2/test_readonly_glance.py new/python-glanceclient-4.3.0/glanceclient/tests/functional/v2/test_readonly_glance.py --- old/python-glanceclient-4.2.0/glanceclient/tests/functional/v2/test_readonly_glance.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/functional/v2/test_readonly_glance.py 2023-02-17 11:31:32.000000000 +0100 @@ -71,7 +71,14 @@ commands = [] cmds_start = lines.index('Positional arguments:') - cmds_end = lines.index('Optional arguments:') + try: + # Starting in Python 3.10, argparse displays options in the + # "Options:" section... + cmds_end = lines.index('Options:') + except ValueError: + # ... but before Python 3.10, options were displayed in the + # "Optional arguments:" section. + cmds_end = lines.index('Optional arguments:') command_pattern = re.compile(r'^ {4}([a-z0-9\-\_]+)') for line in lines[cmds_start:cmds_end]: match = command_pattern.match(line) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/test_http.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/test_http.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/test_http.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/test_http.py 2023-02-17 11:31:32.000000000 +0100 @@ -66,7 +66,7 @@ self.endpoint = 'http://example.com:9292' self.ssl_endpoint = 'https://example.com:9292' - self.token = u'abc123' + self.token = 'abc123' self.client = getattr(self, self.create_client)() @@ -80,7 +80,7 @@ 'X-Service-Catalog': 'service_catalog', } # with token - kwargs = {'token': u'fake-token', + kwargs = {'token': 'fake-token', 'identity_headers': identity_headers} http_client_object = http.HTTPClient(self.endpoint, **kwargs) self.assertEqual('auth_token', http_client_object.auth_token) @@ -96,10 +96,10 @@ 'X-Service-Catalog': 'service_catalog', } # without X-Auth-Token in identity headers - kwargs = {'token': u'fake-token', + kwargs = {'token': 'fake-token', 'identity_headers': identity_headers} http_client_object = http.HTTPClient(self.endpoint, **kwargs) - self.assertEqual(u'fake-token', http_client_object.auth_token) + self.assertEqual('fake-token', http_client_object.auth_token) self.assertTrue(http_client_object.identity_headers. get('X-Auth-Token') is None) @@ -210,12 +210,12 @@ self.mock.get(self.endpoint + path, text=text, headers={"Content-Type": "text/plain"}) - headers = {"test": u'ni\xf1o'} + headers = {"test": 'ni\xf1o'} resp, body = self.client.get(path, headers=headers) self.assertEqual(text, resp.text) def test_headers_encoding(self): - value = u'ni\xf1o' + value = 'ni\xf1o' fake_location = b'http://web_server:80/images/fake.img' headers = {"test": value, "none-val": None, @@ -262,7 +262,7 @@ ksarqh = mock_ksarq.call_args[1]['headers'] # Only one Content-Type header (of any text-type) self.assertEqual(1, [encodeutils.safe_decode(key) - for key in ksarqh.keys()].count(u'Content-Type')) + for key in ksarqh.keys()].count('Content-Type')) # And it's the one we set self.assertEqual(b"application/openstack-images-v2.1-json-patch", ksarqh[b"Content-Type"]) @@ -295,7 +295,7 @@ def test_parse_endpoint(self): endpoint = 'http://example.com:9292' - test_client = http.HTTPClient(endpoint, token=u'adc123') + test_client = http.HTTPClient(endpoint, token='adc123') actual = test_client.parse_endpoint(endpoint) expected = parse.SplitResult(scheme='http', netloc='example.com:9292', path='', @@ -304,7 +304,7 @@ def test_get_connections_kwargs_http(self): endpoint = 'http://example.com:9292' - test_client = http.HTTPClient(endpoint, token=u'adc123') + test_client = http.HTTPClient(endpoint, token='adc123') self.assertEqual(600.0, test_client.timeout) def test__chunk_body_exact_size_chunk(self): @@ -321,7 +321,7 @@ path = '/v1/images/' self.mock.post(self.endpoint + path, text=text) - headers = {"test": u'chunked_request'} + headers = {"test": 'chunked_request'} resp, body = self.client.post(path, headers=headers, data=data) self.assertIsInstance(self.mock.last_request.body, types.GeneratorType) self.assertEqual(text, resp.text) @@ -332,7 +332,7 @@ text = 'OK' self.mock.post(self.endpoint + path, text=text) - headers = {"test": u'chunked_request'} + headers = {"test": 'chunked_request'} resp, body = self.client.post(path, headers=headers, data=data) self.assertEqual(text, resp.text) @@ -487,7 +487,7 @@ headers = self.mock.last_request.headers self.assertEqual(refreshed_token, headers['X-Auth-Token']) # regression check for bug 1448080 - unicode_token = u'ni\xf1o+==' + unicode_token = 'ni\xf1o+==' http_client.auth_token = unicode_token http_client.get(path) headers = self.mock.last_request.headers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/test_shell.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/test_shell.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/test_shell.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/test_shell.py 2023-02-17 11:31:32.000000000 +0100 @@ -45,6 +45,7 @@ DEFAULT_IMAGE_URL = 'http://127.0.0.1:9292/' DEFAULT_IMAGE_URL_INTERNAL = 'http://127.0.0.1:9191/' DEFAULT_USERNAME = 'username' +DEFAULT_PAGE_SIZE = 200 DEFAULT_PASSWORD = 'password' DEFAULT_TENANT_ID = 'tenant_id' DEFAULT_TENANT_NAME = 'tenant_name' @@ -711,7 +712,8 @@ glance_shell = openstack_shell.OpenStackImagesShell() glance_shell.main(args.split()) self.assertEqual(self.requests.request_history[2].url, - self.image_url + "v2/images?limit=200&" + self.image_url + "v2/images?" + f"limit={DEFAULT_PAGE_SIZE}&" "sort_key=name&sort_dir=asc") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/test_utils.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/test_utils.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/test_utils.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/test_utils.py 2023-02-17 11:31:32.000000000 +0100 @@ -122,7 +122,7 @@ # test for removing 'u' from lists in print_list output columns = ['ID', 'Tags'] images = [Struct(**{'id': 'b8e1c57e-907a-4239-aed8-0df8e54b8d2d', - 'tags': [u'Name1', u'Tag_123', u'veeeery long']})] + 'tags': ['Name1', 'Tag_123', 'veeeery long']})] saved_stdout = sys.stdout try: sys.stdout = output_list = io.StringIO() @@ -178,12 +178,6 @@ ''', output_list.getvalue()) - def test_unicode_key_value_to_string(self): - src = {u'key': u'\u70fd\u7231\u5a77'} - # u'xxxx' in PY3 is str, we will not get extra 'u' from cli - # output in PY3 - self.assertEqual(src, utils.unicode_key_value_to_string(src)) - def test_schema_args_with_list_types(self): # NOTE(flaper87): Regression for bug # https://bugs.launchpad.net/python-glanceclient/+bug/1401032 @@ -236,6 +230,14 @@ self.assertEqual(encodeutils.safe_decode, opts['type']) self.assertIn('None, opt-1, opt-2', opts['help']) + # Make sure we use strict checking for boolean values. + decorated = utils.schema_args(schema_getter('boolean'))(dummy_func) + arg, opts = decorated.__dict__['arguments'][0] + type_function = opts['type'] + self.assertEqual(type_function('False'), False) + self.assertEqual(type_function('True'), True) + self.assertRaises(ValueError, type_function, 'foo') + def test_iterable_closes(self): # Regression test for bug 1461678. def _iterate(i): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/v1/test_images.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/v1/test_images.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/v1/test_images.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/v1/test_images.py 2023-02-17 11:31:32.000000000 +0100 @@ -25,6 +25,9 @@ from glanceclient.v1 import shell +DEFAULT_PAGE_SIZE = 20 + + fixtures = { '/v1/images': { 'POST': ( @@ -67,7 +70,7 @@ ]}, ), }, - '/v1/images/detail?is_public=None&limit=20': { + f'/v1/images/detail?is_public=None&limit={DEFAULT_PAGE_SIZE}': { 'GET': ( {'x-openstack-request-id': 'req-1234'}, {'images': [ @@ -157,7 +160,7 @@ ]}, ), }, - '/v1/images/detail?limit=20&marker=a': { + f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&marker=a': { 'GET': ( {}, {'images': [ @@ -227,7 +230,7 @@ ]}, ), }, - '/v1/images/detail?limit=20&name=foo': { + f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&name=foo': { 'GET': ( {}, {'images': [ @@ -244,7 +247,7 @@ ]}, ), }, - '/v1/images/detail?limit=20&property-ping=pong': + f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&property-ping=pong': { 'GET': ( {}, @@ -257,7 +260,7 @@ ]}, ), }, - '/v1/images/detail?limit=20&sort_dir=desc': { + f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&sort_dir=desc': { 'GET': ( {}, {'images': [ @@ -274,7 +277,7 @@ ]}, ), }, - '/v1/images/detail?limit=20&sort_key=name': { + f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&sort_key=name': { 'GET': ( {}, {'images': [ @@ -467,31 +470,31 @@ def test_list_with_marker(self): list(self.mgr.list(marker='a')) - url = '/v1/images/detail?limit=20&marker=a' + url = f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&marker=a' expect = [('GET', url, {}, None)] self.assertEqual(expect, self.api.calls) def test_list_with_filter(self): list(self.mgr.list(filters={'name': "foo"})) - url = '/v1/images/detail?limit=20&name=foo' + url = f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&name=foo' expect = [('GET', url, {}, None)] self.assertEqual(expect, self.api.calls) def test_list_with_property_filters(self): list(self.mgr.list(filters={'properties': {'ping': 'pong'}})) - url = '/v1/images/detail?limit=20&property-ping=pong' + url = f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&property-ping=pong' expect = [('GET', url, {}, None)] self.assertEqual(expect, self.api.calls) def test_list_with_sort_dir(self): list(self.mgr.list(sort_dir='desc')) - url = '/v1/images/detail?limit=20&sort_dir=desc' + url = f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&sort_dir=desc' expect = [('GET', url, {}, None)] self.assertEqual(expect, self.api.calls) def test_list_with_sort_key(self): list(self.mgr.list(sort_key='name')) - url = '/v1/images/detail?limit=20&sort_key=name' + url = f'/v1/images/detail?limit={DEFAULT_PAGE_SIZE}&sort_key=name' expect = [('GET', url, {}, None)] self.assertEqual(expect, self.api.calls) @@ -504,7 +507,7 @@ self.assertEqual(False, image.is_public) self.assertEqual(False, image.protected) self.assertEqual(False, image.deleted) - self.assertEqual({u'arch': u'x86_64'}, image.properties) + self.assertEqual({'arch': 'x86_64'}, image.properties) def test_get_int(self): image = self.mgr.get(1) @@ -515,7 +518,7 @@ self.assertEqual(False, image.is_public) self.assertEqual(False, image.protected) self.assertEqual(False, image.deleted) - self.assertEqual({u'arch': u'x86_64'}, image.properties) + self.assertEqual({'arch': 'x86_64'}, image.properties) def test_get_encoding(self): image = self.mgr.get('3') @@ -748,7 +751,7 @@ self.assertEqual(value, headers["name"]) def test_image_list_with_owner(self): - images = self.mgr.list(owner='A', page_size=20) + images = self.mgr.list(owner='A', page_size=DEFAULT_PAGE_SIZE) image_list = list(images) self.assertEqual('A', image_list[0].owner) self.assertEqual('a', image_list[0].id) @@ -764,11 +767,11 @@ self.assertEqual(['req-1234'], fields['return_req_id']) def test_image_list_with_notfound_owner(self): - images = self.mgr.list(owner='X', page_size=20) + images = self.mgr.list(owner='X', page_size=DEFAULT_PAGE_SIZE) self.assertEqual(0, len(list(images))) def test_image_list_with_empty_string_owner(self): - images = self.mgr.list(owner='', page_size=20) + images = self.mgr.list(owner='', page_size=DEFAULT_PAGE_SIZE) image_list = list(images) self.assertRaises(AttributeError, lambda: image_list[0].owner) self.assertEqual('c', image_list[0].id) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_client_requests.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_client_requests.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_client_requests.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_client_requests.py 2023-02-17 11:31:32.000000000 +0100 @@ -25,6 +25,9 @@ from glanceclient.v2.image_schema import _BASE_SCHEMA +DEFAULT_PAGE_SIZE = 200 + + class ClientTestRequests(testutils.TestCase): """Client tests using the requests mock library.""" @@ -35,7 +38,8 @@ self.requests = self.useFixture(rm_fixture.Fixture()) self.requests.get('http://example.com/v2/schemas/image', json=schema_fixture) - self.requests.get('http://example.com/v2/images?limit=200', + self.requests.get('http://example.com/v2/images?' + f'limit={DEFAULT_PAGE_SIZE}', json=image_list_fixture) gc = client.Client(2.2, "http://example.com/v2.1") images = gc.images.list() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_images.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_images.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_images.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_images.py 2023-02-17 11:31:32.000000000 +0100 @@ -550,10 +550,10 @@ { 'id': 'a2b83adc-888e-11e3-8872-78acc0b951d8', 'name': 'image-location-tests', - 'locations': [{u'url': u'http://foo.com/', - u'metadata': {u'foo': u'foometa'}}, - {u'url': u'http://bar.com/', - u'metadata': {u'bar': u'barmeta'}}], + 'locations': [{'url': 'http://foo.com/', + 'metadata': {'foo': 'foometa'}}, + {'url': 'http://bar.com/', + 'metadata': {'bar': 'barmeta'}}], }, ), 'PATCH': ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_metadefs_namespaces.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_metadefs_namespaces.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_metadefs_namespaces.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_metadefs_namespaces.py 2023-02-17 11:31:32.000000000 +0100 @@ -19,6 +19,7 @@ from glanceclient.tests import utils from glanceclient.v2 import metadefs +DEFAULT_PAGE_SIZE = 20 NAMESPACE1 = 'Namespace1' NAMESPACE2 = 'Namespace2' NAMESPACE3 = 'Namespace3' @@ -60,7 +61,7 @@ data_fixtures = { - "/v2/metadefs/namespaces?limit=20": { + f"/v2/metadefs/namespaces?limit={DEFAULT_PAGE_SIZE}": { "GET": ( {}, { @@ -112,7 +113,7 @@ } ) }, - "/v2/metadefs/namespaces?limit=20&sort_dir=asc": { + f"/v2/metadefs/namespaces?limit={DEFAULT_PAGE_SIZE}&sort_dir=asc": { "GET": ( {}, { @@ -124,7 +125,7 @@ } ) }, - "/v2/metadefs/namespaces?limit=20&sort_key=created_at": { + f"/v2/metadefs/namespaces?limit={DEFAULT_PAGE_SIZE}&sort_key=created_at": { "GET": ( {}, { @@ -136,7 +137,8 @@ } ) }, - "/v2/metadefs/namespaces?limit=20&resource_types=%s" % RESOURCE_TYPE1: { + "/v2/metadefs/namespaces?limit=%d&resource_types=%s" % ( + DEFAULT_PAGE_SIZE, RESOURCE_TYPE1): { "GET": ( {}, { @@ -148,8 +150,8 @@ } ) }, - "/v2/metadefs/namespaces?limit=20&resource_types=" - "%s%%2C%s" % (RESOURCE_TYPE1, RESOURCE_TYPE2): { + "/v2/metadefs/namespaces?limit=%d&resource_types=" + "%s%%2C%s" % (DEFAULT_PAGE_SIZE, RESOURCE_TYPE1, RESOURCE_TYPE2): { "GET": ( {}, { @@ -161,7 +163,7 @@ } ) }, - "/v2/metadefs/namespaces?limit=20&visibility=private": { + f"/v2/metadefs/namespaces?limit={DEFAULT_PAGE_SIZE}&visibility=private": { "GET": ( {}, { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_shell_v2.py new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_shell_v2.py --- old/python-glanceclient-4.2.0/glanceclient/tests/unit/v2/test_shell_v2.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/glanceclient/tests/unit/v2/test_shell_v2.py 2023-02-17 11:31:32.000000000 +0100 @@ -854,7 +854,7 @@ @mock.patch('sys.stdin', autospec=True) def test_do_image_create_with_unicode(self, mock_stdin): - name = u'\u041f\u0420\u0418\u0412\u0415\u0422\u0418\u041a' + name = '\u041f\u0420\u0418\u0412\u0415\u0422\u0418\u041a' args = self._make_args({'name': name, 'file': None}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/python_glanceclient.egg-info/PKG-INFO new/python-glanceclient-4.3.0/python_glanceclient.egg-info/PKG-INFO --- old/python-glanceclient-4.2.0/python_glanceclient.egg-info/PKG-INFO 2022-11-16 14:50:20.000000000 +0100 +++ new/python-glanceclient-4.3.0/python_glanceclient.egg-info/PKG-INFO 2023-02-17 11:32:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: python-glanceclient -Version: 4.2.0 +Version: 4.3.0 Summary: OpenStack Image API Client Library Home-page: https://docs.openstack.org/python-glanceclient/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/python_glanceclient.egg-info/SOURCES.txt new/python-glanceclient-4.3.0/python_glanceclient.egg-info/SOURCES.txt --- old/python-glanceclient-4.2.0/python_glanceclient.egg-info/SOURCES.txt 2022-11-16 14:50:20.000000000 +0100 +++ new/python-glanceclient-4.3.0/python_glanceclient.egg-info/SOURCES.txt 2023-02-17 11:32:00.000000000 +0100 @@ -121,8 +121,10 @@ releasenotes/notes/2.17.0_Release-c67392be3b428d10.yaml releasenotes/notes/3.1.0_Release-1337ddc753b88905.yaml releasenotes/notes/3.6.0_Release-04d3b5017747290b.yaml +releasenotes/notes/4.3.0_Release-1a7acbd472e16c72.yaml releasenotes/notes/add-member-get-command-11c15e0a94ecd39a.yaml releasenotes/notes/add-support-for-glance-download-import-method-10525254db3e8e7a.yaml +releasenotes/notes/boolean-properties-strict-checking-bdd624b5da81e723.yaml releasenotes/notes/bp-use-keystoneauth-e12f300e58577b13.yaml releasenotes/notes/check-for-md5-59db8fd67870b214.yaml releasenotes/notes/copy-existing-image-619b7e6bc3394446.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/python_glanceclient.egg-info/pbr.json new/python-glanceclient-4.3.0/python_glanceclient.egg-info/pbr.json --- old/python-glanceclient-4.2.0/python_glanceclient.egg-info/pbr.json 2022-11-16 14:50:20.000000000 +0100 +++ new/python-glanceclient-4.3.0/python_glanceclient.egg-info/pbr.json 2023-02-17 11:32:00.000000000 +0100 @@ -1 +1 @@ -{"git_version": "f41f2c3", "is_release": true} \ No newline at end of file +{"git_version": "52fb6b2", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/releasenotes/notes/4.3.0_Release-1a7acbd472e16c72.yaml new/python-glanceclient-4.3.0/releasenotes/notes/4.3.0_Release-1a7acbd472e16c72.yaml --- old/python-glanceclient-4.2.0/releasenotes/notes/4.3.0_Release-1a7acbd472e16c72.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-glanceclient-4.3.0/releasenotes/notes/4.3.0_Release-1a7acbd472e16c72.yaml 2023-02-17 11:31:32.000000000 +0100 @@ -0,0 +1,9 @@ +--- +fixes: + - | + Bug 911805_: Scriptify the generation of man pages + - | + Bug 1561828_: unallowed and read-only parameters in namspace and resouce_type + + .. _911805: https://code.launchpad.net/bugs/911805 + .. _1561828: https://code.launchpad.net/bugs/1561828 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/releasenotes/notes/boolean-properties-strict-checking-bdd624b5da81e723.yaml new/python-glanceclient-4.3.0/releasenotes/notes/boolean-properties-strict-checking-bdd624b5da81e723.yaml --- old/python-glanceclient-4.2.0/releasenotes/notes/boolean-properties-strict-checking-bdd624b5da81e723.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-glanceclient-4.3.0/releasenotes/notes/boolean-properties-strict-checking-bdd624b5da81e723.yaml 2023-02-17 11:31:32.000000000 +0100 @@ -0,0 +1,12 @@ +--- +prelude: > +fixes: + - | + * Bug 1607317_: metadata def namespace update CLI is not working as expected for parameter "protected" + + .. _1607317: https://code.launchpad.net/bugs/1607317 +other: + - | + Boolean arguments now expect one of the following values: '0', '1', 'f', + 'false', 'n', 'no', 'off', 'on', 't', 'true', 'y', 'yes' + (case-insensitive). This will not change anything for most users. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/releasenotes/source/conf.py new/python-glanceclient-4.3.0/releasenotes/source/conf.py --- old/python-glanceclient-4.2.0/releasenotes/source/conf.py 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/releasenotes/source/conf.py 2023-02-17 11:31:32.000000000 +0100 @@ -55,8 +55,8 @@ master_doc = 'index' # General information about the project. -project = u'glanceclient Release Notes' -copyright = u'2016, Glance Developers' +project = 'glanceclient Release Notes' +copyright = '2016, Glance Developers' openstackdocs_repo_name = 'openstack/python-glanceclient' openstackdocs_bug_project = 'python-glanceclient' @@ -206,8 +206,8 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'glanceclientReleaseNotes.tex', - u'glanceclient Release Notes Documentation', - u'Glance Developers', 'manual'), + 'glanceclient Release Notes Documentation', + 'Glance Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -237,8 +237,8 @@ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'glanceclientreleasenotes', - u'glanceclient Release Notes Documentation', - [u'Glance Developers'], 1) + 'glanceclient Release Notes Documentation', + ['Glance Developers'], 1) ] # If true, show URL addresses after external links. @@ -252,8 +252,8 @@ # dir menu entry, description, category) texinfo_documents = [ ('index', 'glanceclientReleaseNotes', - u'glanceclient Release Notes Documentation', - u'Glance Developers', 'glanceclientReleaseNotes', + 'glanceclient Release Notes Documentation', + 'Glance Developers', 'glanceclientReleaseNotes', 'Python bindings for the OpenStack Image service.', 'Miscellaneous'), ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-glanceclient-4.2.0/tox.ini new/python-glanceclient-4.3.0/tox.ini --- old/python-glanceclient-4.2.0/tox.ini 2022-11-16 14:49:52.000000000 +0100 +++ new/python-glanceclient-4.3.0/tox.ini 2023-02-17 11:31:32.000000000 +0100 @@ -54,7 +54,9 @@ [testenv:docs] basepython = python3 -deps = -r{toxinidir}/doc/requirements.txt +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html sphinx-build -W -b man doc/source doc/build/man