commit:     395c494e0cfba8e94ea03ff351cd0ae0aeca5fe0
Author:     Marco Scardovi <marco <AT> scardovi <DOT> com>
AuthorDate: Mon Jan 17 20:34:12 2022 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Tue Jan 18 11:29:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=395c494e

app-admin/cdist: fix test

Closes: https://bugs.gentoo.org/831362
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>
Closes: https://github.com/gentoo/gentoo/pull/23846
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 app-admin/cdist/cdist-6.9.8.ebuild |  5 ++++-
 app-admin/cdist/files/test.patch   | 45 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/app-admin/cdist/cdist-6.9.8.ebuild 
b/app-admin/cdist/cdist-6.9.8.ebuild
index 1dae10c0230a..6b089e690af3 100644
--- a/app-admin/cdist/cdist-6.9.8.ebuild
+++ b/app-admin/cdist/cdist-6.9.8.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 PYTHON_COMPAT=( python3_{8..10} )
+
 DISTUTILS_USE_SETUPTOOLS=no
 
 inherit distutils-r1
@@ -17,6 +18,8 @@ LICENSE="GPL-3+"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
+PATCHES=( "${FILESDIR}"/test.patch )
+
 distutils_enable_sphinx docs/src dev-python/sphinx_rtd_theme
 distutils_enable_tests unittest
 

diff --git a/app-admin/cdist/files/test.patch b/app-admin/cdist/files/test.patch
new file mode 100644
index 000000000000..98659344e9ea
--- /dev/null
+++ b/app-admin/cdist/files/test.patch
@@ -0,0 +1,45 @@
+From 3a321469a8ba5aea55220bd70bd4900de732e917 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= <[email protected]>
+Date: Tue, 16 Nov 2021 11:11:45 +0100
+Subject: [PATCH] Python 3.10: collections.X -> collections.abc.X
+
+---
+ cdist/integration.py     | 2 +-
+ cdist/util/fsproperty.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cdist/integration.py b/cdist/integration.py
+index 17b65f09..04470ea7 100644
+--- a/cdist/integration.py
++++ b/cdist/integration.py
+@@ -84,7 +84,7 @@ def _process_hosts_simple(action, host, manifest, verbose,
+     """
+     if isinstance(host, str):
+         hosts = [host, ]
+-    elif isinstance(host, collections.Iterable):
++    elif isinstance(host, collections.abc.Iterable):
+         hosts = host
+     else:
+         raise cdist.Error('Invalid host argument: {}'.format(host))
+diff --git a/cdist/util/fsproperty.py b/cdist/util/fsproperty.py
+index 09e9cc19..6bf935e8 100644
+--- a/cdist/util/fsproperty.py
++++ b/cdist/util/fsproperty.py
+@@ -33,7 +33,7 @@ class AbsolutePathRequiredError(cdist.Error):
+         return 'Absolute path required, got: {}'.format(self.path)
+ 
+ 
+-class FileList(collections.MutableSequence):
++class FileList(collections.abc.MutableSequence):
+     """A list that stores it's state in a file.
+ 
+     """
+@@ -102,7 +102,7 @@ class FileList(collections.MutableSequence):
+         self.__write(lines)
+ 
+ 
+-class DirectoryDict(collections.MutableMapping):
++class DirectoryDict(collections.abc.MutableMapping):
+     """A dict that stores it's items as files in a directory.
+ 
+     """

Reply via email to