From 0c1d865c79d66c6868d4c2bb5037483fe5cd4a54 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Sat, 26 Sep 2020 18:27:02 +0100 Subject: [PATCH] Sync libraries & common files prior to freeze * charm-helpers sync for classic charms * charms.ceph sync for ceph charms * rebuild for reactive charms * sync tox.ini files as needed * sync requirements.txt files to sync to standard Change-Id: Ibfd4f59f61ed93bd36ebe786f52ef2b3c7d0fef1 --- rebuild | 2 +- requirements.txt | 1 + test-requirements.txt | 3 ++- tox.ini | 2 +- unit_tests/__init__.py | 3 +++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rebuild b/rebuild index bce483e..758d7f3 100644 --- a/rebuild +++ b/rebuild @@ -2,4 +2,4 @@ # when dependencies of the charm change, # but nothing in the charm needs to. # simply change the uuid to something new -d9e0b2f4-d02c-11ea-82d8-7f5c74534cca +89c2a27c-0016-11eb-9a58-6bcdef6940f6 diff --git a/requirements.txt b/requirements.txt index 5f2fff3..aaaa3e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +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 diff --git a/test-requirements.txt b/test-requirements.txt index 0ab97f6..d078e27 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,8 +3,9 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 # Lint and unit test requirements -flake8>=2.2.4,<=2.4.1 +flake8>=2.2.4 stestr>=2.2.0 requests>=2.18.4 charms.reactive diff --git a/tox.ini b/tox.ini index afd48f0..c91922e 100644 --- a/tox.ini +++ b/tox.ini @@ -94,4 +94,4 @@ commands = {posargs} [flake8] # E402 ignore necessary for path append before sys module import in actions -ignore = E402,W504 +ignore = E402,W503,W504 diff --git a/unit_tests/__init__.py b/unit_tests/__init__.py index 3ee8c94..c208935 100644 --- a/unit_tests/__init__.py +++ b/unit_tests/__init__.py @@ -15,9 +15,11 @@ import sys import mock + sys.path.append('src') sys.path.append('src/lib') + # Mock out charmhelpers so that we can test without it. import charms_openstack.test_mocks # noqa charms_openstack.test_mocks.mock_charmhelpers() @@ -32,6 +34,7 @@ def _fake_retry(num_retries, base_delay=0, exc_type=Exception): return _retry_on_exception_inner_2 return _retry_on_exception_inner_1 + mock.patch( 'charmhelpers.core.decorators.retry_on_exception', _fake_retry).start()