From 4160790b5d30ebd3d45d8a5e94f795eb302d5c4f Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Mon, 10 Feb 2020 15:52:55 -0500 Subject: [PATCH 1/2] ansible-test - add constraint for virtualenv --- changelogs/fragments/ansible-test-constraints-virtualenv.yml | 2 ++ test/lib/ansible_test/_data/requirements/constraints.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ansible-test-constraints-virtualenv.yml diff --git a/changelogs/fragments/ansible-test-constraints-virtualenv.yml b/changelogs/fragments/ansible-test-constraints-virtualenv.yml new file mode 100644 index 00000000000000..2754a9c558b61a --- /dev/null +++ b/changelogs/fragments/ansible-test-constraints-virtualenv.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - add additional constraint for virtualenv on Python 2.7 diff --git a/test/lib/ansible_test/_data/requirements/constraints.txt b/test/lib/ansible_test/_data/requirements/constraints.txt index 00fc746e2f99d2..d40a50d80393e0 100644 --- a/test/lib/ansible_test/_data/requirements/constraints.txt +++ b/test/lib/ansible_test/_data/requirements/constraints.txt @@ -25,7 +25,8 @@ requests-ntlm >= 1.1.0 # message encryption support requests-credssp >= 0.1.0 # message encryption support voluptuous >= 0.11.0 # Schema recursion via Self openshift >= 0.6.2, < 0.9.0 # merge_type support -virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later +virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later +virtualenv < 20.0.0 ; python_version == '2.7' # virtualenv 20.0.0 breaks on macOS due to the older pip we have there not installing the zipp dependency pathspec < 0.6.0 ; python_version < '2.7' # pathspec 0.6.0 and later require python 2.7 or later 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 From 86e40be0bc777f784f4edcf6ebd2e496b50f1e69 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 10 Feb 2020 15:51:29 -0800 Subject: [PATCH 2/2] Limit virtualenv only on macOS. --- changelogs/fragments/ansible-test-constraints-virtualenv.yml | 2 +- test/lib/ansible_test/_data/requirements/constraints.txt | 3 +-- test/lib/ansible_test/_data/setup/remote.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/changelogs/fragments/ansible-test-constraints-virtualenv.yml b/changelogs/fragments/ansible-test-constraints-virtualenv.yml index 2754a9c558b61a..5376448cb462c3 100644 --- a/changelogs/fragments/ansible-test-constraints-virtualenv.yml +++ b/changelogs/fragments/ansible-test-constraints-virtualenv.yml @@ -1,2 +1,2 @@ bugfixes: - - ansible-test - add additional constraint for virtualenv on Python 2.7 + - ansible-test - Use ``virtualenv`` versions before 20 on provisioned macOS instances to remain compatible with an older pip install. diff --git a/test/lib/ansible_test/_data/requirements/constraints.txt b/test/lib/ansible_test/_data/requirements/constraints.txt index d40a50d80393e0..00fc746e2f99d2 100644 --- a/test/lib/ansible_test/_data/requirements/constraints.txt +++ b/test/lib/ansible_test/_data/requirements/constraints.txt @@ -25,8 +25,7 @@ requests-ntlm >= 1.1.0 # message encryption support requests-credssp >= 0.1.0 # message encryption support voluptuous >= 0.11.0 # Schema recursion via Self openshift >= 0.6.2, < 0.9.0 # merge_type support -virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later -virtualenv < 20.0.0 ; python_version == '2.7' # virtualenv 20.0.0 breaks on macOS due to the older pip we have there not installing the zipp dependency +virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later pathspec < 0.6.0 ; python_version < '2.7' # pathspec 0.6.0 and later require python 2.7 or later 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 diff --git a/test/lib/ansible_test/_data/setup/remote.sh b/test/lib/ansible_test/_data/setup/remote.sh index ea6f912d4cc1e6..8a4d6c2d353ea1 100644 --- a/test/lib/ansible_test/_data/setup/remote.sh +++ b/test/lib/ansible_test/_data/setup/remote.sh @@ -73,7 +73,7 @@ elif [ "${platform}" = "rhel" ]; then elif [ "${platform}" = "osx" ]; then while true; do pip install --disable-pip-version-check --quiet \ - virtualenv \ + 'virtualenv<20' \ && break echo "Failed to install packages. Sleeping before trying again..." sleep 10