From 2b293a1bfae6cefe17efa820e41ef698663749f2 Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Mon, 10 Aug 2020 16:02:42 +0200 Subject: [PATCH] Pin isort to 4.3.21 This patch fixes multiple issues to unblock gate: 1. With new isort releases (5.X.X) pylint started to fail, with error: AttributeError: module 'isort' has no attribute 'SortImports' This patch pin isort to 4.3.21, the last version before 5.0.0. 2. lower-constraints of appdirs and pytz need to be updated as currently lower-constraints job fails. Since patch Ia012a8e116a276a6674f86366c803e0e2d8ff704 modified the NEUTRON_PATH variable the functional test fails with: [..]neutron/tools/configure_for_func_testing.sh: line 113: /home/zuul/src/opendev.org/openstack/neutron-vpnaas/devstack/lib/ovs: No such file or directory 3. Functional job fails, because during tox run the latest released neutron is installed and it requires mock to be installed. This patch adds mock to functional test requirements. Note: this needs to be deleted as soon as new neutron will be released as on development branch neutron does not depend on mock anymore. Change-Id: Ibc4cd7f8a055457b288ef101893c252cf0464a28 --- lower-constraints.txt | 5 +++-- neutron_vpnaas/tests/functional/requirements.txt | 5 +++++ test-requirements.txt | 1 + tools/configure_for_vpn_func_testing.sh | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 0c6a19bf0..3d923f16a 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -1,7 +1,7 @@ alabaster==0.7.10 alembic==0.8.10 amqp==2.1.1 -appdirs==1.3.0 +appdirs==1.4.3 asn1crypto==0.23.0 astroid==1.3.8 beautifulsoup4==4.6.0 @@ -32,6 +32,7 @@ httplib2==0.9.1 idna==2.6 imagesize==0.7.1 iso8601==0.1.11 +isort==4.3.21 Jinja2==2.10 jmespath==0.9.0 jsonpatch==1.16 @@ -111,7 +112,7 @@ python-mimeparse==1.6.0 python-neutronclient==6.7.0 python-novaclient==9.1.0 python-subunit==1.0.0 -pytz==2013.6 +pytz==2015.7 PyYAML==3.12 reno==3.1.0 repoze.lru==0.7 diff --git a/neutron_vpnaas/tests/functional/requirements.txt b/neutron_vpnaas/tests/functional/requirements.txt index 857e3dffd..2c220aca2 100644 --- a/neutron_vpnaas/tests/functional/requirements.txt +++ b/neutron_vpnaas/tests/functional/requirements.txt @@ -8,3 +8,8 @@ psutil>=1.1.1,<2.0.0 psycopg2 PyMySQL>=0.6.2 # MIT License +# Make sure that mock is installed in functional environment for +# neutron. This needs to be removed from master as soon as new neutron +# is released from Victoria, as mock is removed in development branch. +mock>=2.0.0 # BSD + diff --git a/test-requirements.txt b/test-requirements.txt index 8b641b4fd..9946dd98e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,6 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD flake8-import-order==0.12 # LGPLv3 +isort==4.3.21 # MIT pylint==2.3.0 # GPLv2 requests-mock>=1.2.0 # Apache-2.0 sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/tools/configure_for_vpn_func_testing.sh b/tools/configure_for_vpn_func_testing.sh index 33b9931a5..32e30114d 100755 --- a/tools/configure_for_vpn_func_testing.sh +++ b/tools/configure_for_vpn_func_testing.sh @@ -20,6 +20,7 @@ IS_GATE=${IS_GATE:-False} USE_CONSTRAINT_ENV=${USE_CONSTRAINT_ENV:-False} PROJECT_NAME=${PROJECT_NAME:-neutron-vpnaas} REPO_BASE=${GATE_DEST:-$(cd $(dirname "$BASH_SOURCE")/../.. && pwd)} +NEUTRON_DIR=$REPO_BASE/neutron source $REPO_BASE/neutron/tools/configure_for_func_testing.sh source $REPO_BASE/neutron-vpnaas/devstack/settings