From 3d2a056ad4e748eb22d51ce73f94d3cb53092776 Mon Sep 17 00:00:00 2001 From: Amandine Lee Date: Mon, 13 Apr 2015 13:28:01 -0700 Subject: [PATCH] Import futures including print --- v2/ansible/executor/playbook_executor.py | 2 +- v2/ansible/inventory/__init__.py | 3 +++ v2/ansible/inventory/dir.py | 2 ++ v2/ansible/inventory/expand_hosts.py | 3 +++ v2/ansible/inventory/group.py | 2 ++ v2/ansible/inventory/ini.py | 2 ++ v2/ansible/inventory/script.py | 2 ++ v2/ansible/inventory/vars_plugins/noop.py | 2 ++ v2/ansible/parsing/utils/jsonify.py | 21 ++++++++++++++++++- v2/ansible/playbook/helpers.py | 2 ++ v2/ansible/playbook/play.py | 2 +- v2/ansible/plugins/action/assemble.py | 2 ++ v2/ansible/plugins/action/assert.py | 2 ++ v2/ansible/plugins/action/async.py | 2 ++ v2/ansible/plugins/action/debug.py | 2 ++ v2/ansible/plugins/action/fail.py | 2 ++ v2/ansible/plugins/action/fetch.py | 2 ++ v2/ansible/plugins/action/group_by.py | 2 ++ v2/ansible/plugins/action/include_vars.py | 2 ++ v2/ansible/plugins/action/normal.py | 2 ++ v2/ansible/plugins/action/pause.py | 2 ++ v2/ansible/plugins/action/raw.py | 2 ++ v2/ansible/plugins/action/script.py | 2 ++ v2/ansible/plugins/action/set_fact.py | 2 ++ v2/ansible/plugins/action/synchronize.py | 2 ++ v2/ansible/plugins/action/template.py | 2 ++ v2/ansible/plugins/action/unarchive.py | 2 ++ v2/ansible/plugins/cache/__init__.py | 2 ++ v2/ansible/plugins/cache/base.py | 2 ++ v2/ansible/plugins/cache/memcached.py | 2 ++ v2/ansible/plugins/cache/memory.py | 2 ++ v2/ansible/plugins/cache/redis.py | 4 ++-- v2/ansible/plugins/connections/accelerate.py | 2 ++ v2/ansible/plugins/connections/chroot.py | 2 ++ v2/ansible/plugins/connections/funcd.py | 3 +++ v2/ansible/plugins/connections/jail.py | 2 ++ v2/ansible/plugins/connections/libvirt_lxc.py | 2 ++ v2/ansible/plugins/connections/local.py | 2 ++ .../plugins/connections/paramiko_ssh.py | 3 ++- v2/ansible/plugins/connections/ssh.py | 2 ++ v2/ansible/plugins/connections/winrm.py | 4 ++-- v2/ansible/plugins/inventory/directory.py | 2 +- v2/ansible/plugins/lookup/cartesian.py | 2 ++ v2/ansible/plugins/lookup/csvfile.py | 2 ++ v2/ansible/plugins/lookup/dict.py | 2 ++ v2/ansible/plugins/lookup/dnstxt.py | 2 ++ v2/ansible/plugins/lookup/env.py | 2 ++ v2/ansible/plugins/lookup/etcd.py | 2 ++ v2/ansible/plugins/lookup/file.py | 2 ++ v2/ansible/plugins/lookup/fileglob.py | 2 ++ v2/ansible/plugins/lookup/first_found.py | 2 ++ v2/ansible/plugins/lookup/flattened.py | 3 ++- v2/ansible/plugins/lookup/indexed_items.py | 2 ++ .../plugins/lookup/inventory_hostnames.py | 3 +++ v2/ansible/plugins/lookup/items.py | 2 ++ v2/ansible/plugins/lookup/lines.py | 4 +++- v2/ansible/plugins/lookup/nested.py | 2 ++ v2/ansible/plugins/lookup/password.py | 2 ++ v2/ansible/plugins/lookup/pipe.py | 2 ++ v2/ansible/plugins/lookup/random_choice.py | 2 ++ v2/ansible/plugins/lookup/redis_kv.py | 2 ++ v2/ansible/plugins/lookup/sequence.py | 2 ++ v2/ansible/plugins/lookup/subelements.py | 2 ++ v2/ansible/plugins/lookup/template.py | 2 ++ v2/ansible/plugins/lookup/together.py | 2 ++ v2/ansible/plugins/lookup/url.py | 2 ++ v2/ansible/plugins/shell/csh.py | 2 ++ v2/ansible/plugins/shell/fish.py | 2 ++ v2/ansible/plugins/shell/powershell.py | 2 ++ v2/ansible/plugins/shell/sh.py | 2 ++ v2/ansible/template/safe_eval.py | 2 ++ v2/ansible/utils/color.py | 2 ++ v2/ansible/utils/debug.py | 3 +++ v2/ansible/utils/display.py | 2 ++ v2/ansible/utils/encrypt.py | 3 +++ v2/ansible/utils/path.py | 2 ++ 76 files changed, 174 insertions(+), 11 deletions(-) diff --git a/v2/ansible/executor/playbook_executor.py b/v2/ansible/executor/playbook_executor.py index 8af19ed378..6f0bf31f33 100644 --- a/v2/ansible/executor/playbook_executor.py +++ b/v2/ansible/executor/playbook_executor.py @@ -16,7 +16,7 @@ # along with Ansible. If not, see . # Make coding more python3-ish -from __future__ import (absolute_import, division) +from __future__ import (absolute_import, division, print_function) __metaclass__ = type import signal diff --git a/v2/ansible/inventory/__init__.py b/v2/ansible/inventory/__init__.py index c8e3cddeba..063398f17f 100644 --- a/v2/ansible/inventory/__init__.py +++ b/v2/ansible/inventory/__init__.py @@ -16,6 +16,9 @@ # along with Ansible. If not, see . ############################################# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import fnmatch import os import sys diff --git a/v2/ansible/inventory/dir.py b/v2/ansible/inventory/dir.py index 52f7af8b53..73c882f288 100644 --- a/v2/ansible/inventory/dir.py +++ b/v2/ansible/inventory/dir.py @@ -17,6 +17,8 @@ # along with Ansible. If not, see . ############################################# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/inventory/expand_hosts.py b/v2/ansible/inventory/expand_hosts.py index f129740935..b5a957c53f 100644 --- a/v2/ansible/inventory/expand_hosts.py +++ b/v2/ansible/inventory/expand_hosts.py @@ -30,6 +30,9 @@ expanded into 001, 002 ...009, 010. Note that when beg is specified with left zero padding, then the length of end must be the same as that of beg, else an exception is raised. ''' +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import string from ansible import errors diff --git a/v2/ansible/inventory/group.py b/v2/ansible/inventory/group.py index 87d6f64dfc..6525e69b46 100644 --- a/v2/ansible/inventory/group.py +++ b/v2/ansible/inventory/group.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.utils.debug import debug diff --git a/v2/ansible/inventory/ini.py b/v2/ansible/inventory/ini.py index 4236140ac8..e004ee8bb7 100644 --- a/v2/ansible/inventory/ini.py +++ b/v2/ansible/inventory/ini.py @@ -16,6 +16,8 @@ # along with Ansible. If not, see . ############################################# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import ast import shlex diff --git a/v2/ansible/inventory/script.py b/v2/ansible/inventory/script.py index 13b53a24f5..9675d70f69 100644 --- a/v2/ansible/inventory/script.py +++ b/v2/ansible/inventory/script.py @@ -16,6 +16,8 @@ # along with Ansible. If not, see . ############################################# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import subprocess diff --git a/v2/ansible/inventory/vars_plugins/noop.py b/v2/ansible/inventory/vars_plugins/noop.py index 5d4b4b6658..8f0c98cad5 100644 --- a/v2/ansible/inventory/vars_plugins/noop.py +++ b/v2/ansible/inventory/vars_plugins/noop.py @@ -15,6 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type class VarsModule(object): diff --git a/v2/ansible/parsing/utils/jsonify.py b/v2/ansible/parsing/utils/jsonify.py index 37c97d0195..59dbf9f8c4 100644 --- a/v2/ansible/parsing/utils/jsonify.py +++ b/v2/ansible/parsing/utils/jsonify.py @@ -1,4 +1,23 @@ -# FIXME: header +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type try: import json diff --git a/v2/ansible/playbook/helpers.py b/v2/ansible/playbook/helpers.py index 7242322b88..92f1c64c83 100644 --- a/v2/ansible/playbook/helpers.py +++ b/v2/ansible/playbook/helpers.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/playbook/play.py b/v2/ansible/playbook/play.py index 33fd5efd9f..c7f89888b8 100644 --- a/v2/ansible/playbook/play.py +++ b/v2/ansible/playbook/play.py @@ -16,7 +16,7 @@ # along with Ansible. If not, see . # Make coding more python3-ish -from __future__ import (absolute_import, division) +from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors import AnsibleError, AnsibleParserError diff --git a/v2/ansible/plugins/action/assemble.py b/v2/ansible/plugins/action/assemble.py index 638d4b92bb..4e796bddb6 100644 --- a/v2/ansible/plugins/action/assemble.py +++ b/v2/ansible/plugins/action/assemble.py @@ -15,6 +15,8 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import os.path diff --git a/v2/ansible/plugins/action/assert.py b/v2/ansible/plugins/action/assert.py index 7204d93875..5c4fdd7b89 100644 --- a/v2/ansible/plugins/action/assert.py +++ b/v2/ansible/plugins/action/assert.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.errors import AnsibleError from ansible.playbook.conditional import Conditional diff --git a/v2/ansible/plugins/action/async.py b/v2/ansible/plugins/action/async.py index 6fbf93d61f..7c02e09757 100644 --- a/v2/ansible/plugins/action/async.py +++ b/v2/ansible/plugins/action/async.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import json import random diff --git a/v2/ansible/plugins/action/debug.py b/v2/ansible/plugins/action/debug.py index dcee3e6347..dc80dfc179 100644 --- a/v2/ansible/plugins/action/debug.py +++ b/v2/ansible/plugins/action/debug.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.action import ActionBase from ansible.utils.boolean import boolean diff --git a/v2/ansible/plugins/action/fail.py b/v2/ansible/plugins/action/fail.py index a95ccb32f7..b7845c95c5 100644 --- a/v2/ansible/plugins/action/fail.py +++ b/v2/ansible/plugins/action/fail.py @@ -15,6 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.action import ActionBase diff --git a/v2/ansible/plugins/action/fetch.py b/v2/ansible/plugins/action/fetch.py index 7b549f5ecb..58e7cebb8d 100644 --- a/v2/ansible/plugins/action/fetch.py +++ b/v2/ansible/plugins/action/fetch.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import pwd diff --git a/v2/ansible/plugins/action/group_by.py b/v2/ansible/plugins/action/group_by.py index 50e0cc09c4..95db33aa43 100644 --- a/v2/ansible/plugins/action/group_by.py +++ b/v2/ansible/plugins/action/group_by.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.errors import * from ansible.plugins.action import ActionBase diff --git a/v2/ansible/plugins/action/include_vars.py b/v2/ansible/plugins/action/include_vars.py index 345e0edc0e..8a7a74d870 100644 --- a/v2/ansible/plugins/action/include_vars.py +++ b/v2/ansible/plugins/action/include_vars.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/plugins/action/normal.py b/v2/ansible/plugins/action/normal.py index 66721b4eb2..431d9b0eeb 100644 --- a/v2/ansible/plugins/action/normal.py +++ b/v2/ansible/plugins/action/normal.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.action import ActionBase diff --git a/v2/ansible/plugins/action/pause.py b/v2/ansible/plugins/action/pause.py index 9c6075e101..47399fc493 100644 --- a/v2/ansible/plugins/action/pause.py +++ b/v2/ansible/plugins/action/pause.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import datetime import sys diff --git a/v2/ansible/plugins/action/raw.py b/v2/ansible/plugins/action/raw.py index d1d1b28056..f9cd56572b 100644 --- a/v2/ansible/plugins/action/raw.py +++ b/v2/ansible/plugins/action/raw.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.action import ActionBase diff --git a/v2/ansible/plugins/action/script.py b/v2/ansible/plugins/action/script.py index 21a9f41c59..3ca7dc6a34 100644 --- a/v2/ansible/plugins/action/script.py +++ b/v2/ansible/plugins/action/script.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/plugins/action/set_fact.py b/v2/ansible/plugins/action/set_fact.py index bf89e7ec51..a7ddf10b47 100644 --- a/v2/ansible/plugins/action/set_fact.py +++ b/v2/ansible/plugins/action/set_fact.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.errors import AnsibleError from ansible.plugins.action import ActionBase diff --git a/v2/ansible/plugins/action/synchronize.py b/v2/ansible/plugins/action/synchronize.py index 81e335b009..1bc64ff4d5 100644 --- a/v2/ansible/plugins/action/synchronize.py +++ b/v2/ansible/plugins/action/synchronize.py @@ -15,6 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os.path diff --git a/v2/ansible/plugins/action/template.py b/v2/ansible/plugins/action/template.py index 76b2e78a73..07b406f2be 100644 --- a/v2/ansible/plugins/action/template.py +++ b/v2/ansible/plugins/action/template.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import base64 import os diff --git a/v2/ansible/plugins/action/unarchive.py b/v2/ansible/plugins/action/unarchive.py index 1b6cb354f0..b7601ed910 100644 --- a/v2/ansible/plugins/action/unarchive.py +++ b/v2/ansible/plugins/action/unarchive.py @@ -15,6 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import pipes diff --git a/v2/ansible/plugins/cache/__init__.py b/v2/ansible/plugins/cache/__init__.py index deed7f3ecd..4aa8fda8bb 100644 --- a/v2/ansible/plugins/cache/__init__.py +++ b/v2/ansible/plugins/cache/__init__.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from collections import MutableMapping diff --git a/v2/ansible/plugins/cache/base.py b/v2/ansible/plugins/cache/base.py index b6254cdfd4..6ff3d5ed1e 100644 --- a/v2/ansible/plugins/cache/base.py +++ b/v2/ansible/plugins/cache/base.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import exceptions diff --git a/v2/ansible/plugins/cache/memcached.py b/v2/ansible/plugins/cache/memcached.py index deaf07fe2e..135e34c2b4 100644 --- a/v2/ansible/plugins/cache/memcached.py +++ b/v2/ansible/plugins/cache/memcached.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import collections import os diff --git a/v2/ansible/plugins/cache/memory.py b/v2/ansible/plugins/cache/memory.py index 007719a647..1562836151 100644 --- a/v2/ansible/plugins/cache/memory.py +++ b/v2/ansible/plugins/cache/memory.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.cache.base import BaseCacheModule diff --git a/v2/ansible/plugins/cache/redis.py b/v2/ansible/plugins/cache/redis.py index 7f126de64b..291ce81c47 100644 --- a/v2/ansible/plugins/cache/redis.py +++ b/v2/ansible/plugins/cache/redis.py @@ -14,9 +14,9 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type -from __future__ import absolute_import -import collections # FIXME: can we store these as something else before we ship it? import sys import time diff --git a/v2/ansible/plugins/connections/accelerate.py b/v2/ansible/plugins/connections/accelerate.py index a31124e119..925136ecce 100644 --- a/v2/ansible/plugins/connections/accelerate.py +++ b/v2/ansible/plugins/connections/accelerate.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import json import os diff --git a/v2/ansible/plugins/connections/chroot.py b/v2/ansible/plugins/connections/chroot.py index 38c8af7a69..4e61f4ea55 100644 --- a/v2/ansible/plugins/connections/chroot.py +++ b/v2/ansible/plugins/connections/chroot.py @@ -15,6 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import distutils.spawn import traceback diff --git a/v2/ansible/plugins/connections/funcd.py b/v2/ansible/plugins/connections/funcd.py index 7244abcbe9..83a0c9b01d 100644 --- a/v2/ansible/plugins/connections/funcd.py +++ b/v2/ansible/plugins/connections/funcd.py @@ -18,6 +18,9 @@ # along with Ansible. If not, see . # --- +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + # The func transport permit to use ansible over func. For people who have already setup # func and that wish to play with ansible, this permit to move gradually to ansible # without having to redo completely the setup of the network. diff --git a/v2/ansible/plugins/connections/jail.py b/v2/ansible/plugins/connections/jail.py index b721ad62b5..a81f587bfd 100644 --- a/v2/ansible/plugins/connections/jail.py +++ b/v2/ansible/plugins/connections/jail.py @@ -16,6 +16,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import distutils.spawn import traceback diff --git a/v2/ansible/plugins/connections/libvirt_lxc.py b/v2/ansible/plugins/connections/libvirt_lxc.py index c6cf11f266..ee824554a0 100644 --- a/v2/ansible/plugins/connections/libvirt_lxc.py +++ b/v2/ansible/plugins/connections/libvirt_lxc.py @@ -16,6 +16,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import distutils.spawn import os diff --git a/v2/ansible/plugins/connections/local.py b/v2/ansible/plugins/connections/local.py index 31d0b296e4..73583974bf 100644 --- a/v2/ansible/plugins/connections/local.py +++ b/v2/ansible/plugins/connections/local.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import traceback import os diff --git a/v2/ansible/plugins/connections/paramiko_ssh.py b/v2/ansible/plugins/connections/paramiko_ssh.py index 4bb06e01c3..4562eaa86e 100644 --- a/v2/ansible/plugins/connections/paramiko_ssh.py +++ b/v2/ansible/plugins/connections/paramiko_ssh.py @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . - +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type # --- # The paramiko transport is provided because many distributions, in particular EL6 and before diff --git a/v2/ansible/plugins/connections/ssh.py b/v2/ansible/plugins/connections/ssh.py index e59311ead9..2c8f8de813 100644 --- a/v2/ansible/plugins/connections/ssh.py +++ b/v2/ansible/plugins/connections/ssh.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . # +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import re diff --git a/v2/ansible/plugins/connections/winrm.py b/v2/ansible/plugins/connections/winrm.py index d6e51710b5..bb704d405c 100644 --- a/v2/ansible/plugins/connections/winrm.py +++ b/v2/ansible/plugins/connections/winrm.py @@ -14,8 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . - -from __future__ import absolute_import +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import base64 import hashlib diff --git a/v2/ansible/plugins/inventory/directory.py b/v2/ansible/plugins/inventory/directory.py index d340ed7538..a75ad44ea6 100644 --- a/v2/ansible/plugins/inventory/directory.py +++ b/v2/ansible/plugins/inventory/directory.py @@ -18,7 +18,7 @@ ############################################# # Make coding more python3-ish -from __future__ import (division, print_function) +from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os diff --git a/v2/ansible/plugins/lookup/cartesian.py b/v2/ansible/plugins/lookup/cartesian.py index cc74240826..c50d53e7f8 100644 --- a/v2/ansible/plugins/lookup/cartesian.py +++ b/v2/ansible/plugins/lookup/cartesian.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from itertools import product diff --git a/v2/ansible/plugins/lookup/csvfile.py b/v2/ansible/plugins/lookup/csvfile.py index 87757399ce..b67b6bcd1c 100644 --- a/v2/ansible/plugins/lookup/csvfile.py +++ b/v2/ansible/plugins/lookup/csvfile.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import codecs diff --git a/v2/ansible/plugins/lookup/dict.py b/v2/ansible/plugins/lookup/dict.py index 61389df7c2..cc7975ae49 100644 --- a/v2/ansible/plugins/lookup/dict.py +++ b/v2/ansible/plugins/lookup/dict.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/dnstxt.py b/v2/ansible/plugins/lookup/dnstxt.py index 7100f8d96d..07451079fe 100644 --- a/v2/ansible/plugins/lookup/dnstxt.py +++ b/v2/ansible/plugins/lookup/dnstxt.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/plugins/lookup/env.py b/v2/ansible/plugins/lookup/env.py index 896f95e13a..55847dd777 100644 --- a/v2/ansible/plugins/lookup/env.py +++ b/v2/ansible/plugins/lookup/env.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/plugins/lookup/etcd.py b/v2/ansible/plugins/lookup/etcd.py index 5b54788985..002068389f 100644 --- a/v2/ansible/plugins/lookup/etcd.py +++ b/v2/ansible/plugins/lookup/etcd.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import urllib2 diff --git a/v2/ansible/plugins/lookup/file.py b/v2/ansible/plugins/lookup/file.py index add4da7f47..efb039497d 100644 --- a/v2/ansible/plugins/lookup/file.py +++ b/v2/ansible/plugins/lookup/file.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import codecs diff --git a/v2/ansible/plugins/lookup/fileglob.py b/v2/ansible/plugins/lookup/fileglob.py index bde016af9e..8985906715 100644 --- a/v2/ansible/plugins/lookup/fileglob.py +++ b/v2/ansible/plugins/lookup/fileglob.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import glob diff --git a/v2/ansible/plugins/lookup/first_found.py b/v2/ansible/plugins/lookup/first_found.py index 0ed2688015..e2ae2eb214 100644 --- a/v2/ansible/plugins/lookup/first_found.py +++ b/v2/ansible/plugins/lookup/first_found.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type # take a list of files and (optionally) a list of paths # return the first existing file found in the paths diff --git a/v2/ansible/plugins/lookup/flattened.py b/v2/ansible/plugins/lookup/flattened.py index 24f1a9ac95..f0a8adaf5e 100644 --- a/v2/ansible/plugins/lookup/flattened.py +++ b/v2/ansible/plugins/lookup/flattened.py @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . - +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.errors import * from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/indexed_items.py b/v2/ansible/plugins/lookup/indexed_items.py index 1731dc0e84..4f1dd19947 100644 --- a/v2/ansible/plugins/lookup/indexed_items.py +++ b/v2/ansible/plugins/lookup/indexed_items.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/inventory_hostnames.py b/v2/ansible/plugins/lookup/inventory_hostnames.py index faffe47eb8..d09dec0c7b 100644 --- a/v2/ansible/plugins/lookup/inventory_hostnames.py +++ b/v2/ansible/plugins/lookup/inventory_hostnames.py @@ -16,6 +16,9 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from ansible.errors import * from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/items.py b/v2/ansible/plugins/lookup/items.py index 46925d2a8b..65ff66d854 100644 --- a/v2/ansible/plugins/lookup/items.py +++ b/v2/ansible/plugins/lookup/items.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/lines.py b/v2/ansible/plugins/lookup/lines.py index 507793b18e..0d842bf148 100644 --- a/v2/ansible/plugins/lookup/lines.py +++ b/v2/ansible/plugins/lookup/lines.py @@ -15,8 +15,10 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -import subprocess +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type +import subprocess from ansible.errors import * from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/nested.py b/v2/ansible/plugins/lookup/nested.py index 0f2d146b47..52f4bed1d5 100644 --- a/v2/ansible/plugins/lookup/nested.py +++ b/v2/ansible/plugins/lookup/nested.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.errors import AnsibleError from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/password.py b/v2/ansible/plugins/lookup/password.py index 6e13410e1a..d262ed79c4 100644 --- a/v2/ansible/plugins/lookup/password.py +++ b/v2/ansible/plugins/lookup/password.py @@ -16,6 +16,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import errno diff --git a/v2/ansible/plugins/lookup/pipe.py b/v2/ansible/plugins/lookup/pipe.py index 0a7e5cb31a..d9f74708b2 100644 --- a/v2/ansible/plugins/lookup/pipe.py +++ b/v2/ansible/plugins/lookup/pipe.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import subprocess diff --git a/v2/ansible/plugins/lookup/random_choice.py b/v2/ansible/plugins/lookup/random_choice.py index e899a2dbe3..de4f31cd0e 100644 --- a/v2/ansible/plugins/lookup/random_choice.py +++ b/v2/ansible/plugins/lookup/random_choice.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import random diff --git a/v2/ansible/plugins/lookup/redis_kv.py b/v2/ansible/plugins/lookup/redis_kv.py index 08895d4c4e..e499e83f93 100644 --- a/v2/ansible/plugins/lookup/redis_kv.py +++ b/v2/ansible/plugins/lookup/redis_kv.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import re diff --git a/v2/ansible/plugins/lookup/sequence.py b/v2/ansible/plugins/lookup/sequence.py index 99783cf566..1ddeba932f 100644 --- a/v2/ansible/plugins/lookup/sequence.py +++ b/v2/ansible/plugins/lookup/sequence.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from re import compile as re_compile, IGNORECASE diff --git a/v2/ansible/plugins/lookup/subelements.py b/v2/ansible/plugins/lookup/subelements.py index 93e9e570c4..09a2ca306a 100644 --- a/v2/ansible/plugins/lookup/subelements.py +++ b/v2/ansible/plugins/lookup/subelements.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.errors import * from ansible.plugins.lookup import LookupBase diff --git a/v2/ansible/plugins/lookup/template.py b/v2/ansible/plugins/lookup/template.py index 74406f6445..e53e1990a0 100644 --- a/v2/ansible/plugins/lookup/template.py +++ b/v2/ansible/plugins/lookup/template.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os diff --git a/v2/ansible/plugins/lookup/together.py b/v2/ansible/plugins/lookup/together.py index 8b5ff5c891..2f53121cc8 100644 --- a/v2/ansible/plugins/lookup/together.py +++ b/v2/ansible/plugins/lookup/together.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from itertools import izip_longest diff --git a/v2/ansible/plugins/lookup/url.py b/v2/ansible/plugins/lookup/url.py index c907bfbce3..59a26ae541 100644 --- a/v2/ansible/plugins/lookup/url.py +++ b/v2/ansible/plugins/lookup/url.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.plugins.lookup import LookupBase import urllib2 diff --git a/v2/ansible/plugins/shell/csh.py b/v2/ansible/plugins/shell/csh.py index 4e9f8c8af7..96ec84c5bf 100644 --- a/v2/ansible/plugins/shell/csh.py +++ b/v2/ansible/plugins/shell/csh.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.runner.shell_plugins.sh import ShellModule as ShModule diff --git a/v2/ansible/plugins/shell/fish.py b/v2/ansible/plugins/shell/fish.py index 137c013c12..53fa9abada 100644 --- a/v2/ansible/plugins/shell/fish.py +++ b/v2/ansible/plugins/shell/fish.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from ansible.runner.shell_plugins.sh import ShellModule as ShModule diff --git a/v2/ansible/plugins/shell/powershell.py b/v2/ansible/plugins/shell/powershell.py index 7254df6f7e..9f3825c3b0 100644 --- a/v2/ansible/plugins/shell/powershell.py +++ b/v2/ansible/plugins/shell/powershell.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import base64 import os diff --git a/v2/ansible/plugins/shell/sh.py b/v2/ansible/plugins/shell/sh.py index 5fb0dc3add..497d45eace 100644 --- a/v2/ansible/plugins/shell/sh.py +++ b/v2/ansible/plugins/shell/sh.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import re diff --git a/v2/ansible/template/safe_eval.py b/v2/ansible/template/safe_eval.py index ba377054d7..8dafa43387 100644 --- a/v2/ansible/template/safe_eval.py +++ b/v2/ansible/template/safe_eval.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import ast import sys diff --git a/v2/ansible/utils/color.py b/v2/ansible/utils/color.py index a87717073e..37d0466d2d 100644 --- a/v2/ansible/utils/color.py +++ b/v2/ansible/utils/color.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import sys diff --git a/v2/ansible/utils/debug.py b/v2/ansible/utils/debug.py index 3b37ac50a7..5b04ac0572 100644 --- a/v2/ansible/utils/debug.py +++ b/v2/ansible/utils/debug.py @@ -1,3 +1,6 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import os import time import sys diff --git a/v2/ansible/utils/display.py b/v2/ansible/utils/display.py index 62dbeabca5..e30ae225cf 100644 --- a/v2/ansible/utils/display.py +++ b/v2/ansible/utils/display.py @@ -16,6 +16,8 @@ # along with Ansible. If not, see . # FIXME: copied mostly from old code, needs py3 improvements +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import textwrap import sys diff --git a/v2/ansible/utils/encrypt.py b/v2/ansible/utils/encrypt.py index 878b461c86..5138dbef70 100644 --- a/v2/ansible/utils/encrypt.py +++ b/v2/ansible/utils/encrypt.py @@ -14,6 +14,9 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + PASSLIB_AVAILABLE = False try: diff --git a/v2/ansible/utils/path.py b/v2/ansible/utils/path.py index ea7fc201a8..e49a2f7d55 100644 --- a/v2/ansible/utils/path.py +++ b/v2/ansible/utils/path.py @@ -14,6 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import stat