Be clear about python3: Remove its support

We have never really tested python3 at large scale, and more and
more bugs are filed in stable branches due to dual stack.

We should stick to python2 in the stable branches, which is
what was tested in our gates.

- Python3 inventory testing isn't exercised anywhere and should
  therefore be removed, because of its setting false expectations.
- The bootstrap removed all references to python3, to ensure
  python2 is always used.

Change-Id: I5d98b90709d668f2042bd59238c924101c1d116b
This commit is contained in:
Jean-Philippe Evrard 2018-05-02 17:29:51 +02:00
parent e0a1948d3f
commit 933dabb4a6
3 changed files with 4 additions and 16 deletions

View File

@ -20,9 +20,6 @@ libffi-dev [platform:dpkg]
python2.7 [platform:dpkg]
python-apt [platform:dpkg]
python-dev [platform:dpkg]
python3 [platform:dpkg]
python3-apt [platform:dpkg]
python3-dev [platform:dpkg]
# Base requirements for RPM distros
gcc-c++ [platform:rpm]

View File

@ -77,9 +77,8 @@ case ${DISTRO_ID} in
DEBIAN_FRONTEND=noninteractive apt-get -y install \
git-core curl gcc netcat \
python-minimal python-dev \
python3 python3-dev \
libssl-dev libffi-dev \
python-apt python3-apt \
python-apt \
python-virtualenv
;;
opensuse)
@ -104,8 +103,9 @@ elif [ -n "$HTTP_PROXY" ]; then
PIP_OPTS="--proxy $HTTP_PROXY"
fi
# Figure out the version of python is being used
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3 || which python2 || which python)}"
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python2)}"
PYTHON_VERSION="$($PYTHON_EXEC_PATH -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')"
# Use https when Python with native SNI support is available
@ -156,7 +156,7 @@ virtualenv --python=${PYTHON_EXEC_PATH} \
/opt/ansible-runtime
# Install pip, setuptools and wheel into the venv
get_pip /opt/ansible-runtime/bin/python
get_pip /opt/ansible-runtime/bin/python2
# The vars used to prepare the Ansible runtime venv
PIP_COMMAND="/opt/ansible-runtime/bin/pip"

View File

@ -139,15 +139,6 @@ commands =
[testenv:py3-inventory]
basepython = python3.5
setenv =
{[testenv:inventory]setenv}
commands =
{[testenv:inventory]commands}
[testenv:linters]
deps =
{[testenv:ansible]deps}