From b15a7289dc23a8a48274535e6e7cd75a7a65548e Mon Sep 17 00:00:00 2001 From: Aurelien Lourot Date: Thu, 10 Dec 2020 22:21:43 +0100 Subject: [PATCH] Sync release-tools Sync release-tools boilerplate containing these changes in order to pin pip < 20.3: https://github.com/openstack-charmers/release-tools/pull/125 https://github.com/openstack-charmers/release-tools/pull/126 Change-Id: Iac0e4406b4a8b992dc1dba38970a1105f732b3a2 --- requirements.txt | 19 +++++++++++++++++-- src/files/.gitkeep | 0 src/test-requirements.txt | 7 +++++++ src/tox.ini | 13 ++++++++++++- test-requirements.txt | 23 ++++++++++++++++++++++- 5 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 src/files/.gitkeep diff --git a/requirements.txt b/requirements.txt index aaaa3e0..a4d3eff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,9 +3,24 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +# NOTE(lourot): This might look like a duplication of test-requirements.txt but +# some tox targets use only test-requirements.txt whereas charm-build uses only +# requirements.txt setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 + # Build requirements charm-tools>=2.4.4 -# importlib-resources 1.1.0 removed Python 3.5 support -importlib-resources<1.1.0 + +# Workaround until https://github.com/juju/charm-tools/pull/589 gets +# published +keyring<21 + simplejson + +# Newer versions use keywords that didn't exist in python 3.5 yet (e.g. +# "ModuleNotFoundError") +# NOTE(lourot): This might look like a duplication of test-requirements.txt but +# some tox targets use only test-requirements.txt whereas charm-build uses only +# requirements.txt +importlib-metadata<3.0.0; python_version < '3.6' +importlib-resources<3.0.0; python_version < '3.6' diff --git a/src/files/.gitkeep b/src/files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/test-requirements.txt b/src/test-requirements.txt index d3c9be8..520681e 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -3,6 +3,13 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +# pep8 requirements +charm-tools>=2.4.4 + +# Workaround until https://github.com/juju/charm-tools/pull/589 gets +# published +keyring<21 + # Functional Test Requirements (let Zaza's dependencies solve all dependencies here!) git+https://github.com/openstack-charmers/zaza.git#egg=zaza git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack diff --git a/src/tox.ini b/src/tox.ini index 07a7adc..e763047 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -11,6 +11,18 @@ skipsdist = True sitepackages = False # NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False +# NOTES: +# * We avoid the new dependency resolver by pinning pip < 20.3, see +# https://github.com/pypa/pip/issues/9187 +# * Pinning dependencies requires tox >= 3.2.0, see +# https://tox.readthedocs.io/en/latest/config.html#conf-requires +# * It is also necessary to pin virtualenv as a newer virtualenv would still +# lead to fetching the latest pip in the func* tox targets, see +# https://stackoverflow.com/a/38133283 +requires = pip < 20.3 + virtualenv < 20.0 +# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci +minversion = 3.2.0 [testenv] setenv = VIRTUAL_ENV={envdir} @@ -23,7 +35,6 @@ install_command = [testenv:pep8] basepython = python3 -deps=charm-tools commands = charm-proof [testenv:func-noop] diff --git a/test-requirements.txt b/test-requirements.txt index d078e27..8ab24b2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,10 +6,31 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # Lint and unit test requirements flake8>=2.2.4 + stestr>=2.2.0 + +# Dependency of stestr. Workaround for +# https://github.com/mtreinish/stestr/issues/145 +cliff<3.0.0 + +# Dependencies of stestr. Newer versions use keywords that didn't exist in +# python 3.5 yet (e.g. "ModuleNotFoundError") +importlib-metadata<3.0.0; python_version < '3.6' +importlib-resources<3.0.0; python_version < '3.6' + +# Some Zuul nodes sometimes pull newer versions of these dependencies which +# dropped support for python 3.5: +osprofiler<2.7.0;python_version<'3.6' +stevedore<1.31.0;python_version<'3.6' + requests>=2.18.4 charms.reactive -mock>=1.2 + +# Newer mock seems to have some syntax which is newer than python3.5 (e.g. +# f'{something}' +mock>=1.2,<4.0.0; python_version < '3.6' +mock>=1.2; python_version >= '3.6' + nose>=1.3.7 coverage>=3.6 git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack