Python 3.10: collections.X -> collections.abc.X #323
2 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ def _process_hosts_simple(action, host, manifest, verbose,
|
||||||
"""
|
"""
|
||||||
if isinstance(host, str):
|
if isinstance(host, str):
|
||||||
hosts = [host, ]
|
hosts = [host, ]
|
||||||
elif isinstance(host, collections.Iterable):
|
elif isinstance(host, collections.abc.Iterable):
|
||||||
hosts = host
|
hosts = host
|
||||||
else:
|
else:
|
||||||
raise cdist.Error('Invalid host argument: {}'.format(host))
|
raise cdist.Error('Invalid host argument: {}'.format(host))
|
||||||
|
|
|
@ -33,7 +33,7 @@ class AbsolutePathRequiredError(cdist.Error):
|
||||||
return 'Absolute path required, got: {}'.format(self.path)
|
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.
|
"""A list that stores it's state in a file.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -102,7 +102,7 @@ class FileList(collections.MutableSequence):
|
||||||
self.__write(lines)
|
self.__write(lines)
|
||||||
|
|
||||||
|
|
||||||
class DirectoryDict(collections.MutableMapping):
|
class DirectoryDict(collections.abc.MutableMapping):
|
||||||
"""A dict that stores it's items as files in a directory.
|
"""A dict that stores it's items as files in a directory.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue