From 90a555dd9febaa00072ee2ae1b5ce25379db0715 Mon Sep 17 00:00:00 2001 From: quint6 Date: Wed, 18 Nov 2026 16:01:15 +0100 Subject: [PATCH 1/2] Release 0.1.6: remove the Wagtail upper version limit --- .github/workflows/tests.yml | 34 +++++++++ README.md | 5 +- pyproject.toml | 8 +- setup.py | 4 +- wagtail_developer_reference/__init__.py | 2 +- wagtail_developer_reference/tests/settings.py | 75 +++++++++++++++++++ wagtail_developer_reference/tests/urls.py | 8 ++ 7 files changed, 129 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/tests.yml create mode 100644 wagtail_developer_reference/tests/settings.py create mode 100644 wagtail_developer_reference/tests/urls.py diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..66ae5d4 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: Tests + +on: + pull_request: + push: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - python: "3.9" + wagtail: ">=4.1,<4.2" + - python: "3.13" + wagtail: ">=4.1" + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - run: python -m pip install --upgrade pip + - run: python -m pip install "wagtail${{ matrix.wagtail }}" -e ".[dev]" build twine + - run: python -m django check --settings=wagtail_developer_reference.tests.settings + - run: python -m django makemigrations --check --dry-run --settings=wagtail_developer_reference.tests.settings + - run: ruff check . + - run: >- + ruff format --check setup.py wagtail_developer_reference/__init__.py + wagtail_developer_reference/tests/settings.py wagtail_developer_reference/tests/urls.py + - run: pytest + - run: python -m build + - run: python -m twine check dist/* diff --git a/README.md b/README.md index fa0cb40..490cad3 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,9 @@ In large Wagtail projects, it’s easy to lose track of where specific blocks ar ## Installation -Compatibility: Python 3.9+ and Wagtail 4.1 through 7.4.2 LTS. Wagtail 7.4 -itself requires Python 3.10+. +Compatibility: Python 3.9+ and Wagtail 4.1 or later, without an upper Wagtail +version limit. Newer Wagtail releases may require a newer Python version. +CI tests the minimum Wagtail series and the latest compatible release. 1. Add \`wagtail_developer_reference\` to your \`INSTALLED_APPS\`: \`\`\`python diff --git a/pyproject.toml b/pyproject.toml index b062f50..d9663e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "wagtail-developer-reference" -version = "0.1.5" +version = "0.1.6" description = "A visual auditing tool for Wagtail developers to track Page models and StreamField blocks." readme = "README.md" authors = [{name = "Four Digits", email = "info@fourdigits.nl" }] @@ -20,7 +20,7 @@ classifiers = [ ] keywords = ["django", "wagtail", "audit", "streamfield"] dependencies = [ - "wagtail>=4.1,<7.5", + "wagtail>=4.1", ] requires-python = ">=3.9" @@ -44,6 +44,10 @@ include-package-data = true [tool.setuptools.packages.find] include = ["wagtail_developer_reference*"] +[tool.pytest.ini_options] +DJANGO_SETTINGS_MODULE = "wagtail_developer_reference.tests.settings" +testpaths = ["wagtail_developer_reference/tests"] + [tool.ruff] line-length = 88 target-version = "py39" diff --git a/setup.py b/setup.py index f8cf4ce..4905002 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,10 @@ setup( name="wagtail-developer-reference", - version="0.1.5", + version="0.1.6", packages=find_packages(), include_package_data=True, install_requires=[ - "wagtail>=4.1,<7.5", + "wagtail>=4.1", ], ) diff --git a/wagtail_developer_reference/__init__.py b/wagtail_developer_reference/__init__.py index 37f0066..68f80be 100644 --- a/wagtail_developer_reference/__init__.py +++ b/wagtail_developer_reference/__init__.py @@ -1 +1 @@ -__version__: str = "0.1.2" +__version__: str = "0.1.6" diff --git a/wagtail_developer_reference/tests/settings.py b/wagtail_developer_reference/tests/settings.py new file mode 100644 index 0000000..af85065 --- /dev/null +++ b/wagtail_developer_reference/tests/settings.py @@ -0,0 +1,75 @@ +"""Minimal Django settings for running the wagtail_developer_reference test suite.""" + +SECRET_KEY = "not-a-secret" +DEBUG = False +ALLOWED_HOSTS = ["*"] + +ROOT_URLCONF = "wagtail_developer_reference.tests.urls" + +INSTALLED_APPS = [ + "wagtail_developer_reference", + "wagtail.contrib.forms", + "wagtail.contrib.redirects", + "wagtail.embeds", + "wagtail.sites", + "wagtail.users", + "wagtail.snippets", + "wagtail.documents", + "wagtail.images", + "wagtail.search", + "wagtail.admin", + "wagtail", + "modelcluster", + "taggit", + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.sessions", + "django.contrib.messages", + "django.contrib.staticfiles", +] + +MIDDLEWARE = [ + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "wagtail.contrib.redirects.middleware.RedirectMiddleware", +] + +TEMPLATES = [ + { + "BACKEND": "django.template.backends.django.DjangoTemplates", + "APP_DIRS": True, + "OPTIONS": { + "context_processors": [ + "django.template.context_processors.request", + "django.contrib.auth.context_processors.auth", + "django.contrib.messages.context_processors.messages", + ], + }, + }, +] + +DATABASES = { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": ":memory:", + } +} + +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + +STATIC_URL = "/static/" +STATIC_ROOT = None +STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage" + +PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] + +USE_TZ = True +TIME_ZONE = "UTC" +LANGUAGE_CODE = "en" + +WAGTAIL_SITE_NAME = "Test site" +WAGTAILADMIN_BASE_URL = "http://testserver" diff --git a/wagtail_developer_reference/tests/urls.py b/wagtail_developer_reference/tests/urls.py new file mode 100644 index 0000000..1b41f46 --- /dev/null +++ b/wagtail_developer_reference/tests/urls.py @@ -0,0 +1,8 @@ +from django.urls import include, path +from wagtail import urls as wagtail_urls +from wagtail.admin import urls as wagtailadmin_urls + +urlpatterns = [ + path("admin/", include(wagtailadmin_urls)), + path("", include(wagtail_urls)), +] From 12003f5263391b2cf6845b935c78ab39d837471f Mon Sep 17 00:00:00 2001 From: quint6 Date: Wed, 18 Nov 2026 16:03:44 +0100 Subject: [PATCH 2/2] Use a compatible CI runner for Python 3.9 --- .github/workflows/tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 66ae5d4..63a2735 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,14 +7,16 @@ on: jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - - python: "3.9" + - os: ubuntu-22.04 + python: "3.9" wagtail: ">=4.1,<4.2" - - python: "3.13" + - os: ubuntu-latest + python: "3.13" wagtail: ">=4.1" steps: - uses: actions/checkout@v4