From c7417f09d79ea350eda73b901d6b435cf46c7a1c Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 13 Jan 2020 13:09:33 -0800 Subject: [PATCH] [stable-2.7] Add test constraint for setuptools. (#66426) * Add test constraint for setuptools. * Update pip test to work on centos6 container.. (cherry picked from commit 51e5b714e040dd21b1528866d0e13d2672160678) Co-authored-by: Matt Clay --- changelogs/fragments/ansible-test-setuptools-constraint.yml | 2 ++ test/integration/targets/pip/tasks/pip.yml | 6 +++++- test/runner/requirements/constraints.txt | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ansible-test-setuptools-constraint.yml diff --git a/changelogs/fragments/ansible-test-setuptools-constraint.yml b/changelogs/fragments/ansible-test-setuptools-constraint.yml new file mode 100644 index 00000000000000..8fb0d0551f17bb --- /dev/null +++ b/changelogs/fragments/ansible-test-setuptools-constraint.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test no longer tries to install ``setuptools`` 45+ on Python 2.x since those versions are unsupported diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index 2b5a8ac486fb2e..791e03dc6b6abd 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -510,7 +510,11 @@ - name: install distribute in the virtualenv pip: - name: distribute + # using -c for constraints is not supported as long as tests are executed using the centos6 container + # since the pip version in the venv is not upgraded and is too old (6.0.8) + name: + - distribute + - setuptools<45 # setuptools 45 and later require python 3.5 or later virtualenv: "{{ output_dir }}/pipenv" state: present diff --git a/test/runner/requirements/constraints.txt b/test/runner/requirements/constraints.txt index eff50cfb3263a0..0116de83892edb 100644 --- a/test/runner/requirements/constraints.txt +++ b/test/runner/requirements/constraints.txt @@ -28,3 +28,4 @@ virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later requi pyopenssl < 18.0.0 ; python_version < '2.7' # pyOpenSSL 18.0.0 and later require python 2.7 or later pyfmg == 0.6.1 # newer versions do not pass current unit tests pycparser < 2.19 ; python_version < '2.7' # pycparser 2.19 and later require python 2.7 or later +setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later