From ca63f48054d7e359c47ebd73541f114b1fcba6ba Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Thu, 12 Dec 2019 11:14:10 +0100 Subject: [PATCH] Use constraints for docs tox target and cap hacking This patch fixes 3 problems to fix gate jobs in Rocky. 1. In Stein the docs target started to fail when new release of neutron-lib appeared. This is because tox installs neutron and its requirements without any constraints. To fix this both the upper constraints and neutron requirements needs to be added to dependencies of docs target. 2. Cap hacking in test-requirements.txt hacking as a linter is in global requirements blacklist and so is not in constraints. Recent release introduced new rules that required fix on master, on stable branches we should rather cap to the version that was in use during this release development. 3. Update sphinx requirements Requirement check is failing on sphinx: Requirement(package='sphinx', location='', specifiers='!=1.6.6,>=1.6.2', markers='', comment='# BSD', extras=frozenset()) 'markers': '' does not match "python_version>='3.4'" Could not find a global requirements entry to match package {}. If the package is already included in the global list, the name or platform markers there may not match the local settings. Conflicts: tox.ini Closes-Bug: #1856156 Change-Id: Iea61238f37fdf24c0264f96d104ee0b3b6aec8e2 (cherry picked from commit 07be7934359aa121761396ba47128904f19cb2e4) (cherry picked from commit d1c4ba581085f4978da82a597b1387d60e79ff0c) (cherry picked from commit 34239888eb661415ed372808304a42339563dad6) --- doc/requirements.txt | 3 ++- test-requirements.txt | 2 +- tox.ini | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index bc02da36353..5d2658ab2b5 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,8 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -sphinx!=1.6.6,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index dd8819e5f50..3b5df74eb74 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0 # Apache-2.0 +hacking>=1.1.0,<1.2.0 # Apache-2.0 bandit>=1.1.0,<1.5.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 93334f55f0c..4c9fdf0d173 100644 --- a/tox.ini +++ b/tox.ini @@ -143,7 +143,11 @@ commands = {posargs} [testenv:docs] basepython = python3 -deps = -r{toxinidir}/doc/requirements.txt +envdir = {toxworkdir}/docs +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/rocky} + -r{toxinidir}/doc/requirements.txt + -r{toxinidir}/requirements.txt commands = sphinx-build -W -b html doc/source doc/build/html [testenv:linkcheck]