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 07be793435)
(cherry picked from commit d1c4ba5810)
(cherry picked from commit 34239888eb)
This commit is contained in:
Elod Illes 2019-12-12 11:14:10 +01:00 committed by Bernard Cafarelli
parent 22250e783b
commit ca63f48054
No known key found for this signature in database
GPG Key ID: 9531F08245465A52
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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]