diff --git a/Replace_deprecated_import_ABCs_from_collections.patch b/Replace_deprecated_import_ABCs_from_collections.patch new file mode 100644 index 0000000000000000000000000000000000000000..37150424fec870fae5eb2215b275d76f62a513a6 --- /dev/null +++ b/Replace_deprecated_import_ABCs_from_collections.patch @@ -0,0 +1,22 @@ +diff --git a/keystone/common/utils.py b/keystone/common/utils.py +index 1314085..7c3e7ae 100644 +--- a/keystone/common/utils.py ++++ b/keystone/common/utils.py +@@ -16,7 +16,7 @@ + # License for the specific language governing permissions and limitations + # under the License. + +-import collections ++import collections.abc + import grp + import hashlib + import itertools +@@ -81,7 +81,7 @@ def flatten_dict(d, parent_key=''): + items = [] + for k, v in d.items(): + new_key = parent_key + '.' + k if parent_key else k +- if isinstance(v, collections.MutableMapping): ++ if isinstance(v, collections.abc.MutableMapping): + items.extend(list(flatten_dict(v, new_key).items())) + else: + items.append((new_key, v)) diff --git a/openstack-keystone.spec b/openstack-keystone.spec index d55df6109c207b6f61da9610ca12c5ff5d791674..06ae03c7f00c677770c5cb056a449462fe1250fc 100644 --- a/openstack-keystone.spec +++ b/openstack-keystone.spec @@ -9,7 +9,7 @@ Keystone is a Python implementation of the OpenStack \ Name: openstack-keystone Version: 19.0.1 -Release: 1 +Release: 2 Summary: OpenStack Identity Service License: ASL 2.0 URL: http://keystone.openstack.org/ @@ -18,6 +18,7 @@ Source1: openstack-keystone.logrotate Source3: openstack-keystone.sysctl Source5: openstack-keystone-sample-data Source20: keystone-dist.conf +Patch000: Replace_deprecated_import_ABCs_from_collections.patch BuildArch: noarch @@ -149,7 +150,7 @@ This package contains documentation for Keystone. %endif %prep -%autosetup -n keystone-%{upstream_version} +%autosetup -n keystone-%{upstream_version} -p1 find . \( -name .gitignore -o -name .placeholder \) -delete find keystone -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \; @@ -274,6 +275,9 @@ chmod 660 %{_localstatedir}/log/keystone/keystone.log %endif %changelog +* Fri May 24 2024 tzing_t - 19.0.1-2 +- Replace deprecated import ABCs from collections + * Thu Apr 27 2023 songchao - 19.0.1-1 - Upgrade to 19.0.1