summaryrefslogtreecommitdiffstats
path: root/debian/patches/0005-use-py3.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/0005-use-py3.patch650
1 files changed, 650 insertions, 0 deletions
diff --git a/debian/patches/0005-use-py3.patch b/debian/patches/0005-use-py3.patch
new file mode 100644
index 00000000..35c9f422
--- /dev/null
+++ b/debian/patches/0005-use-py3.patch
@@ -0,0 +1,650 @@
+Description: use py3
+ Use python 3 for all helper scripts during build
+ .
+ This allows us to not depend on python 2 anymore for building.
+--- a/docs/bin/find-plugin-refs.py
++++ b/docs/bin/find-plugin-refs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # To run this script, first make webdocs in the toplevel of the checkout. This will generate all
+ # rst files from their sources. Then run this script ./docs/bin/find-plugin-refs.py
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,7 @@
+ ASCII2MAN = @echo "ERROR: rst2man from docutils command is not installed but is required to build $(MANPAGES)" && exit 1
+ endif
+
+-PYTHON=python
++PYTHON=python3
+ GENERATE_CLI = hacking/build-ansible.py generate-man
+
+ # fetch version from project release.py as single source-of-truth
+--- a/lib/ansible/cli/scripts/ansible_cli_stub.py
++++ b/lib/ansible/cli/scripts/ansible_cli_stub.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
+ #
+--- a/lib/ansible/cli/scripts/ansible_connection_cli_stub.py
++++ b/lib/ansible/cli/scripts/ansible_connection_cli_stub.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Copyright: (c) 2017, Ansible Project
+ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+ from __future__ import (absolute_import, division, print_function)
+--- a/packaging/sdist/check-link-behavior.py
++++ b/packaging/sdist/check-link-behavior.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Checks for link behavior required for sdist to retain symlinks."""
+
+ from __future__ import (absolute_import, division, print_function)
+--- a/test/integration/targets/cli/test-cli.py
++++ b/test/integration/targets/cli/test-cli.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Copyright (c) 2019 Matt Martz <matt@sivel.net>
+ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+--- a/test/integration/targets/gathering/uuid.fact
++++ b/test/integration/targets/gathering/uuid.fact
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+
+--- a/test/integration/targets/gathering_facts/uuid.fact
++++ b/test/integration/targets/gathering_facts/uuid.fact
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+
+--- a/test/integration/targets/group/files/gidget.py
++++ b/test/integration/targets/group/files/gidget.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ import grp
+
+--- a/test/integration/targets/module_utils/module_utils/foo.py
++++ b/test/integration/targets/module_utils/module_utils/foo.py
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ foo = "FOO FROM foo.py"
+--- a/test/integration/targets/module_utils/module_utils/sub/bam.py
++++ b/test/integration/targets/module_utils/module_utils/sub/bam.py
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ bam = "BAM FROM sub/bam.py"
+--- a/test/integration/targets/module_utils/module_utils/sub/bam/bam.py
++++ b/test/integration/targets/module_utils/module_utils/sub/bam/bam.py
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ bam = "BAM FROM sub/bam/bam.py"
+--- a/test/integration/targets/module_utils/module_utils/sub/bar/bam.py
++++ b/test/integration/targets/module_utils/module_utils/sub/bar/bam.py
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ bam = "BAM FROM sub/bar/bam.py"
+--- a/test/integration/targets/module_utils/module_utils/sub/bar/bar.py
++++ b/test/integration/targets/module_utils/module_utils/sub/bar/bar.py
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ bar = "BAR FROM sub/bar/bar.py"
+--- a/test/integration/targets/pause/test-pause.py
++++ b/test/integration/targets/pause/test-pause.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ import os
+ import pexpect
+--- a/test/integration/targets/pip/files/setup.py
++++ b/test/integration/targets/pip/files/setup.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ from setuptools import setup, find_packages
+
+--- a/test/integration/targets/service/files/ansible_test_service.py
++++ b/test/integration/targets/service/files/ansible_test_service.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # this is mostly based off of the code found here:
+ # http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/
+--- a/test/integration/targets/setup_rpm_repo/files/create-repo.py
++++ b/test/integration/targets/setup_rpm_repo/files/create-repo.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+
+ import sys
+--- a/test/integration/targets/template/role_filter/filter_plugins/myplugin.py
++++ b/test/integration/targets/template/role_filter/filter_plugins/myplugin.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+
+ class FilterModule(object):
+--- a/test/integration/targets/throttle/test_throttle.py
++++ b/test/integration/targets/throttle/test_throttle.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/integration/targets/var_precedence/ansible-var-precedence-check.py
++++ b/test/integration/targets/var_precedence/ansible-var-precedence-check.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # A tool to check the order of precedence for ansible variables
+ # https://github.com/ansible/ansible/blob/devel/test/integration/test_var_precedence.yml
+--- a/test/integration/targets/vault/faux-editor.py
++++ b/test/integration/targets/vault/faux-editor.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Ansible is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+--- a/test/integration/targets/vault/password-script.py
++++ b/test/integration/targets/vault/password-script.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Ansible is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+--- a/test/integration/targets/vault/test-vault-client.py
++++ b/test/integration/targets/vault/test-vault-client.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ ANSIBLE_METADATA = {'status': ['preview'],
+--- a/test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py
++++ b/test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # PYTHON_ARGCOMPLETE_OK
+ """Command line entry point for ansible-test."""
+
+--- a/test/lib/ansible_test/_data/injector/python.py
++++ b/test/lib/ansible_test/_data/injector/python.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Provides an entry point for python scripts and python modules on the controller with the current python interpreter and optional code coverage collection."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Test to verify action plugins have an associated module to provide documentation."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/sanity/code-smell/empty-init.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/empty-init.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/line-endings.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/line-endings.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-assert.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-assert.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # a script to check for illegal filenames on various Operating Systems. The
+ # main rules are derived from restrictions on Windows
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/shebang.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/shebang.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python33
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+@@ -16,14 +16,14 @@
+ b'#!/usr/bin/env bash',
+ b'#!/usr/bin/env fish',
+ b'#!/usr/bin/env pwsh',
+- b'#!/usr/bin/env python',
++ b'#!/usr/bin/env python3',
+ b'#!/usr/bin/make -f',
+ ])
+
+ integration_shebangs = set([
+ b'#!/bin/sh',
+ b'#!/usr/bin/env bash',
+- b'#!/usr/bin/env python',
++ b'#!/usr/bin/env python3',
+ ])
+
+ module_shebangs = {
+--- a/test/lib/ansible_test/_data/sanity/code-smell/symlinks.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/symlinks.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/compile/compile.py
++++ b/test/lib/ansible_test/_data/sanity/compile/compile.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Python syntax checker with lint friendly output."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/sanity/import/importer.py
++++ b/test/lib/ansible_test/_data/sanity/import/importer.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Import the given python module(s) and report error(s) encountered."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/sanity/validate-modules/main.py
++++ b/test/lib/ansible_test/_data/sanity/validate-modules/main.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py
++++ b/test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Wrapper around yamllint that supports YAML embedded in Ansible modules."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/versions.py
++++ b/test/lib/ansible_test/_data/versions.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Show python and pip versions."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/virtualenvcheck.py
++++ b/test/lib/ansible_test/_data/virtualenvcheck.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Detect the real python interpreter when running in a virtual environment created by the 'virtualenv' module."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/yamlcheck.py
++++ b/test/lib/ansible_test/_data/yamlcheck.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Show python and pip versions."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/sanity/code-smell/configure-remoting-ps1.py
++++ b/test/sanity/code-smell/configure-remoting-ps1.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/sanity/code-smell/deprecated-config.py
++++ b/test/sanity/code-smell/deprecated-config.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # (c) 2018, Matt Martz <matt@sivel.net>
+ #
+--- a/test/sanity/code-smell/docs-build.py
++++ b/test/sanity/code-smell/docs-build.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/sanity/code-smell/no-unwanted-files.py
++++ b/test/sanity/code-smell/no-unwanted-files.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Prevent unwanted files from being added to the source tree."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/sanity/code-smell/obsolete-files.py
++++ b/test/sanity/code-smell/obsolete-files.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Prevent files from being added to directories that are now obsolete."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/sanity/code-smell/package-data.py
++++ b/test/sanity/code-smell/package-data.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/sanity/code-smell/required-and-default-attributes.py
++++ b/test/sanity/code-smell/required-and-default-attributes.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/sanity/code-smell/test-constraints.py
++++ b/test/sanity/code-smell/test-constraints.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/sanity/code-smell/update-bundled.py
++++ b/test/sanity/code-smell/update-bundled.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # (c) 2018, Ansible Project
+ #
+--- a/test/integration/targets/ansible-galaxy-collection/files/build_bad_tar.py
++++ b/test/integration/targets/ansible-galaxy-collection/files/build_bad_tar.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # Copyright: (c) 2020, Ansible Project
+ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+--- a/test/integration/targets/builtin_vars_prompt/test-vars_prompt.py
++++ b/test/integration/targets/builtin_vars_prompt/test-vars_prompt.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ import os
+ import pexpect
+--- a/test/integration/targets/cli/test_k_and_K.py
++++ b/test/integration/targets/cli/test_k_and_K.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+
+ # Make coding more python3-ish
+--- a/test/integration/targets/service_facts/files/ansible_test_service.py
++++ b/test/integration/targets/service_facts/files/ansible_test_service.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # this is mostly based off of the code found here:
+ # http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/
+--- a/test/lib/ansible_test/_data/sanity/code-smell/changelog.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/changelog.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+
+--- a/test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py
++++ b/test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Schema validation of ansible-base's ansible_builtin_runtime.yml and collection's meta/runtime.yml"""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/lib/ansible_test/_data/sslcheck.py
++++ b/test/lib/ansible_test/_data/sslcheck.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Show openssl version."""
+ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+--- a/test/sanity/code-smell/release-names.py
++++ b/test/sanity/code-smell/release-names.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # (c) 2019, Ansible Project
+ #
+--- a/test/integration/targets/blocks/runme.sh
++++ b/test/integration/targets/blocks/runme.sh
+@@ -9,7 +9,7 @@
+ rm -f block_test.out
+ # run the test and check to make sure the right number of completions was logged
+ ansible-playbook -vv main.yml -i ../../inventory | tee block_test.out
+-env python -c \
++env python3 -c \
+ 'import sys, re; sys.stdout.write(re.sub("\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "", sys.stdin.read()))' \
+ <block_test.out >block_test_wo_colors.out
+ [ "$(grep -c 'TEST COMPLETE' block_test.out)" = "$(grep -E '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ]
+@@ -17,7 +17,7 @@
+ rm -f block_test.out block_test_wo_colors.out
+ # run test with free strategy and again count the completions
+ ansible-playbook -vv main.yml -i ../../inventory -e test_strategy=free | tee block_test.out
+-env python -c \
++env python3 -c \
+ 'import sys, re; sys.stdout.write(re.sub("\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "", sys.stdin.read()))' \
+ <block_test.out >block_test_wo_colors.out
+ [ "$(grep -c 'TEST COMPLETE' block_test.out)" = "$(grep -E '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ]
+@@ -25,7 +25,7 @@
+ rm -f block_test.out block_test_wo_colors.out
+ # run test with host_pinned strategy and again count the completions
+ ansible-playbook -vv main.yml -i ../../inventory -e test_strategy=host_pinned | tee block_test.out
+-env python -c \
++env python3 -c \
+ 'import sys, re; sys.stdout.write(re.sub("\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "", sys.stdin.read()))' \
+ <block_test.out >block_test_wo_colors.out
+ [ "$(grep -c 'TEST COMPLETE' block_test.out)" = "$(grep -E '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ]
+@@ -33,7 +33,7 @@
+ # run test that includes tasks that fail inside a block with always
+ rm -f block_test.out block_test_wo_colors.out
+ ansible-playbook -vv block_fail.yml -i ../../inventory | tee block_test.out
+-env python -c \
++env python3 -c \
+ 'import sys, re; sys.stdout.write(re.sub("\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "", sys.stdin.read()))' \
+ <block_test.out >block_test_wo_colors.out
+ [ "$(grep -c 'TEST COMPLETE' block_test.out)" = "$(grep -E '^[0-9]+ plays in' block_test_wo_colors.out | cut -f1 -d' ')" ]
+--- a/test/integration/targets/plugin_config_for_inventory/runme.sh
++++ b/test/integration/targets/plugin_config_for_inventory/runme.sh
+@@ -7,10 +7,10 @@
+
+ # check default values
+ ansible-inventory --list -i ./config_without_parameter.yml --export | \
+- env python -c "import json, sys; inv = json.loads(sys.stdin.read()); \
++ env python3 -c "import json, sys; inv = json.loads(sys.stdin.read()); \
+ assert set(inv['_meta']['hostvars']['test_host']['departments']) == set(['seine-et-marne', 'haute-garonne'])"
+
+ # check values
+ ansible-inventory --list -i ./config_with_parameter.yml --export | \
+- env python -c "import json, sys; inv = json.loads(sys.stdin.read()); \
++ env python3 -c "import json, sys; inv = json.loads(sys.stdin.read()); \
+ assert set(inv['_meta']['hostvars']['test_host']['departments']) == set(['paris'])"
+--- a/docs/docsite/Makefile
++++ b/docs/docsite/Makefile
+@@ -1,5 +1,5 @@
+ OS := $(shell uname -s)
+-SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"):
++SITELIB = $(shell python3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"):
+ PLUGIN_FORMATTER=../../hacking/build-ansible.py docs-build
+ TESTING_FORMATTER=../bin/testing_formatter.sh
+ KEYWORD_DUMPER=../../hacking/build-ansible.py document-keywords
+@@ -31,7 +31,7 @@
+ endif
+ endif
+
+-PYTHON=python
++PYTHON=python3
+ MAJOR_VERSION := $(shell $(PYTHON) ../../packaging/release/versionhelper/version_helper.py --majorversion || echo error)
+
+ ANSIBLE_VERSION_ARGS=