py3: Add support 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: 42941

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I5568b85a365104fdbca2af7adcf9f289001baea0
This commit is contained in:
Charles Short 2021-08-04 09:12:38 -04:00
parent d0d380da09
commit 68f1b97a7f
4 changed files with 49 additions and 4 deletions

View File

@ -15,6 +15,7 @@
- stx-fault-build
- fault-rest-api-py27
- fault-rest-api-py36
- fault-rest-api-py39
gate:
jobs:
- openstack-tox-linters
@ -22,6 +23,7 @@
- fault-tox-pylint
- fault-rest-api-py27
- fault-rest-api-py36
- fault-rest-api-py39
post:
jobs:
- stx-fault-upload-git-mirror
@ -82,6 +84,20 @@
tox_envlist: py36
tox_extra_args: -c fm-rest-api/fm/tox.ini
- job:
name: fault-rest-api-py39
parent: tox-py39
description: |
Run py39 test for fm-rest-api
nodeset: debian-bullseye
required-projects:
- starlingx/config
vars:
bindep_profile: test py39
python_version: 3.9
tox_envlist: py39
tox_extra_args: -c fm-rest-api/fm/tox.ini
- job:
name: fault-tox-pylint
parent: tox

View File

@ -1,2 +1,10 @@
diffutils
rpm
# This is a cross-platform list tracking distribution packages needed for install and tests;
# see https://docs.openstack.org/infra/bindep/ for additional information.
libffi-dev [platform:dpkg]
libldap2-dev [platform:dpkg]
libxml2-dev [platform:dpkg]
libxslt1-dev [platform:dpkg]
libsasl2-dev [platform:dpkg]
libffi-devel [platform:rpm]
python3-all-dev [platform:dpkg]

View File

@ -22,4 +22,4 @@ keystonemiddleware>=4.12.0 # Apache-2.0
pecan>=1.0.0
WSME>=0.5b2
httplib2
keyring <= 18.0.1
keyring <= 22.0.1

View File

@ -1,5 +1,5 @@
[tox]
envlist = py27,py36
envlist = py27,py36,py39
minversion = 2.3
skipsdist = True
stxdir = {toxinidir}/../../../
@ -33,6 +33,18 @@ commands =
stestr run {posargs}
stestr slowest
[testenv:py39]
basepython = python3.9
deps = -chttps://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt
-r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/config/tsconfig/tsconfig
-e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client
-e{[tox]stxdir}/fault/fm-api
-e{[tox]stxdir}/fault/fm-rest-api/fm
commands =
stestr run {posargs}
stestr slowest
[testenv:cover]
deps = {[testenv]deps}
coverage
@ -46,3 +58,12 @@ commands =
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
skip_install = True
deps = bindep
commands = bindep test