mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -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
|
@ -325,20 +325,16 @@ Bundled six
|
|||
|
||||
The third-party `python-six <https://pythonhosted.org/six/>`_ library exists
|
||||
to help projects create code that runs on both Python-2 and Python-3. Ansible
|
||||
includes version 1.4.1 in module_utils so that other modules can use it
|
||||
includes a version of the library in module_utils so that other modules can use it
|
||||
without requiring that it is installed on the remote system. To make use of
|
||||
it, import it like this::
|
||||
|
||||
from ansible.module_utils import six
|
||||
|
||||
.. note:: Why version 1.4.1?
|
||||
.. note:: Ansible can also use a system copy of six
|
||||
|
||||
six-1.4.1 is the last version of python-six to support Python-2.4. Until
|
||||
Ansible-2.4, most Ansible modules were required to run on Python-2.4. So
|
||||
the bundled version of six could not be newer than 1.4.1.
|
||||
|
||||
Ansible-2.4 now targets Python-2.6 or greater for modules. We'll be
|
||||
updating the bundled six soon.
|
||||
Ansible will use a system copy of six if the system copy is a later
|
||||
version than the one Ansible bundles.
|
||||
|
||||
-------------------------------------
|
||||
Porting module_utils code to Python 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue