diff --git a/v2/ansible/__init__.py b/v2/ansible/__init__.py index 1f84012e01..ae8ccff595 100644 --- a/v2/ansible/__init__.py +++ b/v2/ansible/__init__.py @@ -14,3 +14,7 @@ # # 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 diff --git a/v2/ansible/config/__init__.py b/v2/ansible/config/__init__.py index d6c11ffa74..ae8ccff595 100644 --- a/v2/ansible/config/__init__.py +++ b/v2/ansible/config/__init__.py @@ -15,3 +15,6 @@ # 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 diff --git a/v2/ansible/constants.py b/v2/ansible/constants.py index d1d9b69fd3..97d6870a3d 100644 --- a/v2/ansible/constants.py +++ b/v2/ansible/constants.py @@ -15,9 +15,14 @@ # 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 + import os import pwd import sys + try: import configparser except ImportError: diff --git a/v2/ansible/errors/__init__.py b/v2/ansible/errors/__init__.py index 54406ef6c2..ccc8a1a203 100644 --- a/v2/ansible/errors/__init__.py +++ b/v2/ansible/errors/__init__.py @@ -15,6 +15,10 @@ # 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 + import os from ansible.parsing.yaml.objects import AnsibleBaseYAMLObject diff --git a/v2/ansible/inventory/__init__.py b/v2/ansible/inventory/__init__.py index 82da01f68c..7fc8112807 100644 --- a/v2/ansible/inventory/__init__.py +++ b/v2/ansible/inventory/__init__.py @@ -17,12 +17,17 @@ ############################################# +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class Inventory(object): def __init__(self, host_list=C.DEFAULT_HOST_LIST, vault_password=None): pass def get_hosts(self, pattern="all"): pass def clear_pattern_cache(self): + # Possibly not needed? pass def groups_for_host(self, host): pass @@ -55,8 +60,10 @@ class Inventory(object): def subset(self, subset_pattern): pass def lift_restriction(self): + # HACK -- pass def lift_also_restriction(self): + # HACK -- dead host skipping pass def is_file(self): pass diff --git a/v2/ansible/modules/__init__.py b/v2/ansible/modules/__init__.py index 1f84012e01..ae8ccff595 100644 --- a/v2/ansible/modules/__init__.py +++ b/v2/ansible/modules/__init__.py @@ -14,3 +14,7 @@ # # 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 diff --git a/v2/ansible/parsing/__init__.py b/v2/ansible/parsing/__init__.py index 232d95b834..4641623c03 100644 --- a/v2/ansible/parsing/__init__.py +++ b/v2/ansible/parsing/__init__.py @@ -15,6 +15,10 @@ # 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 + from ansible.errors import AnsibleError, AnsibleInternalError def load(self, data): diff --git a/v2/ansible/parsing/mod_args.py b/v2/ansible/parsing/mod_args.py index 534aca8cd8..2a29c43742 100644 --- a/v2/ansible/parsing/mod_args.py +++ b/v2/ansible/parsing/mod_args.py @@ -15,6 +15,10 @@ # 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 + from six import iteritems, string_types from ansible.errors import AnsibleParserError diff --git a/v2/ansible/parsing/splitter.py b/v2/ansible/parsing/splitter.py index d96a8c313a..470ab90c3c 100644 --- a/v2/ansible/parsing/splitter.py +++ b/v2/ansible/parsing/splitter.py @@ -15,6 +15,10 @@ # 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 + def parse_kv(args, check_raw=False): ''' Convert a string of key/value items to a dict. If any free-form params diff --git a/v2/ansible/parsing/yaml/__init__.py b/v2/ansible/parsing/yaml/__init__.py index af492d2a73..6cc55bfc84 100644 --- a/v2/ansible/parsing/yaml/__init__.py +++ b/v2/ansible/parsing/yaml/__init__.py @@ -1,3 +1,24 @@ +# (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 + from yaml import load from ansible.parsing.yaml.loader import AnsibleLoader diff --git a/v2/ansible/parsing/yaml/composer.py b/v2/ansible/parsing/yaml/composer.py index b0acc08a24..0f9c90606f 100644 --- a/v2/ansible/parsing/yaml/composer.py +++ b/v2/ansible/parsing/yaml/composer.py @@ -1,3 +1,24 @@ +# (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 + from yaml.composer import Composer from yaml.nodes import MappingNode diff --git a/v2/ansible/parsing/yaml/constructor.py b/v2/ansible/parsing/yaml/constructor.py index 8d0ed2b8f6..1e94b808fa 100644 --- a/v2/ansible/parsing/yaml/constructor.py +++ b/v2/ansible/parsing/yaml/constructor.py @@ -1,3 +1,24 @@ +# (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 + from yaml.constructor import Constructor from ansible.parsing.yaml.objects import AnsibleMapping diff --git a/v2/ansible/parsing/yaml/loader.py b/v2/ansible/parsing/yaml/loader.py index 9b15a7f3c1..f75e5b4b27 100644 --- a/v2/ansible/parsing/yaml/loader.py +++ b/v2/ansible/parsing/yaml/loader.py @@ -1,3 +1,24 @@ +# (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 + from yaml.reader import Reader from yaml.scanner import Scanner from yaml.parser import Parser diff --git a/v2/ansible/parsing/yaml/objects.py b/v2/ansible/parsing/yaml/objects.py index 5870ea8cbe..6ea8f196f1 100644 --- a/v2/ansible/parsing/yaml/objects.py +++ b/v2/ansible/parsing/yaml/objects.py @@ -1,8 +1,29 @@ +# (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 + class AnsibleBaseYAMLObject(object): ''' the base class used to sub-class python built-in objects so that we can add attributes to them during yaml parsing - + ''' _data_source = None _line_number = None diff --git a/v2/ansible/playbook/__init__.py b/v2/ansible/playbook/__init__.py index d2430dfc0c..fa7ec5faa5 100644 --- a/v2/ansible/playbook/__init__.py +++ b/v2/ansible/playbook/__init__.py @@ -15,6 +15,10 @@ # 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 + class Playbook(object): def __init__(self, filename): self.ds = v2.utils.load_yaml_from_file(filename) diff --git a/v2/ansible/playbook/attribute.py b/v2/ansible/playbook/attribute.py index 45d596fafe..d029c3e610 100644 --- a/v2/ansible/playbook/attribute.py +++ b/v2/ansible/playbook/attribute.py @@ -15,6 +15,10 @@ # 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 + #from ansible.common.errors import AnsibleError class Attribute(object): diff --git a/v2/ansible/playbook/base.py b/v2/ansible/playbook/base.py index 3d236df761..6fe6bc1d2d 100644 --- a/v2/ansible/playbook/base.py +++ b/v2/ansible/playbook/base.py @@ -15,6 +15,10 @@ # 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 + from io import FileIO from six import iteritems, string_types diff --git a/v2/ansible/playbook/block.py b/v2/ansible/playbook/block.py index c5ab518efa..70af215923 100644 --- a/v2/ansible/playbook/block.py +++ b/v2/ansible/playbook/block.py @@ -15,6 +15,10 @@ # 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 + from v2.playbook.base import PlaybookBase class Block(PlaybookBase): diff --git a/v2/ansible/playbook/conditional.py b/v2/ansible/playbook/conditional.py index 56028e29ea..b3770a276e 100644 --- a/v2/ansible/playbook/conditional.py +++ b/v2/ansible/playbook/conditional.py @@ -15,6 +15,10 @@ # 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 + class Conditional(object): def __init__(self, task): diff --git a/v2/ansible/playbook/handler.py b/v2/ansible/playbook/handler.py index 42d937ec46..1f7aa957a5 100644 --- a/v2/ansible/playbook/handler.py +++ b/v2/ansible/playbook/handler.py @@ -15,6 +15,10 @@ # 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 + from v2.errors import AnsibleError from v2.inventory import Host from v2.playbook import Task diff --git a/v2/ansible/playbook/include.py b/v2/ansible/playbook/include.py index d6c11ffa74..ae8ccff595 100644 --- a/v2/ansible/playbook/include.py +++ b/v2/ansible/playbook/include.py @@ -15,3 +15,6 @@ # 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 diff --git a/v2/ansible/playbook/play.py b/v2/ansible/playbook/play.py index d6c11ffa74..ae8ccff595 100644 --- a/v2/ansible/playbook/play.py +++ b/v2/ansible/playbook/play.py @@ -15,3 +15,6 @@ # 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 diff --git a/v2/ansible/playbook/playbook_include.py b/v2/ansible/playbook/playbook_include.py index d6c11ffa74..ae8ccff595 100644 --- a/v2/ansible/playbook/playbook_include.py +++ b/v2/ansible/playbook/playbook_include.py @@ -15,3 +15,6 @@ # 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 diff --git a/v2/ansible/playbook/role.py b/v2/ansible/playbook/role.py index dd1426ee8a..f36207874d 100644 --- a/v2/ansible/playbook/role.py +++ b/v2/ansible/playbook/role.py @@ -15,6 +15,10 @@ # 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 + from v2.playbook.base import PlaybookBase from v2.utils import list_union diff --git a/v2/ansible/playbook/tag.py b/v2/ansible/playbook/tag.py index a992f8dee0..50dae41172 100644 --- a/v2/ansible/playbook/tag.py +++ b/v2/ansible/playbook/tag.py @@ -15,6 +15,10 @@ # 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 + from errors import AnsibleError from ansible.utils import list_union diff --git a/v2/ansible/playbook/task.py b/v2/ansible/playbook/task.py index de75a0ec9c..91ca7558d6 100644 --- a/v2/ansible/playbook/task.py +++ b/v2/ansible/playbook/task.py @@ -15,6 +15,10 @@ # 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 + from ansible.playbook.base import Base from ansible.playbook.attribute import Attribute, FieldAttribute diff --git a/v2/ansible/playbook/task_include.py b/v2/ansible/playbook/task_include.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/playbook/task_include.py +++ b/v2/ansible/playbook/task_include.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/playbook/vars.py b/v2/ansible/playbook/vars.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/playbook/vars.py +++ b/v2/ansible/playbook/vars.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/playbook/vars_file.py b/v2/ansible/playbook/vars_file.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/playbook/vars_file.py +++ b/v2/ansible/playbook/vars_file.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/__init__.py b/v2/ansible/plugins/__init__.py index faa284ce16..445fbd539f 100644 --- a/v2/ansible/plugins/__init__.py +++ b/v2/ansible/plugins/__init__.py @@ -16,6 +16,10 @@ # 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 + import os import os.path import sys diff --git a/v2/ansible/plugins/action/__init__.py b/v2/ansible/plugins/action/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/action/__init__.py +++ b/v2/ansible/plugins/action/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/callback/__init__.py b/v2/ansible/plugins/callback/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/callback/__init__.py +++ b/v2/ansible/plugins/callback/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/connections/__init__.py b/v2/ansible/plugins/connections/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/connections/__init__.py +++ b/v2/ansible/plugins/connections/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/filter/__init__.py b/v2/ansible/plugins/filter/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/filter/__init__.py +++ b/v2/ansible/plugins/filter/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/inventory/__init__.py b/v2/ansible/plugins/inventory/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/inventory/__init__.py +++ b/v2/ansible/plugins/inventory/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/lookup/__init__.py b/v2/ansible/plugins/lookup/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/lookup/__init__.py +++ b/v2/ansible/plugins/lookup/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/shell/__init__.py b/v2/ansible/plugins/shell/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/shell/__init__.py +++ b/v2/ansible/plugins/shell/__init__.py @@ -15,3 +15,7 @@ # 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 + diff --git a/v2/ansible/plugins/vars/__init__.py b/v2/ansible/plugins/vars/__init__.py index d6c11ffa74..785fc45992 100644 --- a/v2/ansible/plugins/vars/__init__.py +++ b/v2/ansible/plugins/vars/__init__.py @@ -15,3 +15,7 @@ # 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 +