summaryrefslogtreecommitdiffstats
path: root/hacking
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-05-03 17:58:00 +0200
committerGitHub <noreply@github.com>2023-05-03 17:58:00 +0200
commit2cd1744be3d96f1eec674e1b66433c3730caa24f (patch)
tree8ab323420af73f978020366daeedd7c9ccd6f246 /hacking
parentFix os.walk issues in package-data sanity test (#80703) (diff)
downloadansible-2cd1744be3d96f1eec674e1b66433c3730caa24f.tar.xz
ansible-2cd1744be3d96f1eec674e1b66433c3730caa24f.zip
Use ansible.module_utils.common.text.converters (#80704)
Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
Diffstat (limited to 'hacking')
-rwxr-xr-xhacking/ansible-profile2
-rw-r--r--hacking/build_library/build_ansible/command_plugins/collection_meta.py2
-rw-r--r--hacking/build_library/build_ansible/command_plugins/dump_config.py2
-rw-r--r--hacking/build_library/build_ansible/command_plugins/dump_keywords.py2
-rw-r--r--hacking/build_library/build_ansible/command_plugins/generate_man.py2
-rwxr-xr-xhacking/test-module.py2
-rwxr-xr-xhacking/tests/gen_distribution_version_testcase.py2
7 files changed, 7 insertions, 7 deletions
diff --git a/hacking/ansible-profile b/hacking/ansible-profile
index 8681cb739d..9856e7ab5c 100755
--- a/hacking/ansible-profile
+++ b/hacking/ansible-profile
@@ -7,7 +7,7 @@ import sys
import traceback
import ansible.constants as C
-from ansible.module_utils._text import to_text
+from ansible.module_utils.common.text.converters import to_text
target = sys.argv.pop(1)
myclass = "%sCLI" % target.capitalize()
diff --git a/hacking/build_library/build_ansible/command_plugins/collection_meta.py b/hacking/build_library/build_ansible/command_plugins/collection_meta.py
index 41b1077851..5c379a1d71 100644
--- a/hacking/build_library/build_ansible/command_plugins/collection_meta.py
+++ b/hacking/build_library/build_ansible/command_plugins/collection_meta.py
@@ -12,7 +12,7 @@ import pathlib
import yaml
from ansible.module_utils.six import string_types
-from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common.text.converters import to_bytes
from antsibull_docs.jinja2.environment import doc_environment
# Pylint doesn't understand Python3 namespace modules.
diff --git a/hacking/build_library/build_ansible/command_plugins/dump_config.py b/hacking/build_library/build_ansible/command_plugins/dump_config.py
index 33591b4731..733f9503e9 100644
--- a/hacking/build_library/build_ansible/command_plugins/dump_config.py
+++ b/hacking/build_library/build_ansible/command_plugins/dump_config.py
@@ -12,7 +12,7 @@ import pathlib
import yaml
from jinja2 import Environment, FileSystemLoader
-from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common.text.converters import to_bytes
# Pylint doesn't understand Python3 namespace modules.
from ..change_detection import update_file_if_different # pylint: disable=relative-beyond-top-level
diff --git a/hacking/build_library/build_ansible/command_plugins/dump_keywords.py b/hacking/build_library/build_ansible/command_plugins/dump_keywords.py
index e9379317f9..90a790f68b 100644
--- a/hacking/build_library/build_ansible/command_plugins/dump_keywords.py
+++ b/hacking/build_library/build_ansible/command_plugins/dump_keywords.py
@@ -16,7 +16,7 @@ import jinja2
import yaml
from jinja2 import Environment, FileSystemLoader
-from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common.text.converters import to_bytes
# Pylint doesn't understand Python3 namespace modules.
from ..change_detection import update_file_if_different # pylint: disable=relative-beyond-top-level
diff --git a/hacking/build_library/build_ansible/command_plugins/generate_man.py b/hacking/build_library/build_ansible/command_plugins/generate_man.py
index e9df138725..2d8d1b0ec4 100644
--- a/hacking/build_library/build_ansible/command_plugins/generate_man.py
+++ b/hacking/build_library/build_ansible/command_plugins/generate_man.py
@@ -14,7 +14,7 @@ import sys
from jinja2 import Environment, FileSystemLoader
-from ansible.module_utils._text import to_bytes
+from ansible.module_utils.common.text.converters import to_bytes
# Pylint doesn't understand Python3 namespace modules.
from ..change_detection import update_file_if_different # pylint: disable=relative-beyond-top-level
diff --git a/hacking/test-module.py b/hacking/test-module.py
index 745acdbc7f..7a329b4b2d 100755
--- a/hacking/test-module.py
+++ b/hacking/test-module.py
@@ -47,7 +47,7 @@ from ansible.parsing.splitter import parse_kv
from ansible.plugins.loader import init_plugin_loader
from ansible.executor import module_common
import ansible.constants as C
-from ansible.module_utils._text import to_native, to_text
+from ansible.module_utils.common.text.converters import to_native, to_text
from ansible.template import Templar
import json
diff --git a/hacking/tests/gen_distribution_version_testcase.py b/hacking/tests/gen_distribution_version_testcase.py
index 2fc5a2f932..e75c78ad91 100755
--- a/hacking/tests/gen_distribution_version_testcase.py
+++ b/hacking/tests/gen_distribution_version_testcase.py
@@ -19,7 +19,7 @@ import subprocess
import sys
from ansible.module_utils import distro
-from ansible.module_utils._text import to_text
+from ansible.module_utils.common.text.converters import to_text
filelist = [