mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07: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:
parent
c7c8481181
commit
2fff690caa
127 changed files with 404 additions and 911 deletions
|
@ -21,7 +21,7 @@ __metaclass__ = type
|
|||
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
from ansible.compat.six import with_metaclass
|
||||
from ansible.module_utils.six import with_metaclass
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
|
|
|
@ -122,10 +122,11 @@ import os
|
|||
|
||||
from jinja2.exceptions import UndefinedError
|
||||
|
||||
from ansible.compat.six import string_types
|
||||
from ansible.errors import AnsibleFileNotFound, AnsibleLookupError, AnsibleUndefinedVariable
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.constants import mk_boolean as boolean
|
||||
from ansible.errors import AnsibleFileNotFound, AnsibleLookupError, AnsibleUndefinedVariable
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.six import string_types
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.listify import listify_lookup_plugin_terms
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
def _check_list_of_one_list(self, term):
|
||||
|
|
|
@ -21,10 +21,10 @@ from io import StringIO
|
|||
import os
|
||||
import re
|
||||
|
||||
from ansible.compat.six.moves import configparser
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.module_utils.six.moves import configparser
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
def _parse_params(term):
|
||||
|
|
|
@ -24,8 +24,8 @@ import string
|
|||
import random
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.compat.six import text_type
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six import text_type
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
|
|
@ -19,11 +19,12 @@ __metaclass__ = type
|
|||
|
||||
from re import compile as re_compile, IGNORECASE
|
||||
|
||||
from ansible.compat.six.moves import xrange
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six.moves import xrange
|
||||
from ansible.parsing.splitter import parse_kv
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
# shortcut format
|
||||
NUM = "(0?x?[0-9a-f]+)"
|
||||
SHORTCUT = re_compile(
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.six import string_types
|
||||
from ansible.constants import mk_boolean as boolean
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.listify import listify_lookup_plugin_terms
|
||||
from ansible.constants import mk_boolean as boolean
|
||||
|
||||
|
||||
FLAGS = ('skip_missing',)
|
||||
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.compat.six.moves import zip_longest
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six.moves import zip_longest
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
from ansible.utils.listify import listify_lookup_plugin_terms
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
"""
|
||||
Transpose a list of arrays:
|
||||
|
|
|
@ -18,8 +18,8 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
from ansible.compat.six.moves.urllib.error import HTTPError, URLError
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six.moves.urllib.error import HTTPError, URLError
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.urls import open_url, ConnectionError, SSLValidationError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue