summaryrefslogtreecommitdiff
path: root/test/units
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-02-03 16:22:40 -0800
committerGitHub <noreply@github.com>2023-02-03 16:22:40 -0800
commit379058e10f3dbc0fdcaf80394bd09b18927e7d33 (patch)
tree71d411345c6c140a65c49131e50632d4f9cef363 /test/units
parente658995760ac1209cb12df97027a2e282b4536ae (diff)
downloadansible-379058e10f3dbc0fdcaf80394bd09b18927e7d33.tar.gz
Update collections.abc imports (#79911)
* Update `collections.abc` imports - Use `six.moves` for modules and module_utils - Use `collections.abc` for controller code This avoids using `ansible.module_utils.common._collections_compat`, which was added before the vendored `six` was updated to provide these imports. * Update _collections_compat to use six.moves Also update the custom pylint rule to reflect this change.
Diffstat (limited to 'test/units')
-rw-r--r--test/units/executor/module_common/test_recursive_finder.py1
-rw-r--r--test/units/module_utils/common/test_collections.py2
-rw-r--r--test/units/module_utils/conftest.py2
-rw-r--r--test/units/modules/conftest.py2
4 files changed, 3 insertions, 4 deletions
diff --git a/test/units/executor/module_common/test_recursive_finder.py b/test/units/executor/module_common/test_recursive_finder.py
index 651ed78255..95b49d354d 100644
--- a/test/units/executor/module_common/test_recursive_finder.py
+++ b/test/units/executor/module_common/test_recursive_finder.py
@@ -42,7 +42,6 @@ MODULE_UTILS_BASIC_FILES = frozenset(('ansible/__init__.py',
'ansible/module_utils/basic.py',
'ansible/module_utils/six/__init__.py',
'ansible/module_utils/_text.py',
- 'ansible/module_utils/common/_collections_compat.py',
'ansible/module_utils/common/_json_compat.py',
'ansible/module_utils/common/collections.py',
'ansible/module_utils/common/parameters.py',
diff --git a/test/units/module_utils/common/test_collections.py b/test/units/module_utils/common/test_collections.py
index 95b2a402f2..72913edb14 100644
--- a/test/units/module_utils/common/test_collections.py
+++ b/test/units/module_utils/common/test_collections.py
@@ -9,7 +9,7 @@ __metaclass__ = type
import pytest
from ansible.module_utils.six import Iterator
-from ansible.module_utils.common._collections_compat import Sequence
+from ansible.module_utils.six.moves.collections_abc import Sequence
from ansible.module_utils.common.collections import ImmutableDict, is_iterable, is_sequence
diff --git a/test/units/module_utils/conftest.py b/test/units/module_utils/conftest.py
index 8bc13c4d55..dc810652c7 100644
--- a/test/units/module_utils/conftest.py
+++ b/test/units/module_utils/conftest.py
@@ -13,7 +13,7 @@ import pytest
import ansible.module_utils.basic
from ansible.module_utils.six import PY3, string_types
from ansible.module_utils._text import to_bytes
-from ansible.module_utils.common._collections_compat import MutableMapping
+from ansible.module_utils.six.moves.collections_abc import MutableMapping
@pytest.fixture
diff --git a/test/units/modules/conftest.py b/test/units/modules/conftest.py
index a7d1e0475f..b5cd636b63 100644
--- a/test/units/modules/conftest.py
+++ b/test/units/modules/conftest.py
@@ -10,7 +10,7 @@ import pytest
from ansible.module_utils.six import string_types
from ansible.module_utils._text import to_bytes
-from ansible.module_utils.common._collections_compat import MutableMapping
+from ansible.module_utils.six.moves.collections_abc import MutableMapping
@pytest.fixture