Skip to content

Commit

Permalink
Merge pull request #9 from torchbox-forks/support/wagtail-60
Browse files Browse the repository at this point in the history
Wagtail 6.0
  • Loading branch information
katdom13 authored Mar 8, 2024
2 parents ab24a91 + d5a7d6f commit b5df7bf
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
strategy:
max-parallel: 2
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

- Add Wagtail 6.0 to test matrices

## 1.1.0+tbx (2024-03-05)

- Add Wagtail 5.2 to test matrices

## 1.0.1 (2023-10-16)
Expand Down
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ user:
migrate:
@python testmanage.py migrate

tox-41:
tox -e py38-dj41-wt41
tox-52:
tox -e py38-dj42-wt52

tox-42:
tox -e py38-dj42-wt42

tox-50:
tox -e py38-dj42-wt50
tox-60:
tox -e py38-dj42-wt60
4 changes: 1 addition & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Installation
Use your favorite Python installer to install it from PyPI::

pip install wagtail-robots
pip install wagtail_modeladmin # if Wagtail >= 5.1

Or get the source from the application site at::

Expand All @@ -42,8 +41,7 @@ Then follow these steps:

INSTALLED_APPS = [
...
'wagtail_modeladmin', # if Wagtail >=5.1; Don't repeat if it's there already
'wagtail.contrib.modeladmin', # if Wagtail <5.1; Don't repeat if it's there already
'wagtail_modeladmin',
'robots',
]

Expand Down
5 changes: 4 additions & 1 deletion robots/panels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from distutils.version import LooseVersion
try:
from distutils.version import LooseVersion
except ImportError:
from setuptools.distutils.version import LooseVersion

from django.conf import settings

Expand Down
1 change: 0 additions & 1 deletion robots/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = "robots.test.apps.RobotsTestAppConfig"
2 changes: 1 addition & 1 deletion robots/test/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"wagtail.search",
"wagtail.admin",
"wagtail.api.v2",
"wagtail_modeladmin" if WAGTAIL_VERSION >= (5, 1) else "wagtail.contrib.modeladmin",
"wagtail_modeladmin",
"wagtail.contrib.routable_page",
"wagtail.contrib.styleguide",
"wagtail.sites",
Expand Down
7 changes: 1 addition & 6 deletions robots/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@

from wagtail import VERSION as WAGTAIL_VERSION

if WAGTAIL_VERSION >= (5, 1):
from wagtail_modeladmin.options import ModelAdmin, modeladmin_register
else:
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
from wagtail_modeladmin.options import ModelAdmin, modeladmin_register

from robots.models import Rule

Expand Down
13 changes: 5 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@
],
},
install_requires=[
'wagtail>=4.1',
'wagtail>=5.2',
'wagtail-modeladmin>=2.0',
],
extras_require={
'testing': [
'wagtail-modeladmin>=1.0',
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
Expand All @@ -42,11 +38,12 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Wagtail :: 4',
'Framework :: Django :: 5.0',
'Framework :: Wagtail :: 5',
'Framework :: Wagtail :: 6',
]
)
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ flake8>=3.0.4
sphinx!=1.6.1,>=1.5.1
sphinx-rtd-theme>=0.2.4
doc8
setuptools==69.1.1
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ skipsdist = True
usedevelop = True

envlist =
py{38,39,310}-dj{32,41}-wt{41,42,50,51,52}
py311-dj41-wt{41,42,50,51,52}
py311-dj42-wt{50,51,52}
py{38,39,310}-dj32-wt52
py{38,39,310,311}-dj42-wt{52,60}
py{311,312}-dj50-wt{52,60}

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
deps = -r{toxinidir}/test-requirements.txt
Expand Down

0 comments on commit b5df7bf

Please sign in to comment.