mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Update module_utils.six to latest (#22855)
* Update module_utils.six to latest We've been held back on the version of six we could use on the module side to 1.4.x because of python-2.4 compatibility. Now that our minimum is Python-2.6, we can update to the latest version of six in module_utils and get rid of the second copy in lib/ansible/compat.
This commit is contained in:
@@ -25,10 +25,10 @@ import json
|
||||
import tempfile
|
||||
from yaml import YAMLError
|
||||
|
||||
from ansible.compat.six import text_type, string_types
|
||||
from ansible.errors import AnsibleFileNotFound, AnsibleParserError
|
||||
from ansible.errors.yaml_strings import YAML_SYNTAX_ERROR
|
||||
from ansible.module_utils.basic import is_executable
|
||||
from ansible.module_utils.six import text_type, string_types
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.parsing.vault import VaultLib, b_HEADER, is_encrypted, is_encrypted_file
|
||||
from ansible.parsing.quoting import unquote
|
||||
@@ -43,7 +43,7 @@ except ImportError:
|
||||
display = Display()
|
||||
|
||||
|
||||
class DataLoader():
|
||||
class DataLoader:
|
||||
|
||||
'''
|
||||
The DataLoader class is used to load and parse YAML or JSON content,
|
||||
|
||||
@@ -19,14 +19,15 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.six import iteritems, string_types
|
||||
|
||||
from ansible.errors import AnsibleParserError,AnsibleError
|
||||
from ansible.module_utils.six import iteritems, string_types
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.plugins import module_loader
|
||||
from ansible.parsing.splitter import parse_kv, split_args
|
||||
from ansible.template import Templar
|
||||
|
||||
|
||||
# For filtering out modules correctly below
|
||||
RAW_PARAM_MODULES = ([
|
||||
'command',
|
||||
@@ -43,6 +44,7 @@ RAW_PARAM_MODULES = ([
|
||||
'meta',
|
||||
])
|
||||
|
||||
|
||||
class ModuleArgsParser:
|
||||
|
||||
"""
|
||||
|
||||
@@ -62,9 +62,9 @@ try:
|
||||
except ImportError:
|
||||
HAS_AES = False
|
||||
|
||||
from ansible.compat.six import PY3, binary_type
|
||||
from ansible.compat.six.moves import zip
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six import PY3, binary_type
|
||||
from ansible.module_utils.six.moves import zip
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
|
||||
try:
|
||||
|
||||
@@ -20,8 +20,8 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import yaml
|
||||
from ansible.compat.six import PY3
|
||||
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.parsing.yaml.objects import AnsibleUnicode, AnsibleSequence, AnsibleMapping
|
||||
from ansible.parsing.yaml.objects import AnsibleVaultEncryptedUnicode
|
||||
from ansible.vars.hostvars import HostVars
|
||||
|
||||
@@ -21,7 +21,7 @@ __metaclass__ = type
|
||||
|
||||
import yaml
|
||||
|
||||
from ansible.compat.six import text_type
|
||||
from ansible.module_utils.six import text_type
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user