The 1.6.3 [1] release has dropped support for py2 [2] but the release is faulty and pip still picks it up for py2 [3][4], so cap to 1.6.2 when using py2. With the introduction of the new dependency resolver in 20.3 pip the lower-constraints job starts to fail as now the constraints are working as they should. Multiple fixes needed: * lower-constraints job uses the [testenv]install_command, so it gives both the upper-constraints and lower-constraints, which causes the job to fail. As an easy fix install_command is added to this target without the upper constraints. * duplicate stestr constraint removed * cryptography lower constraint is bumped as with version 2.1 the new resolver of pip takes hours to install the packages * contradicting hacking version replaced (in lower-constraints.txt to match with test-requirements.txt), which pulls in newer flake8, too * lower-constraints test job failed with error message: "[..] unexpected keyword argument 'barbican_endpoint_type'" which is due to old version of castellan. [1] https://github.com/PyCQA/bandit/releases/tag/1.6.3 [2] https://github.com/PyCQA/bandit/pull/615 [3] https://github.com/PyCQA/bandit/issues/663 [4] https://github.com/PyCQA/bandit/issues/665 Change-Id: I4b33c2544c911bd68ed8af4c754c9f5dc0c93be8changes/90/769990/3