From f6d6371c39f757930b4e2662febe1cf5fafca754 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 2 Mar 2020 07:18:55 -0800 Subject: [PATCH] Fix py35 by pinning importlib-resources The global tox installation on our test nodes is affected by an upstream issue[1]. Additionally, the virtualenv created by tox under those conditions is also affected. To work around this, pin the version of importlib-resources in the global tox install, as well as in Zuul's own requirements. [1] https://gitlab.com/python-devs/importlib_resources/issues/83 Change-Id: I31ed50185a71d867a2ad512ef9b526c5b607ed5c --- .zuul.yaml | 2 ++ playbooks/fix-tox.yaml | 8 ++++++++ requirements.txt | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 playbooks/fix-tox.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 3bd0e0c6b8..5c247cbf7f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -195,6 +195,7 @@ - zuul-tox-docs - tox-pep8 - tox-py35: + pre-run: playbooks/fix-tox.yaml irrelevant-files: - zuul/cmd/migrate.py - playbooks/zuul-migrate/.* @@ -251,6 +252,7 @@ - zuul-tox-docs - tox-pep8 - tox-py35: + pre-run: playbooks/fix-tox.yaml irrelevant-files: - zuul/cmd/migrate.py - playbooks/zuul-migrate/.* diff --git a/playbooks/fix-tox.yaml b/playbooks/fix-tox.yaml new file mode 100644 index 0000000000..f786d9bb69 --- /dev/null +++ b/playbooks/fix-tox.yaml @@ -0,0 +1,8 @@ +- hosts: all + pre_tasks: + - name: Fix importlib-resources + become: true + shell: | + pip3 install --upgrade importlib-resources==1.0.2 + args: + executable: /bin/bash diff --git a/requirements.txt b/requirements.txt index 59f67f55fa..854ecf7653 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ pbr>=1.1.0 +# Temporary fix for https://gitlab.com/python-devs/importlib_resources/issues/83 +importlib-resources==1.0.2 # Early virtualenv 20 had bad file location assumptions virtualenv!=20.0.0,!=20.0.1