From ec092c753b9979a915389e6a75cc12f2c05e2003 Mon Sep 17 00:00:00 2001 From: Benjamin Wohlwend Date: Mon, 27 Sep 2021 16:59:40 +0200 Subject: [PATCH 1/2] add Django 4.0 (currently in Alpha 1) to test matrix --- .ci/.jenkins_framework.yml | 1 + .ci/.jenkins_framework_full.yml | 1 + tests/contrib/django/testapp/urls.py | 2 +- tests/requirements/reqs-django-4.0.txt | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 tests/requirements/reqs-django-4.0.txt diff --git a/.ci/.jenkins_framework.yml b/.ci/.jenkins_framework.yml index fe9f7d916..413541f63 100644 --- a/.ci/.jenkins_framework.yml +++ b/.ci/.jenkins_framework.yml @@ -6,6 +6,7 @@ FRAMEWORK: - django-2.0 - django-3.1 - django-3.2 + - django-4.0 - flask-0.12 - flask-1.1 - flask-2.0 diff --git a/.ci/.jenkins_framework_full.yml b/.ci/.jenkins_framework_full.yml index 1906f27cb..8a417d079 100644 --- a/.ci/.jenkins_framework_full.yml +++ b/.ci/.jenkins_framework_full.yml @@ -9,6 +9,7 @@ FRAMEWORK: - django-3.0 - django-3.1 - django-3.2 + - django-4.0 # - django-master - flask-0.10 - flask-0.11 diff --git a/tests/contrib/django/testapp/urls.py b/tests/contrib/django/testapp/urls.py index 7c49cfa68..c8bda4699 100644 --- a/tests/contrib/django/testapp/urls.py +++ b/tests/contrib/django/testapp/urls.py @@ -37,7 +37,7 @@ from tests.contrib.django.testapp import views try: - from django.conf.urls import re_path + from django.urls import re_path except ImportError: # Django < 2 from django.conf.urls import url as re_path diff --git a/tests/requirements/reqs-django-4.0.txt b/tests/requirements/reqs-django-4.0.txt new file mode 100644 index 000000000..a941313eb --- /dev/null +++ b/tests/requirements/reqs-django-4.0.txt @@ -0,0 +1,2 @@ +Django>=4.0a1,<4.1 +-r reqs-base.txt From 3d8bd4c9a6d8acf5e47f1b9b748156c8ee1b7c26 Mon Sep 17 00:00:00 2001 From: Benjamin Wohlwend Date: Mon, 4 Oct 2021 11:50:00 +0200 Subject: [PATCH 2/2] don't run Django 4 on a Python version lower than 3.8 --- .ci/.jenkins_exclude.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ci/.jenkins_exclude.yml b/.ci/.jenkins_exclude.yml index adea37702..0206beaa6 100644 --- a/.ci/.jenkins_exclude.yml +++ b/.ci/.jenkins_exclude.yml @@ -1,6 +1,14 @@ exclude: - PYTHON_VERSION: pypy-3 # pypy3 currently fails on CI, e.g. https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-python%2Fapm-agent-python-mbp/detail/PR-1099/2/pipeline#step-3497-log-1 FRAMEWORK: none + # Django + # Django 4.0 requires Python 3.8+ + - PYTHON_VERSION: pypy-3 # current pypy-3 is compatible with Python 3.7 + FRAMEWORK: django-4.0 + - PYTHON_VERSION: python-3.6 + FRAMEWORK: django-4.0 + - PYTHON_VERSION: python-3.7 + FRAMEWORK: django-4.0 # Flask - PYTHON_VERSION: pypy-3 FRAMEWORK: flask-0.11 # see https://github.com/pallets/flask/commit/6e46d0cd, 0.11.2 was never released