Gentoo Archives: gentoo-commits

From: "Jakov Smolić" <jsmolic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/cdist/, app-admin/cdist/files/
Date: Tue, 18 Jan 2022 11:35:13
Message-Id: 1642505376.395c494e0cfba8e94ea03ff351cd0ae0aeca5fe0.jsmolic@gentoo
1 commit: 395c494e0cfba8e94ea03ff351cd0ae0aeca5fe0
2 Author: Marco Scardovi <marco <AT> scardovi <DOT> com>
3 AuthorDate: Mon Jan 17 20:34:12 2022 +0000
4 Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 18 11:29:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=395c494e
7
8 app-admin/cdist: fix test
9
10 Closes: https://bugs.gentoo.org/831362
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>
13 Closes: https://github.com/gentoo/gentoo/pull/23846
14 Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
15
16 app-admin/cdist/cdist-6.9.8.ebuild | 5 ++++-
17 app-admin/cdist/files/test.patch | 45 ++++++++++++++++++++++++++++++++++++++
18 2 files changed, 49 insertions(+), 1 deletion(-)
19
20 diff --git a/app-admin/cdist/cdist-6.9.8.ebuild b/app-admin/cdist/cdist-6.9.8.ebuild
21 index 1dae10c0230a..6b089e690af3 100644
22 --- a/app-admin/cdist/cdist-6.9.8.ebuild
23 +++ b/app-admin/cdist/cdist-6.9.8.ebuild
24 @@ -1,9 +1,10 @@
25 -# Copyright 1999-2021 Gentoo Authors
26 +# Copyright 1999-2022 Gentoo Authors
27 # Distributed under the terms of the GNU General Public License v2
28
29 EAPI=8
30
31 PYTHON_COMPAT=( python3_{8..10} )
32 +
33 DISTUTILS_USE_SETUPTOOLS=no
34
35 inherit distutils-r1
36 @@ -17,6 +18,8 @@ LICENSE="GPL-3+"
37 SLOT="0"
38 KEYWORDS="~amd64 ~x86"
39
40 +PATCHES=( "${FILESDIR}"/test.patch )
41 +
42 distutils_enable_sphinx docs/src dev-python/sphinx_rtd_theme
43 distutils_enable_tests unittest
44
45
46 diff --git a/app-admin/cdist/files/test.patch b/app-admin/cdist/files/test.patch
47 new file mode 100644
48 index 000000000000..98659344e9ea
49 --- /dev/null
50 +++ b/app-admin/cdist/files/test.patch
51 @@ -0,0 +1,45 @@
52 +From 3a321469a8ba5aea55220bd70bd4900de732e917 Mon Sep 17 00:00:00 2001
53 +From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= <timothee.floure@××××××.net>
54 +Date: Tue, 16 Nov 2021 11:11:45 +0100
55 +Subject: [PATCH] Python 3.10: collections.X -> collections.abc.X
56 +
57 +---
58 + cdist/integration.py | 2 +-
59 + cdist/util/fsproperty.py | 4 ++--
60 + 2 files changed, 3 insertions(+), 3 deletions(-)
61 +
62 +diff --git a/cdist/integration.py b/cdist/integration.py
63 +index 17b65f09..04470ea7 100644
64 +--- a/cdist/integration.py
65 ++++ b/cdist/integration.py
66 +@@ -84,7 +84,7 @@ def _process_hosts_simple(action, host, manifest, verbose,
67 + """
68 + if isinstance(host, str):
69 + hosts = [host, ]
70 +- elif isinstance(host, collections.Iterable):
71 ++ elif isinstance(host, collections.abc.Iterable):
72 + hosts = host
73 + else:
74 + raise cdist.Error('Invalid host argument: {}'.format(host))
75 +diff --git a/cdist/util/fsproperty.py b/cdist/util/fsproperty.py
76 +index 09e9cc19..6bf935e8 100644
77 +--- a/cdist/util/fsproperty.py
78 ++++ b/cdist/util/fsproperty.py
79 +@@ -33,7 +33,7 @@ class AbsolutePathRequiredError(cdist.Error):
80 + return 'Absolute path required, got: {}'.format(self.path)
81 +
82 +
83 +-class FileList(collections.MutableSequence):
84 ++class FileList(collections.abc.MutableSequence):
85 + """A list that stores it's state in a file.
86 +
87 + """
88 +@@ -102,7 +102,7 @@ class FileList(collections.MutableSequence):
89 + self.__write(lines)
90 +
91 +
92 +-class DirectoryDict(collections.MutableMapping):
93 ++class DirectoryDict(collections.abc.MutableMapping):
94 + """A dict that stores it's items as files in a directory.
95 +
96 + """