summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2021-02-24 22:58:06 +0900
committerAkihiro Motoki <amotoki@gmail.com>2021-09-16 16:43:17 +0900
commitf3d2b9d540cc789ddc523abeccba733bb23ec5d7 (patch)
tree82bb1aeb9908ebc32317f1fe662d8349922f7a21
parent39f28ad5edacc31575d1de4971de56d765567b58 (diff)
downloadhorizon-f3d2b9d540cc789ddc523abeccba733bb23ec5d7.tar.gz
Preparation for Django 3.2 support
This commit adds a non-voting unit test job with Django 3.2. Jobs with Django 3.0 and 3.1 are dropped now. They were introduced before Django 3.2 was released. Django 3.0 reached EOL and Django 3.1 will reach EOL this December. Django 3.2 is an LTS version so testing with Django 3.2 is enough. Change-Id: Ic6ba0ea281b287b7f4762f92e2e81a6fd654da8f
-rw-r--r--.zuul.d/django-jobs.yaml17
-rw-r--r--tox.ini10
2 files changed, 11 insertions, 16 deletions
diff --git a/.zuul.d/django-jobs.yaml b/.zuul.d/django-jobs.yaml
index 1b73a2447..be8512676 100644
--- a/.zuul.d/django-jobs.yaml
+++ b/.zuul.d/django-jobs.yaml
@@ -22,16 +22,10 @@
- name: openstack/horizon
- job:
- name: horizon-tox-python3-django30
+ name: horizon-tox-python3-django32
parent: horizon-tox-python3-django
vars:
- django_version: '>=3.0,<3.1'
-
-- job:
- name: horizon-tox-python3-django31
- parent: horizon-tox-python3-django
- vars:
- django_version: '>=3.1,<3.2'
+ django_version: '>=3.2,<3.3'
- project-template:
name: horizon-non-primary-django-jobs
@@ -45,13 +39,10 @@
# to keep this project template as it is used in horizon plugins.
# NOTE: We keep it as a template even though it is not used now.
- openstack-tox-py38
- - horizon-tox-python3-django30:
- voting: false
- - horizon-tox-python3-django31:
+ - horizon-tox-python3-django32:
voting: false
gate:
jobs:
- openstack-tox-py38
# Skip these until the django3.x jobs become voting.
- # - horizon-tox-python3-django30
- # - horizon-tox-python3-django31
+ # - horizon-tox-python3-django32
diff --git a/tox.ini b/tox.ini
index 5e6afd99d..4e6e7dc3d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 3.1
-envlist = pep8,py36,py38,releasenotes,npm,py3-dj{30,31}
+envlist = pep8,py36,py38,releasenotes,npm,py3-dj32
skipsdist = True
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
@@ -15,6 +15,11 @@ setenv =
PYTHONDONTWRITEBYTECODE = 1
PYTHONWARNINGS = once,ignore::PendingDeprecationWarning
py{3,36,37}:PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::ImportWarning:backports
+ # DeprecationWarning is disabled in dj32 tox env as Django 3.2
+ # deprecated Django 2.2 features. This workaround is just to reduce
+ # the number of warnings due to this change.
+ # It should be dropped when we drop Django 2.2 support.
+ dj32: PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::DeprecationWarning
whitelist_externals =
bash
@@ -26,8 +31,7 @@ deps =
# Unit test for a local hacking rule requires hacking.
hacking>=3.0.1,<3.1.0 # Apache-2.0
commands =
- dj30: pip install django>=3.0,<3.1
- dj31: pip install django>=3.1,<3.2
+ dj32: pip install django>=3.2,<3.3
find . -type f -name "*.pyc" -delete
bash {toxinidir}/tools/unit_tests.sh {toxinidir} {posargs}