Add gate for python 3.9

Add support for Debian bullseye which runs python3.9.
This was tested by running tox locally on a Debian bullseye
VM.

Story: 2006796
Task: 42931,42925,43099

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I2b18437db2249ecd7b358c6d1e49023afa3da21a
This commit is contained in:
Charles Short 2021-08-03 09:45:05 -04:00
parent 39c785ea8e
commit 1244357401
5 changed files with 53 additions and 6 deletions

View File

@ -15,11 +15,13 @@
- sysinv-tox-bandit
- controllerconfig-tox-py27
- controllerconfig-tox-py36
- controllerconfig-tox-py39
- controllerconfig-tox-flake8
- controllerconfig-tox-pylint
- tsconfig-tox-pylint
- tsconfig-tox-py27
- tsconfig-tox-py36
- config-tox-py39
- tsconfig-tox-flake8
- cgtsclient-tox-py27
- cgtsclient-tox-py36
@ -37,11 +39,13 @@
- sysinv-tox-bandit
- controllerconfig-tox-py27
- controllerconfig-tox-py36
- controllerconfig-tox-py39
- controllerconfig-tox-flake8
- controllerconfig-tox-pylint
- config-tox-pylint
- config-tox-py27
- config-tox-py36
- config-tox-py39
- config-tox-flake8
- cgtsclient-tox-py27
- cgtsclient-tox-py36
@ -168,6 +172,20 @@
tox_envlist: py36
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
- job:
name: controllerconfig-tox-py39
parent: tox-py39
description: Run py39 tests for controllerconfig
nodeset: debian-bullseye
required-projects:
- starlingx/fault
- starlingx/root
files:
- controllerconfig/*
vars:
tox_envlist: py39
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
- job:
name: controllerconfig-tox-flake8
parent: tox
@ -225,6 +243,17 @@
tox_envlist: py36
tox_extra_args: -c tsconfig/tsconfig/tox.ini
- job:
name: config-tox-py39
parent: tox-py39
description: Run py39 tests for tsconfig
nodeset: debian-bullseye
files:
- tsconfig/*
vars:
tox_envlist: py39
tox_extra_args: -c tsconfig/tsconfig/tox.ini
- job:
name: config-tox-flake8
parent: tox
@ -290,11 +319,10 @@
parent: tox-py39
description: |
Run py39 test for cgts-client
nodeset: ubuntu-focal
nodeset: debian-bullseye
files:
- sysinv/cgts-client/*
vars:
bindep_profile: test py39
python_version: 3.9
tox_envlist: py39
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini

View File

@ -2,10 +2,10 @@
netaddr>=0.7.13,!=0.7.16 # BSD
keyring>=5.5.1 # MIT/PSF
pyudev # LGPLv2.1+
psycopg2>=2.5 # LGPL/ZPL
six>=1.9.0 # MIT
iso8601>=0.1.11 # MIT
netifaces>=0.10.4 # MIT
pycrypto>=2.6 # Public Domain
oslo.utils>=3.20.0 # Apache-2.0
PyYAML>=3.1.0
psycopg2-binary

View File

@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = flake8, pylint, py27, py36
envlist = flake8, pylint, py27, py36, py39
# Tox does not work if the path to the workdir is too long, so move it to /tmp
toxworkdir = /tmp/{env:USER}_cctox
stxdir = {toxinidir}/../../..
@ -56,6 +56,17 @@ basepython = python3
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 {posargs}
[testenv:py39]
basepython = python3.9
install_command = pip install \
--no-cache-dir \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
commands =
{[testenv]commands}
stestr run {posargs}
stestr slowest
[flake8]
# H series are hacking
# H101: Use TODO(NAME)

View File

@ -50,7 +50,7 @@ commands =
basepython = python3.9
install_command = pip install \
-U \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/victoria/upper-constraints.txt} \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt

View File

@ -5,7 +5,7 @@
#
[tox]
envlist = flake8,py27,py36,pylint,cover
envlist = flake8,py27,py36,py39,pylint,cover
minversion = 2.3.2
[testenv]
@ -39,6 +39,14 @@ commands = {[testenv:stestr]commands}
basepython = python3.6
commands = {[testenv:stestr]commands}
[testenv:py39]
basepython = python3.9
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {[testenv:stestr]commands}
[flake8]
# ignore below errors , will fix flake8 errors in future
# H102 Apache 2.0 license header not found