From f46b3cb05195d83654d48f78264f574eb710baf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A6var=20=C3=96fj=C3=B6r=C3=B0=20Magn=C3=BAsson?= Date: Wed, 4 Oct 2023 09:17:22 +0000 Subject: [PATCH] Adding more versions to the test matrix, removing support for wagtail<3 --- .github/workflows/django.yml | 12 +++++++++++- Dockerfile | 2 +- wagtailtables/blocks.py | 13 +++---------- wagtailtables_demo/requirements.txt | 4 ++-- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index d2bcad4..cb06d0e 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -14,7 +14,17 @@ jobs: matrix: include: - python: '3.10' - wagtail: 'wagtail>=4.1' + wagtail: 'wagtail<5.2' + - python: '3.11' + wagtail: 'wagtail<5.2' + - python: '3.10' + wagtail: 'wagtail<5.1' + - python: '3.11' + wagtail: 'wagtail<5.1' + - python: '3.10' + wagtail: 'wagtail<4.3' + - python: '3.11' + wagtail: 'wagtail<4.3' runs-on: 'ubuntu-latest' diff --git a/Dockerfile b/Dockerfile index 6d33e35..05eca24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use an official Python runtime as a parent image -FROM python:3.8-bullseye +FROM python:3.10-bullseye LABEL maintainer="hello@wagtail.org" # Set environment varibles diff --git a/wagtailtables/blocks.py b/wagtailtables/blocks.py index 854039a..bfb2506 100644 --- a/wagtailtables/blocks.py +++ b/wagtailtables/blocks.py @@ -4,17 +4,10 @@ from django.utils.functional import cached_property from wagtail.telepath import register -from wagtail import VERSION -# Backwards compatibility -if VERSION[0] < 3: - from wagtail.blocks.struct_block import StructBlockAdapter - from wagtail.blocks import (BooleanBlock, CharBlock, ChoiceBlock, - StructBlock, TextBlock) -else: - from wagtail.blocks.struct_block import StructBlockAdapter - from wagtail.blocks import (BooleanBlock, CharBlock, ChoiceBlock, - StructBlock, TextBlock) +from wagtail.blocks.struct_block import StructBlockAdapter +from wagtail.blocks import (BooleanBlock, CharBlock, ChoiceBlock, + StructBlock, TextBlock) TOOLBAR = [ {'type': 'i','content': 'format_align_left', 'k': 'text-align', 'v': 'left'}, diff --git a/wagtailtables_demo/requirements.txt b/wagtailtables_demo/requirements.txt index 40a9a7e..3b72e2a 100644 --- a/wagtailtables_demo/requirements.txt +++ b/wagtailtables_demo/requirements.txt @@ -1,5 +1,5 @@ -Django>=4.0,<4.1 -wagtail==5.1.2 +Django>=4.0,<4.3 +wagtail<5.2 dj-database-url==0.4.1 psycopg2-binary>=2.7,<3.0 debugpy==1.5.1 \ No newline at end of file