diff --git a/changelogs/fragments/enhancement-518-text-converter-import.yml b/changelogs/fragments/enhancement-518-text-converter-import.yml new file mode 100644 index 000000000..691a57273 --- /dev/null +++ b/changelogs/fragments/enhancement-518-text-converter-import.yml @@ -0,0 +1,3 @@ +minor_changes: + - Updated the text converter import from "from ansible.module_utils._text" to "from ansible.module_utils.common.text.converters" to remove warning ".. warn:: Use ansible.module_utils.common.text.converters instead.". + diff --git a/plugins/action/zos_fetch.py b/plugins/action/zos_fetch.py index 4423a2985..dd2172fc8 100644 --- a/plugins/action/zos_fetch.py +++ b/plugins/action/zos_fetch.py @@ -17,7 +17,8 @@ import re from hashlib import sha256 -from ansible.module_utils._text import to_bytes, to_text +# from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text from ansible.module_utils.six import string_types from ansible.module_utils.parsing.convert_bool import boolean from ansible.plugins.action import ActionBase diff --git a/plugins/action/zos_job_submit.py b/plugins/action/zos_job_submit.py index 7e7c9833f..6dcadad05 100644 --- a/plugins/action/zos_job_submit.py +++ b/plugins/action/zos_job_submit.py @@ -15,7 +15,8 @@ from ansible.plugins.action import ActionBase from ansible.errors import AnsibleError, AnsibleFileNotFound -from ansible.module_utils._text import to_bytes, to_text +# from ansible.module_utils._text import to_bytes, to_text +from ansible.module_utils.common.text.converters import to_bytes, to_text import os diff --git a/plugins/module_utils/data_set.py b/plugins/module_utils/data_set.py index 24d6d5500..8cd7199f8 100644 --- a/plugins/module_utils/data_set.py +++ b/plugins/module_utils/data_set.py @@ -18,7 +18,8 @@ from os import path, walk from string import ascii_uppercase, digits from random import randint -from ansible.module_utils._text import to_bytes +# from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible_collections.ibm.ibm_zos_core.plugins.module_utils.ansible_module import ( AnsibleModuleHelper, ) diff --git a/plugins/module_utils/system.py b/plugins/module_utils/system.py index 5bb5fed20..90b9d1013 100644 --- a/plugins/module_utils/system.py +++ b/plugins/module_utils/system.py @@ -17,7 +17,8 @@ from sys import platform as SYS_PLATFORM from subprocess import Popen, PIPE from ansible.module_utils.six import binary_type, text_type, PY2, PY3 -from ansible.module_utils._text import to_text, to_bytes +# from ansible.module_utils._text import to_text, to_bytes +from ansible.module_utils.common.text.converters import to_bytes, to_text from shlex import split diff --git a/plugins/modules/zos_copy.py b/plugins/modules/zos_copy.py index f984e9195..1ae04cc7d 100644 --- a/plugins/modules/zos_copy.py +++ b/plugins/modules/zos_copy.py @@ -664,7 +664,8 @@ from ansible_collections.ibm.ibm_zos_core.plugins.module_utils.ansible_module import ( AnsibleModuleHelper, ) -from ansible.module_utils._text import to_bytes +# from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import PY3 from re import IGNORECASE diff --git a/plugins/modules/zos_fetch.py b/plugins/modules/zos_fetch.py index a930e3458..dd43310b9 100644 --- a/plugins/modules/zos_fetch.py +++ b/plugins/modules/zos_fetch.py @@ -275,7 +275,8 @@ from math import ceil from shutil import rmtree from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils._text import to_bytes +# from ansible.module_utils._text import to_bytes +from ansible.module_utils.common.text.converters import to_bytes from ansible.module_utils.parsing.convert_bool import boolean from ansible_collections.ibm.ibm_zos_core.plugins.module_utils import ( better_arg_parser,