Preparation for Django 3.0 and 3.1 support (1)
This commit enables non-voting unit test jobs with Django 3.0/3.1. PendingDeprecationWarning is added to PYTHONWARNINGS in tox.ini. PendingDeprecationWarning in Django 3.0+ includes deprecation warnings on what will be dropped in Django 4.0 and they cannot be addressed as long as we use Django 2.2. Change-Id: I44e511ddc1d93fc3e2b68393b88c5f2cd1360854
This commit is contained in:
parent
3fe0802eaa
commit
6a2635e32d
@ -17,15 +17,21 @@
|
||||
pre-run: playbooks/horizon-tox-django/pre.yaml
|
||||
run: playbooks/horizon-tox-django/run.yaml
|
||||
vars:
|
||||
tox_envlist: py36
|
||||
tox_envlist: py38
|
||||
required-projects:
|
||||
- name: openstack/horizon
|
||||
|
||||
- job:
|
||||
name: horizon-tox-python3-django22
|
||||
name: horizon-tox-python3-django30
|
||||
parent: horizon-tox-python3-django
|
||||
vars:
|
||||
django_version: '>=2.2,<3.0'
|
||||
django_version: '>=3.0,<3.1'
|
||||
|
||||
- job:
|
||||
name: horizon-tox-python3-django31
|
||||
parent: horizon-tox-python3-django
|
||||
vars:
|
||||
django_version: '>=3.1,<3.2'
|
||||
|
||||
- project-template:
|
||||
name: horizon-non-primary-django-jobs
|
||||
@ -37,10 +43,15 @@
|
||||
# to run tests with different versions of Django.
|
||||
# We specify a job in openstack-python3-wallaby-jobs(-horizon)
|
||||
# to keep this project template as it is used in horizon plugins.
|
||||
- openstack-tox-py38
|
||||
# NOTE: We keep it as a template even though it is not used now.
|
||||
# - horizon-tox-python3-django22
|
||||
- openstack-tox-py38
|
||||
- horizon-tox-python3-django30:
|
||||
voting: false
|
||||
- horizon-tox-python3-django31:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-py38
|
||||
# - horizon-tox-python3-django22
|
||||
# Skip these until the django3.x jobs become voting.
|
||||
# - horizon-tox-python3-django30
|
||||
# - horizon-tox-python3-django31
|
||||
|
8
tox.ini
8
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 3.1
|
||||
envlist = pep8,py36,py38,releasenotes,npm
|
||||
envlist = pep8,py36,py38,releasenotes,npm,py3-dj{30,31}
|
||||
skipsdist = True
|
||||
# Automatic envs (pyXX) will only use the python version appropriate to that
|
||||
# env and ignore basepython inherited from [testenv] if we set
|
||||
@ -13,8 +13,8 @@ usedevelop = True
|
||||
setenv =
|
||||
VIRTUAL_ENV = {envdir}
|
||||
PYTHONDONTWRITEBYTECODE = 1
|
||||
PYTHONWARNINGS = once
|
||||
py{3,36,37}:PYTHONWARNINGS = once,ignore::ImportWarning:backports
|
||||
PYTHONWARNINGS = once,ignore::PendingDeprecationWarning
|
||||
py{3,36,37}:PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::ImportWarning:backports
|
||||
|
||||
whitelist_externals =
|
||||
bash
|
||||
@ -24,6 +24,8 @@ deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-r{toxinidir}/requirements.txt
|
||||
commands =
|
||||
dj30: pip install django>=3.0,<3.1
|
||||
dj31: pip install django>=3.1,<3.2
|
||||
find . -type f -name "*.pyc" -delete
|
||||
bash {toxinidir}/tools/unit_tests.sh {toxinidir} {posargs}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user