diff --git a/cloud-init-20.4-Fix-collections-python-310.patch b/cloud-init-20.4-Fix-collections-python-310.patch new file mode 100644 index 0000000..4f02f0e --- /dev/null +++ b/cloud-init-20.4-Fix-collections-python-310.patch @@ -0,0 +1,33 @@ +From 950c186a7e0c66a3ed84ea97291e5829ca3d826c Mon Sep 17 00:00:00 2001 +From: James Falcon +Date: Tue, 15 Jun 2021 15:25:37 -0500 +Subject: [PATCH] Replace deprecated collections.Iterable with abc replacement + (#922) + +LP: #1932048 +--- + cloudinit/log.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cloudinit/log.py b/cloudinit/log.py +index 2e5df04217..1014990773 100644 +--- a/cloudinit/log.py ++++ b/cloudinit/log.py +@@ -8,7 +8,7 @@ + # + # This file is part of cloud-init. See LICENSE file for license information. + +-import collections ++import collections.abc + import io + import logging + import logging.config +@@ -78,7 +78,7 @@ def setupLogging(cfg=None): + for a_cfg in cfg['log_cfgs']: + if isinstance(a_cfg, str): + log_cfgs.append(a_cfg) +- elif isinstance(a_cfg, (collections.Iterable)): ++ elif isinstance(a_cfg, (collections.abc.Iterable)): + cfg_str = [str(c) for c in a_cfg] + log_cfgs.append('\n'.join(cfg_str)) + else: diff --git a/cloud-init.spec b/cloud-init.spec index d7e0b11..02ca72e 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 20.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Cloud instance init scripts License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -31,6 +31,9 @@ Patch5: cloud-init-20.4-Adding-RHEL-default-cloud.cfg.patch # Reverting commit b0e73814 Patch6: cloud-init-20.4-Revert-ssh_util-handle-non-default-AuthorizedKeysFil.patch +# Fix collections import to work with Python 3.10 +Patch7: cloud-init-20.4-Fix-collections-python-310.patch + BuildArch: noarch BuildRequires: pkgconfig(systemd) @@ -182,6 +185,9 @@ python3 -m pytest tests/unittests %changelog +* Wed Jun 16 2021 Frantisek Zatloukal - 20.4-6 +- Fix collections import to work with Python 3.10 + * Fri Jun 04 2021 Python Maint - 20.4-5 - Rebuilt for Python 3.10