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
This commit is contained in:
James E. Blair 2020-03-02 07:18:55 -08:00
parent 5823ca6e23
commit f6d6371c39
3 changed files with 12 additions and 0 deletions

View File

@ -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/.*

8
playbooks/fix-tox.yaml Normal file
View File

@ -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

View File

@ -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