py3: Add support for python3.9

Enable python3.9 in tox.ini and zuul gate. Tested locally
by running tox and running in the zuul gate.

Story: 2009101
Task: 43105

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I44eaeb134d6b7b54788469fa469b04674aeb90c0
This commit is contained in:
Charles Short 2021-08-05 10:49:27 -04:00
parent a79efa7442
commit 418deca242
3 changed files with 70 additions and 2 deletions

View File

@ -12,9 +12,11 @@
- patch-tox-pylint
- patch-tox-py27
- patch-tox-py36
- patch-tox-py39
- patch-alarm-tox-pylint
- patch-alarm-tox-py27
- patch-alarm-tox-py36
- patch-alarm-tox-py39
gate:
jobs:
- openstack-tox-linters
@ -23,9 +25,11 @@
- patch-tox-pylint
- patch-tox-py27
- patch-tox-py36
- patch-tox-py39
- patch-alarm-tox-pylint
- patch-alarm-tox-py27
- patch-alarm-tox-py36
- patch-alarm-tox-py39
post:
jobs:
- stx-update-upload-git-mirror
@ -85,6 +89,22 @@
tox_envlist: py36
tox_extra_args: -c cgcs-patch/cgcs-patch/tox.ini
- job:
name: patch-tox-py39
parent: tox-py39
nodeset: debian-bullseye
required-projects:
- starlingx/config
- starlingx/fault
- starlingx/root
files:
- cgcs-patch/cgcs-patch/*
vars:
tox_envlist: py39
python_version: 3.9
tox_extra_args: -c cgcs-patch/cgcs-patch/tox.ini
- job:
name: patch-alarm-tox-pylint
parent: tox
@ -124,6 +144,21 @@
tox_envlist: py36
tox_extra_args: -c patch-alarm/patch-alarm/tox.ini
- job:
name: patch-alarm-tox-py39
parent: tox-py39
nodeset: debian-bullseye
required-projects:
- starlingx/config
- starlingx/fault
- starlingx/root
files:
- patch-alarm/patch-alarm/*
vars:
python_version: 3.9
tox_envlist: py39
tox_extra_args: -c patch-alarm/patch-alarm/tox.ini
- job:
name: flock-devstack-update
parent: flock-devstack-base-min

View File

@ -5,7 +5,7 @@
#
[tox]
envlist = flake8,py27,py36,pylint,cover
envlist = flake8,py27,py36,py39,pylint,cover
minversion = 2.3.2
skipsdist = True
@ -57,6 +57,18 @@ commands = {[testenv:stestr]commands}
basepython = python3.6
commands = {[testenv:stestr]commands}
[testenv:py39]
basepython = python3.9
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
commands =
find . -name "*.pyc" -delete
stestr run {posargs}
stestr slowest
[bandit]
# B101: Test for use of assert
# B104: Test for binding to all interfaces

View File

@ -5,7 +5,7 @@
#
[tox]
envlist = flake8,py27,py36,pylint,cover
envlist = flake8,py27,py36,py39,pylint,cover
minversion = 2.3.2
skipsdist = True
@ -58,6 +58,27 @@ commands = {[testenv:stestr]commands}
basepython = python3.6
commands = {[testenv:stestr]commands}
[testenv:py39]
basepython = python3.9
install_command = pip install \
-v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
{opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
-e{[tox]stxdir}/fault/fm-api
-e{[tox]stxdir}/config/tsconfig/tsconfig
-e{[tox]stxdir}/update/cgcs-patch/cgcs-patch
commands =
find . -name "*.pyc" -delete
stestr run {posargs}
stestr slowest
[bandit]
exclude = tests