Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-oslo.utils for openSUSE:Factory checked in at 2021-12-12 00:57:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-oslo.utils (Old) and /work/SRC/openSUSE:Factory/.python-oslo.utils.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.utils" Sun Dec 12 00:57:38 2021 rev:25 rq:939542 version:4.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-oslo.utils/python-oslo.utils.changes 2021-05-10 15:39:53.625438103 +0200 +++ /work/SRC/openSUSE:Factory/.python-oslo.utils.new.2520/python-oslo.utils.changes 2021-12-12 00:57:49.390593179 +0100 @@ -1,0 +2,20 @@ +Tue Oct 26 22:03:39 UTC 2021 - cloud-de...@suse.de + +- update to version 4.10.0 + - Switch to collections.abc.* + - Deprecate the fnmatch module. + - Ussuri+ is python3 only and update python to python3 + - Remove references to 'sys.version_info' + - Dropping lower constraints testing + - QemuImgInfo: Skip deprecation warning when output is not passed + - Deprecate the human format on QemuImgInfo + - Add Python3 xena unit tests + - Move flake8 as a pre-commit local target. + - Drop lower-constraints + - Drop warnings enable filter + - Update master for stable/wallaby + - Address nits from six removal patch + - Modify UUID sentinel to support keystone-like UUIDs + - strutils: Stop masking encryption_key_id + +------------------------------------------------------------------- Old: ---- oslo.utils-4.8.0.tar.gz New: ---- oslo.utils-4.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-oslo.utils.spec ++++++ --- /var/tmp/diff_new_pack.tseCjF/_old 2021-12-12 00:57:50.898594214 +0100 +++ /var/tmp/diff_new_pack.tseCjF/_new 2021-12-12 00:57:50.902594217 +0100 @@ -17,13 +17,13 @@ Name: python-oslo.utils -Version: 4.8.0 +Version: 4.10.0 Release: 0 Summary: OpenStack Utils Library License: Apache-2.0 Group: Development/Languages/Python URL: https://docs.openstack.org/oslo.utils -Source0: https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-4.8.0.tar.gz +Source0: https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-4.10.0.tar.gz BuildRequires: openstack-macros BuildRequires: python3-Babel BuildRequires: python3-ddt @@ -74,7 +74,7 @@ Documentation for OpenStack utils library. %prep -%autosetup -p1 -n oslo.utils-4.8.0 +%autosetup -p1 -n oslo.utils-4.10.0 %py_req_cleanup @@ -85,7 +85,7 @@ %py3_install # generate html docs -PBR_VERSION=4.8.0 %sphinx_build -b html doc/source doc/build/html +PBR_VERSION=4.10.0 %sphinx_build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} ++++++ _service ++++++ --- /var/tmp/diff_new_pack.tseCjF/_old 2021-12-12 00:57:50.926594234 +0100 +++ /var/tmp/diff_new_pack.tseCjF/_new 2021-12-12 00:57:50.926594234 +0100 @@ -1,16 +1,13 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/wallaby/openstack/oslo.utils/oslo.utils.spec.j2</param> + <param name="input-template">https://opendev.org/openstack/rpm-packaging/raw/master/openstack/oslo.utils/oslo.utils.spec.j2</param> <param name="output-name">python-oslo.utils.spec</param> - <param name="requirements">https://opendev.org/openstack/oslo.utils/raw/branch/stable/wallaby/requirements.txt</param> + <param name="requirements">https://opendev.org/openstack/oslo.utils/raw/master/requirements.txt</param> <param name="changelog-email">cloud-de...@suse.de</param> <param name="changelog-provider">gh,openstack,oslo.utils</param> </service> <service mode="disabled" name="download_files"> <param name="changesgenerate">enable</param> </service> - <service name="refresh_patches" mode="disabled"> - <param name="changesgenerate">enable</param> - </service> <service name="format_spec_file" mode="disabled"/> </services> ++++++ oslo.utils-4.8.0.tar.gz -> oslo.utils-4.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/.pre-commit-config.yaml new/oslo.utils-4.10.0/.pre-commit-config.yaml --- old/oslo.utils-4.8.0/.pre-commit-config.yaml 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/.pre-commit-config.yaml 2021-08-19 14:35:10.000000000 +0200 @@ -9,7 +9,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: ebc15addedad713c86ef18ae9632c88e187dd0af # v3.1.0 + rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0 hooks: - id: trailing-whitespace # Replaces or checks mixed line ending @@ -27,9 +27,13 @@ - id: debug-statements - id: check-yaml files: .*\.(yaml|yml)$ - - repo: https://gitlab.com/pycqa/flake8 - rev: 181bb46098dddf7e2d45319ea654b4b4d58c2840 # 3.8.3 + - repo: local hooks: - id: flake8 + name: flake8 additional_dependencies: - hacking>=3.0.1,<3.1.0 + language: python + entry: flake8 + files: '^.*\.py$' + exclude: '^(doc|releasenotes|tools)/.*$' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/.zuul.yaml new/oslo.utils-4.10.0/.zuul.yaml --- old/oslo.utils-4.8.0/.zuul.yaml 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/.zuul.yaml 2021-08-19 14:35:10.000000000 +0200 @@ -2,7 +2,7 @@ templates: - check-requirements - lib-forward-testing-python3 - - openstack-python3-wallaby-jobs + - openstack-python3-xena-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/AUTHORS new/oslo.utils-4.10.0/AUTHORS --- old/oslo.utils-4.8.0/AUTHORS 2021-02-16 10:02:17.000000000 +0100 +++ new/oslo.utils-4.10.0/AUTHORS 2021-08-19 14:35:45.000000000 +0200 @@ -8,6 +8,7 @@ Alessio Ababilov <aababi...@griddynamics.com> Alex Gaynor <alex.gay...@gmail.com> Alexander Gorodnev <agorod...@mirantis.com> +Alexey Stupnikov <aleksey.stupni...@gmail.com> Alexis Lee <lx...@hpe.com> Alfredo Moralejo <amora...@redhat.com> Alvaro Lopez Garcia <al...@ifca.unican.es> @@ -38,6 +39,7 @@ C??dric Jeanneret <cjean...@redhat.com> Dan Prince <dpri...@redhat.com> Dan Smith <da...@us.ibm.com> +Daniel Bengtsson <dbe...@redhat.com> Dariusz Smigiel <smigiel.dari...@gmail.com> Davanum Srinivas <dava...@gmail.com> Davanum Srinivas <d...@linux.vnet.ibm.com> @@ -124,10 +126,12 @@ Sirisha Devineni <sirisha_devin...@persistent.co.in> Stanislav Kudriashev <skudrias...@griddynamics.com> Stephen Finucane <sfinu...@redhat.com> +Stephen Finucane <stephen...@redhat.com> Steve Martinelli <steve...@ca.ibm.com> Steven Hardy <sha...@redhat.com> Suraj Deshmukh <surajssd009...@gmail.com> Swapnil Kulkarni (coolsvap) <m...@coolsvap.net> +Takashi Kajinami <tkaji...@redhat.com> Timur Sufiev <tsuf...@mirantis.com> Tony Breeds <t...@bakeyournoodle.com> Tovin Seven <vin...@vn.fujitsu.com> @@ -151,6 +155,7 @@ bhagyashris <bhagyashri.shew...@nttdata.com> caoyuan <cao.y...@99cloud.net> changxun <zho...@dtdream.com> +dengzhaosen <dengzhao...@inspur.com> dharmendra <dharmendra.kushw...@nectechnologies.in> ekudryashova <ekudryash...@mirantis.com> gecong1973 <ge.c...@zte.com.cn> @@ -168,8 +173,10 @@ pengyuesheng <pengyuesh...@gohighsec.com> pran1990 <pranes...@gmail.com> ricolin <rico....@easystack.cn> +songwenping <songwenp...@inspur.com> sridhargaddam <sridhar.gad...@enovance.com> sunyandi <su...@inspur.com> +yatinkarel <yka...@redhat.com> yenai <ye...@cmss.chinamobile.com> zhangboye <zhangb...@inspur.com> zhangsong <zhangs...@cmss.chinamobile.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/ChangeLog new/oslo.utils-4.10.0/ChangeLog --- old/oslo.utils-4.8.0/ChangeLog 2021-02-16 10:02:17.000000000 +0100 +++ new/oslo.utils-4.10.0/ChangeLog 2021-08-19 14:35:45.000000000 +0200 @@ -1,12 +1,43 @@ CHANGES ======= +4.10.0 +------ + +* Modify UUID sentinel to support keystone-like UUIDs + +4.9.2 +----- + +* QemuImgInfo: Skip deprecation warning when output is not passed +* Drop warnings enable filter + +4.9.1 +----- + +* Remove references to 'sys.version\_info' +* Deprecate the fnmatch module +* Deprecate the human format on QemuImgInfo +* Ussuri+ is python3 only and update python to python3 +* Dropping lower constraints testing + +4.9.0 +----- + +* Drop lower-constraints +* Move flake8 as a pre-commit local target +* Add Python3 xena unit tests +* Update master for stable/wallaby + 4.8.0 ----- * Add a \`\`strict\`\` flag allowing users to restrict validation of IPv4 format +* Address nits from six removal patch +* Switch to collections.abc.\* * Use TOX\_CONSTRAINTS\_FILE * Dropping lower constraints testing +* strutils: Stop masking encryption\_key\_id * Use TOX\_CONSTRAINTS\_FILE * Use py3 as the default runtime for tox * Remove all usage of six library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/PKG-INFO new/oslo.utils-4.10.0/PKG-INFO --- old/oslo.utils-4.8.0/PKG-INFO 2021-02-16 10:02:17.815975400 +0100 +++ new/oslo.utils-4.10.0/PKG-INFO 2021-08-19 14:35:45.859989400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: oslo.utils -Version: 4.8.0 +Version: 4.10.0 Summary: Oslo Utility library Home-page: https://docs.openstack.org/oslo.utils/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/lower-constraints.txt new/oslo.utils-4.10.0/lower-constraints.txt --- old/oslo.utils-4.8.0/lower-constraints.txt 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/lower-constraints.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -appdirs==1.3.0 -Babel==2.3.4 -bandit==1.4.0 -coverage==4.0 -ddt==1.0.1 -debtcollector==1.2.0 -eventlet==0.18.2 -extras==1.0.0 -fixtures==3.0.0 -funcsigs==1.0.0 -gitdb==0.6.4 -GitPython==1.0.1 -iso8601==0.1.11 -keystoneauth1==3.4.0 -linecache2==1.0.0 -netaddr==0.7.18 -netifaces==0.10.4 -os-client-config==1.28.0 -oslo.config==5.2.0 -oslo.i18n==3.15.3 -oslotest==3.2.0 -packaging==20.4 -pbr==2.0.0 -pyparsing==2.1.0 -python-mimeparse==1.6.0 -python-subunit==1.0.0 -pytz==2013.6 -PyYAML==3.13 -requests==2.14.2 -requestsexceptions==1.2.0 -rfc3986==0.3.1 -smmap==0.9.0 -stestr==2.0.0 -stevedore==1.20.0 -testscenarios==0.4 -testtools==2.2.0 -traceback2==1.4.0 -unittest2==1.1.0 -wrapt==1.7.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo.utils.egg-info/PKG-INFO new/oslo.utils-4.10.0/oslo.utils.egg-info/PKG-INFO --- old/oslo.utils-4.8.0/oslo.utils.egg-info/PKG-INFO 2021-02-16 10:02:17.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo.utils.egg-info/PKG-INFO 2021-08-19 14:35:45.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: oslo.utils -Version: 4.8.0 +Version: 4.10.0 Summary: Oslo Utility library Home-page: https://docs.openstack.org/oslo.utils/latest/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo.utils.egg-info/SOURCES.txt new/oslo.utils-4.10.0/oslo.utils.egg-info/SOURCES.txt --- old/oslo.utils-4.8.0/oslo.utils.egg-info/SOURCES.txt 2021-02-16 10:02:17.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo.utils.egg-info/SOURCES.txt 2021-08-19 14:35:45.000000000 +0200 @@ -10,7 +10,6 @@ LICENSE README.rst bindep.txt -lower-constraints.txt requirements.txt setup.cfg setup.py @@ -79,7 +78,6 @@ oslo_utils/tests/test_excutils.py oslo_utils/tests/test_fileutils.py oslo_utils/tests/test_fixture.py -oslo_utils/tests/test_fnmatch.py oslo_utils/tests/test_imageutils.py oslo_utils/tests/test_importutils.py oslo_utils/tests/test_netutils.py @@ -99,8 +97,11 @@ releasenotes/notes/add-reno-350f5f34f794fb5e.yaml releasenotes/notes/allow-to-convert-ipv4-address-from-text-to-binary-8c46ad2d9989e8c5.yaml releasenotes/notes/bump-up-port-range-f774a16336158339.yaml +releasenotes/notes/deprecate-fnmatch-057a092d434a0c53.yaml +releasenotes/notes/drop-imageutils-human-format-support-a89101a36c4dd3cb.yaml releasenotes/notes/drop-python27-support-f97f680651693b47.yaml releasenotes/notes/image-utils-handle-scientific-notation-6f65d46e9c8c8f8c.yaml +releasenotes/notes/introduce-keystoneidsentinel-16bf3e7f2ae7e9f3.yaml releasenotes/notes/mask-dict-passwords-99357ffb7972fb0b.yaml releasenotes/notes/mask-password-patterns-f41524069b8ae488.yaml releasenotes/notes/netutils-get_mac_addr_by_ipv6-c3ce6a35a69f7c2b.yaml @@ -116,6 +117,7 @@ releasenotes/source/unreleased.rst releasenotes/source/ussuri.rst releasenotes/source/victoria.rst +releasenotes/source/wallaby.rst releasenotes/source/_static/.placeholder releasenotes/source/_templates/.placeholder releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo.utils.egg-info/pbr.json new/oslo.utils-4.10.0/oslo.utils.egg-info/pbr.json --- old/oslo.utils-4.8.0/oslo.utils.egg-info/pbr.json 2021-02-16 10:02:17.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo.utils.egg-info/pbr.json 2021-08-19 14:35:45.000000000 +0200 @@ -1 +1 @@ -{"git_version": "3288539", "is_release": true} \ No newline at end of file +{"git_version": "2c74bb9", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/dictutils.py new/oslo.utils-4.10.0/oslo_utils/dictutils.py --- old/oslo.utils-4.8.0/oslo_utils/dictutils.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/dictutils.py 2021-08-19 14:35:10.000000000 +0200 @@ -20,10 +20,10 @@ :param d: dictionaries which may be nested :param separator: symbol between names """ - for name, value in sorted(iter(d.items())): + for name, value in sorted(d.items()): if isinstance(value, dict): for subname, subvalue in flatten_dict_to_keypairs(value, separator): - yield ('%s%s%s' % (name, separator, subname), subvalue) + yield '%s%s%s' % (name, separator, subname), subvalue else: yield name, value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/fixture.py new/oslo.utils-4.10.0/oslo_utils/fixture.py --- old/oslo.utils-4.8.0/oslo_utils/fixture.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/fixture.py 2021-08-19 14:35:10.000000000 +0200 @@ -55,7 +55,8 @@ class _UUIDSentinels(object): - """Registry of dynamically created, named, random UUID strings. + """Registry of dynamically created, named, random UUID strings in regular + (with hyphens) and similar to some keystone IDs (without hyphens) formats. An instance of this class will dynamically generate attributes as they are referenced, associating a random UUID string with each. Thereafter, @@ -65,6 +66,7 @@ Usage:: from oslo_utils.fixture import uuidsentinel as uuids + from oslo_utils.fixture import keystoneidsentinel as keystids ... foo = uuids.foo do_a_thing(foo) @@ -72,17 +74,22 @@ assert foo == uuids.foo # But a different one will be different assert foo != uuids.bar + # Same approach is valid for keystoneidsentinel: + data = create_some_data_structure(keystids.bar, var1, var2, var3) + assert extract_bar(data) == keystids.bar """ - def __init__(self): + def __init__(self, is_dashed=True): self._sentinels = {} self._lock = threading.Lock() + self.is_dashed = is_dashed def __getattr__(self, name): if name.startswith('_'): raise AttributeError('Sentinels must not start with _') with self._lock: if name not in self._sentinels: - self._sentinels[name] = uuidutils.generate_uuid() + self._sentinels[name] = uuidutils.generate_uuid( + dashed=self.is_dashed) return self._sentinels[name] @@ -90,3 +97,4 @@ # same process (including across multiple modules) will result in the same # values uuidsentinel = _UUIDSentinels() +keystoneidsentinel = _UUIDSentinels(is_dashed=False) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/fnmatch.py new/oslo.utils-4.10.0/oslo_utils/fnmatch.py --- old/oslo.utils-4.8.0/oslo_utils/fnmatch.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/fnmatch.py 2021-08-19 14:35:10.000000000 +0200 @@ -12,65 +12,19 @@ """Thread safe fnmatch re-implementation. -Standard library fnmatch in Python versions <= 2.7.9 has thread safe -issue, this module is created for such case. see: -https://bugs.python.org/issue23191 - .. versionadded:: 3.3 """ import fnmatch as standard_fnmatch -import os -import posixpath -import re -import sys - - -if sys.version_info > (2, 7, 9): - fnmatch = standard_fnmatch.fnmatch - fnmatchcase = standard_fnmatch.fnmatchcase - filter = standard_fnmatch.filter - translate = standard_fnmatch.translate -else: - _MATCH_CACHE = {} - _MATCH_CACHE_MAX = 100 - - translate = standard_fnmatch.translate - - def _get_cached_pattern(pattern): - cached_pattern = _MATCH_CACHE.get(pattern) - if cached_pattern is None: - translated_pattern = translate(pattern) - cached_pattern = re.compile(translated_pattern) - if len(_MATCH_CACHE) >= _MATCH_CACHE_MAX: - _MATCH_CACHE.clear() - _MATCH_CACHE[pattern] = cached_pattern - return cached_pattern - - def fnmatchcase(filename, pattern): - cached_pattern = _get_cached_pattern(pattern) - return cached_pattern.match(filename) is not None - - def fnmatch(filename, pattern): - filename = os.path.normcase(filename) - pattern = os.path.normcase(pattern) - return fnmatchcase(filename, pattern) - - def filter(filenames, pattern): - filtered_filenames = [] - - pattern = os.path.normcase(pattern) - cached_pattern = _get_cached_pattern(pattern) - - if os.path is posixpath: - # normcase on posix is NOP. Optimize it away from the loop. - for filename in filenames: - if cached_pattern.match(filename): - filtered_filenames.append(filename) - else: - for filename in filenames: - norm_name = os.path.normcase(filename) - if cached_pattern.match(norm_name): - filtered_filenames.append(filename) - return filtered_filenames +import debtcollector + +debtcollector.deprecate( + "Using the oslo.utils's 'fnmatch' module is deprecated, " + "please use the stdlib 'fnmatch' module." +) + +fnmatch = standard_fnmatch.fnmatch +fnmatchcase = standard_fnmatch.fnmatchcase +filter = standard_fnmatch.filter +translate = standard_fnmatch.translate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/imageutils.py new/oslo.utils-4.10.0/oslo_utils/imageutils.py --- old/oslo.utils-4.8.0/oslo_utils/imageutils.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/imageutils.py 2021-08-19 14:35:10.000000000 +0200 @@ -28,6 +28,8 @@ import json import re +import debtcollector + from oslo_utils._i18n import _ from oslo_utils import strutils @@ -38,8 +40,11 @@ The instance of :class:`QemuImgInfo` has properties: `image`, `backing_file`, `file_format`, `virtual_size`, `cluster_size`, `disk_size`, `snapshots` and `encrypted`. + The parameter format can be set to 'json' or 'human'. With 'json' format output, qemu image information will be parsed more easily and readable. + However 'human' format support will be dropped in next cycle and only + 'json' format will be supported. Prefer to use 'json' instead of 'human'. """ BACKING_FILE_RE = re.compile((r"^(.*?)\s*\(actual\s+path\s*:" r"\s+(.*?)\)\s*$"), re.I) @@ -61,6 +66,12 @@ self.encrypted = details.get('encrypted') self.format_specific = details.get('format-specific') else: + if cmd_output is not None: + debtcollector.deprecate( + 'The human format is deprecated and the format parameter ' + 'will be removed. Use explicitly json instead', + version="xena", + category=FutureWarning) details = self._parse(cmd_output or '') self.image = details.get('image') self.backing_file = details.get('backing_file') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/netutils.py new/oslo.utils-4.10.0/oslo_utils/netutils.py --- old/oslo.utils-4.8.0/oslo_utils/netutils.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/netutils.py 2021-08-19 14:35:10.000000000 +0200 @@ -310,8 +310,7 @@ .. versionadded:: 3.17 """ m = "[0-9a-f]{2}(:[0-9a-f]{2}){5}$" - return (isinstance(address, str) and - re.match(m, address.lower())) + return isinstance(address, str) and re.match(m, address.lower()) def _is_int_in_range(value, start, end): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/reflection.py new/oslo.utils-4.10.0/oslo_utils/reflection.py --- old/oslo.utils-4.8.0/oslo_utils/reflection.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/reflection.py 2021-08-19 14:35:10.000000000 +0200 @@ -223,8 +223,8 @@ are not included into output. """ sig = get_signature(function) - function_args = list(iter(sig.parameters.keys())) - for param_name, p in iter(sig.parameters.items()): + function_args = list(sig.parameters.keys()) + for param_name, p in sig.parameters.items(): if (p.kind in (Parameter.VAR_POSITIONAL, Parameter.VAR_KEYWORD) or (required_only and p.default is not Parameter.empty)): function_args.remove(param_name) @@ -234,5 +234,6 @@ def accepts_kwargs(function): """Returns ``True`` if function accepts kwargs otherwise ``False``.""" sig = get_signature(function) - return any(p.kind == Parameter.VAR_KEYWORD - for p in iter(sig.parameters.values())) + return any( + p.kind == Parameter.VAR_KEYWORD for p in sig.parameters.values() + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/strutils.py new/oslo.utils-4.10.0/oslo_utils/strutils.py --- old/oslo.utils-4.8.0/oslo_utils/strutils.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/strutils.py 2021-08-19 14:35:10.000000000 +0200 @@ -17,7 +17,7 @@ System-level utilities and helper functions. """ -import collections +import collections.abc import math import re import unicodedata @@ -59,7 +59,7 @@ 'auth_token', 'new_pass', 'auth_password', 'secret_uuid', 'secret', 'sys_pswd', 'token', 'configdrive', 'chappassword', 'encrypted_key', 'private_key', - 'encryption_key_id', 'fernetkey', 'sslkey', 'passphrase', + 'fernetkey', 'sslkey', 'passphrase', 'cephclusterfsid', 'octaviaheartbeatkey', 'rabbitcookie', 'cephmanilaclientkey', 'pacemakerremoteauthkey', 'designaterndckey', 'cephadminkey', 'heatauthencryptionkey', @@ -399,12 +399,12 @@ """ - if not isinstance(dictionary, collections.Mapping): + if not isinstance(dictionary, collections.abc.Mapping): raise TypeError("Expected a Mapping, got %s instead." % type(dictionary)) out = {} for k, v in dictionary.items(): - if isinstance(v, collections.Mapping): + if isinstance(v, collections.abc.Mapping): out[k] = mask_dict_password(v, secret=secret) continue # NOTE(jlvillal): Check to see if anything in the dictionary 'key' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/tests/test_fixture.py new/oslo.utils-4.10.0/oslo_utils/tests/test_fixture.py --- old/oslo.utils-4.8.0/oslo_utils/tests/test_fixture.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/tests/test_fixture.py 2021-08-19 14:35:10.000000000 +0200 @@ -19,6 +19,7 @@ from oslotest import base as test_base from oslo_utils import fixture +from oslo_utils.fixture import keystoneidsentinel as keystids from oslo_utils.fixture import uuidsentinel as uuids from oslo_utils import timeutils from oslo_utils import uuidutils @@ -71,13 +72,20 @@ uuid1 = uuids.foobar uuid2 = uuids.barfoo self.assertNotEqual(uuid1, uuid2) + keystid1 = keystids.foobar + keystid2 = keystids.barfoo + self.assertNotEqual(keystid1, keystid2) def test_returns_uuid(self): self.assertTrue(uuidutils.is_uuid_like(uuids.foo)) + self.assertTrue(uuidutils.is_uuid_like(keystids.foo)) def test_returns_string(self): self.assertIsInstance(uuids.foo, str) + self.assertIsInstance(keystids.foo, str) def test_with_underline_prefix(self): ex = self.assertRaises(AttributeError, getattr, uuids, '_foo') self.assertIn("Sentinels must not start with _", str(ex)) + ex = self.assertRaises(AttributeError, getattr, keystids, '_foo') + self.assertIn("Sentinels must not start with _", str(ex)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/tests/test_fnmatch.py new/oslo.utils-4.10.0/oslo_utils/tests/test_fnmatch.py --- old/oslo.utils-4.8.0/oslo_utils/tests/test_fnmatch.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/tests/test_fnmatch.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,48 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import fnmatch as standard_fnmatch -import ntpath -import posixpath -from unittest import mock - -from oslotest import base - - -fnmatch = None - - -class TestFnmatch(base.BaseTestCase): - - def _test_fnmatch(self): - self.assertFalse(fnmatch.fnmatch("tesX", "Test")) - self.assertTrue(fnmatch.fnmatch("test", "test")) - self.assertFalse(fnmatch.fnmatchcase("test", "Test")) - self.assertTrue(fnmatch.fnmatchcase("test", "test")) - self.assertTrue(fnmatch.fnmatch("testX", "test*")) - self.assertEqual(["Test"], fnmatch.filter(["Test", "TestX"], "Test")) - - def _test_fnmatch_posix_nt(self): - with mock.patch("os.path", new=posixpath): - self.assertFalse(fnmatch.fnmatch("test", "Test")) - self._test_fnmatch() - with mock.patch("os.path", new=ntpath): - self._test_fnmatch() - self.assertTrue(fnmatch.fnmatch("test", "Test")) - self.assertEqual(["Test"], - fnmatch.filter(["Test", "TestX"], "test")) - - def test_fnmatch(self): - global fnmatch - - fnmatch = standard_fnmatch - self._test_fnmatch_posix_nt() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/tests/test_imageutils.py new/oslo.utils-4.10.0/oslo_utils/tests/test_imageutils.py --- old/oslo.utils-4.8.0/oslo_utils/tests/test_imageutils.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/tests/test_imageutils.py 2021-08-19 14:35:10.000000000 +0200 @@ -13,15 +13,19 @@ # License for the specific language governing permissions and limitations # under the License. +import warnings + from oslotest import base as test_base import testscenarios from oslo_utils import imageutils +from unittest import mock + load_tests = testscenarios.load_tests_apply_scenarios -class ImageUtilsRawTestCase(test_base.BaseTestCase): +class ImageUtilsHumanRawTestCase(test_base.BaseTestCase): _image_name = [ ('disk_config', dict(image_name='disk.config')), @@ -125,7 +129,8 @@ if self.snapshot_count is not None: self.assertEqual(len(image_info.snapshots), self.snapshot_count) - def test_qemu_img_info(self): + @mock.patch('debtcollector.deprecate') + def test_qemu_img_info_human_format(self, mock_deprecate): img_info = self._initialize_img_info() if self.garbage_before_snapshot is True: img_info = img_info + ('blah BLAH: bb',) @@ -134,14 +139,16 @@ if self.garbage_before_snapshot is False: img_info = img_info + ('junk stuff: bbb',) example_output = '\n'.join(img_info) + warnings.simplefilter("always", FutureWarning) image_info = imageutils.QemuImgInfo(example_output) + mock_deprecate.assert_called() self._base_validation(image_info) -ImageUtilsRawTestCase.generate_scenarios() +ImageUtilsHumanRawTestCase.generate_scenarios() -class ImageUtilsQemuTestCase(ImageUtilsRawTestCase): +class ImageUtilsHumanQemuTestCase(ImageUtilsHumanRawTestCase): _file_format = [ ('qcow2', dict(file_format='qcow2')), @@ -180,7 +187,8 @@ cls._qcow2_encrypted, cls._qcow2_backing_file) - def test_qemu_img_info(self): + @mock.patch("debtcollector.deprecate") + def test_qemu_img_info_human_format(self, mock_deprecate): img_info = self._initialize_img_info() img_info = img_info + ('cluster_size: %s' % self.cluster_size,) if self.backing_file is not None: @@ -195,7 +203,9 @@ if self.garbage_before_snapshot is False: img_info = img_info + ('junk stuff: bbb',) example_output = '\n'.join(img_info) + warnings.simplefilter("always", FutureWarning) image_info = imageutils.QemuImgInfo(example_output) + mock_deprecate.assert_called() self._base_validation(image_info) self.assertEqual(image_info.cluster_size, self.exp_cluster_size) if self.backing_file is not None: @@ -205,7 +215,7 @@ self.assertEqual(image_info.encrypted, self.encrypted) -ImageUtilsQemuTestCase.generate_scenarios() +ImageUtilsHumanQemuTestCase.generate_scenarios() class ImageUtilsBlankTestCase(test_base.BaseTestCase): @@ -220,7 +230,8 @@ class ImageUtilsJSONTestCase(test_base.BaseTestCase): - def test_qemu_img_info_json_format(self): + @mock.patch("debtcollector.deprecate") + def test_qemu_img_info(self, mock_deprecate): img_output = '''{ "virtual-size": 41126400, "filename": "fake_img", @@ -230,6 +241,7 @@ "format-specific": {"data": {"foo": "bar"}} }''' image_info = imageutils.QemuImgInfo(img_output, format='json') + mock_deprecate.assert_not_called() self.assertEqual(41126400, image_info.virtual_size) self.assertEqual('fake_img', image_info.image) self.assertEqual(65536, image_info.cluster_size) @@ -237,9 +249,11 @@ self.assertEqual(13168640, image_info.disk_size) self.assertEqual("bar", image_info.format_specific["data"]["foo"]) - def test_qemu_img_info_json_format_blank(self): + @mock.patch("debtcollector.deprecate") + def test_qemu_img_info_blank(self, mock_deprecate): img_output = '{}' image_info = imageutils.QemuImgInfo(img_output, format='json') + mock_deprecate.assert_not_called() self.assertIsNone(image_info.virtual_size) self.assertIsNone(image_info.image) self.assertIsNone(image_info.cluster_size) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/tests/test_reflection.py new/oslo.utils-4.10.0/oslo_utils/tests/test_reflection.py --- old/oslo.utils-4.8.0/oslo_utils/tests/test_reflection.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/tests/test_reflection.py 2021-08-19 14:35:10.000000000 +0200 @@ -22,8 +22,9 @@ from oslo_utils import reflection -RUNTIME_ERROR_CLASSES = ['RuntimeError', 'Exception', - 'BaseException', 'object'] +RUNTIME_ERROR_CLASSES = [ + 'RuntimeError', 'Exception', 'BaseException', 'object', +] def dummy_decorator(f): @@ -187,8 +188,7 @@ def test_static_method(self): name = reflection.get_callable_name(Class.static_method) - self.assertEqual('.'.join((__name__, 'Class', 'static_method')), - name) + self.assertEqual('.'.join((__name__, 'Class', 'static_method')), name) def test_class_method(self): name = reflection.get_callable_name(Class.class_method) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/oslo_utils/tests/test_strutils.py new/oslo.utils-4.10.0/oslo_utils/tests/test_strutils.py --- old/oslo.utils-4.8.0/oslo_utils/tests/test_strutils.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/oslo_utils/tests/test_strutils.py 2021-08-19 14:35:10.000000000 +0200 @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Copyright 2011 OpenStack Foundation. # All Rights Reserved. # @@ -15,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -import collections +import collections.abc import copy import math from unittest import mock @@ -501,9 +499,6 @@ payload = """body: {"rescue": {"password": "1234567"}}""" expected = """body: {"rescue": {"password": "***"}}""" self.assertEqual(expected, strutils.mask_password(payload)) - payload = """body: {"rescue": {"encryption_key_id": "1234567"}}""" - expected = """body: {"rescue": {"encryption_key_id": "***"}}""" - self.assertEqual(expected, strutils.mask_password(payload)) def test_xml_message(self): payload = """<?xml version="1.0" encoding="UTF-8"?> @@ -659,7 +654,7 @@ self.assertEqual(expected, strutils.mask_password(payload)) -class TestMapping(collections.Mapping): +class TestMapping(collections.abc.Mapping): """Test class for non-dict mappings""" def __init__(self): super(TestMapping, self).__init__() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/releasenotes/notes/deprecate-fnmatch-057a092d434a0c53.yaml new/oslo.utils-4.10.0/releasenotes/notes/deprecate-fnmatch-057a092d434a0c53.yaml --- old/oslo.utils-4.8.0/releasenotes/notes/deprecate-fnmatch-057a092d434a0c53.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.utils-4.10.0/releasenotes/notes/deprecate-fnmatch-057a092d434a0c53.yaml 2021-08-19 14:35:10.000000000 +0200 @@ -0,0 +1,5 @@ +--- +deprecations: + - | + Oslo.utils's ``fnmatch`` module is deprecated, please use the stdlib + ``fnmatch`` module which is thread safe for python 3+. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/releasenotes/notes/drop-imageutils-human-format-support-a89101a36c4dd3cb.yaml new/oslo.utils-4.10.0/releasenotes/notes/drop-imageutils-human-format-support-a89101a36c4dd3cb.yaml --- old/oslo.utils-4.8.0/releasenotes/notes/drop-imageutils-human-format-support-a89101a36c4dd3cb.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.utils-4.10.0/releasenotes/notes/drop-imageutils-human-format-support-a89101a36c4dd3cb.yaml 2021-08-19 14:35:10.000000000 +0200 @@ -0,0 +1,5 @@ +--- +deprecations: + - | + Support for parsing the ``human`` format has been deprecated and will + be removed in a future release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/releasenotes/notes/introduce-keystoneidsentinel-16bf3e7f2ae7e9f3.yaml new/oslo.utils-4.10.0/releasenotes/notes/introduce-keystoneidsentinel-16bf3e7f2ae7e9f3.yaml --- old/oslo.utils-4.8.0/releasenotes/notes/introduce-keystoneidsentinel-16bf3e7f2ae7e9f3.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.utils-4.10.0/releasenotes/notes/introduce-keystoneidsentinel-16bf3e7f2ae7e9f3.yaml 2021-08-19 14:35:10.000000000 +0200 @@ -0,0 +1,6 @@ +--- +features: + - | + keystoneidsentinel singleton was introduced to generate + random keystone-like UUIDs. New sentinel could be used in the same + way as existing uuidsentinel. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/releasenotes/source/index.rst new/oslo.utils-4.10.0/releasenotes/source/index.rst --- old/oslo.utils-4.8.0/releasenotes/source/index.rst 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/releasenotes/source/index.rst 2021-08-19 14:35:10.000000000 +0200 @@ -6,6 +6,7 @@ :maxdepth: 1 unreleased + wallaby victoria ussuri train diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/releasenotes/source/wallaby.rst new/oslo.utils-4.10.0/releasenotes/source/wallaby.rst --- old/oslo.utils-4.8.0/releasenotes/source/wallaby.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.utils-4.10.0/releasenotes/source/wallaby.rst 2021-08-19 14:35:10.000000000 +0200 @@ -0,0 +1,6 @@ +============================ +Wallaby Series Release Notes +============================ + +.. release-notes:: + :branch: stable/wallaby diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/tools/perf_test_mask_password.py new/oslo.utils-4.10.0/tools/perf_test_mask_password.py --- old/oslo.utils-4.8.0/tools/perf_test_mask_password.py 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/tools/perf_test_mask_password.py 2021-08-19 14:35:10.000000000 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.utils-4.8.0/tox.ini new/oslo.utils-4.10.0/tox.ini --- old/oslo.utils-4.8.0/tox.ini 2021-02-16 10:01:47.000000000 +0100 +++ new/oslo.utils-4.10.0/tox.ini 2021-08-19 14:35:10.000000000 +0200 @@ -49,9 +49,3 @@ commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -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