Skip to content

Commit 97af0c0

Browse files
authored
Upgrade to Wagtail 7.1 (#85)
1 parent 179184f commit 97af0c0

File tree

8 files changed

+1609
-57
lines changed

8 files changed

+1609
-57
lines changed

.github/workflows/nightly.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ jobs:
1717
- uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.12'
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
2022

2123
- run: git clone https://github.com/wagtail/wagtail.git
2224

23-
- run: python -m pip install flit
24-
- run: flit install --deps=production --extras=mailchimp,mrml,testing
25-
- run: python -m pip install ./wagtail
25+
- run: uv sync --extra=testing --extra=mailchimp --extra=mrml
26+
- run: uv pip install ./wagtail
2627

2728
- run: pytest -vv
2829

.github/workflows/test.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25-
- name: Set up Python 3.9
25+
- name: Set up Python 3.10
2626
uses: actions/setup-python@v5
2727
with:
28-
python-version: '3.9'
28+
python-version: '3.10'
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v5
2931
- name: Install dependencies
30-
env:
31-
FLIT_ROOT_INSTALL: true
3232
run: |
33-
python -m pip install flit
34-
python -m flit install --deps=production --extras=mailchimp,mrml,testing,ci --symlink
35-
- uses: pre-commit/[email protected]
33+
uv sync --extra=dev
34+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
35+
- name: Run pre-commit
36+
run: uv tool run --with=pre-commit-uv pre-commit run --all-files
3637
- uses: jakebailey/pyright-action@v2
3738
with:
3839
version: PATH
@@ -50,12 +51,10 @@ jobs:
5051
uses: actions/setup-python@v5
5152
with:
5253
python-version: ${{ matrix.python }}
53-
- name: Install
54-
run: |
55-
python -m pip install --upgrade pip setuptools wheel
56-
python -m pip install .[ci]
54+
- name: Install uv
55+
uses: astral-sh/setup-uv@v5
5756
- name: Test
58-
run: tox
57+
run: uv tool run --with=tox-uv --with=tox-gh-actions tox
5958
env:
6059
DB: sqlite
6160

@@ -64,11 +63,11 @@ jobs:
6463
needs: lint
6564
strategy:
6665
matrix:
67-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
66+
python: ['3.10', '3.11', '3.12', '3.13']
6867

6968
services:
7069
postgres:
71-
image: ${{ matrix.postgres || 'postgres:13' }}
70+
image: ${{ matrix.postgres || 'postgres:14' }}
7271
env:
7372
POSTGRES_PASSWORD: postgres
7473
ports:
@@ -81,12 +80,10 @@ jobs:
8180
uses: actions/setup-python@v5
8281
with:
8382
python-version: ${{ matrix.python }}
84-
- name: Install
85-
run: |
86-
python -m pip install --upgrade pip setuptools wheel
87-
python -m pip install .[ci]
83+
- name: Install uv
84+
uses: astral-sh/setup-uv@v5
8885
- name: Test
89-
run: tox
86+
run: uv tool run --with=tox-uv --with=tox-gh-actions tox
9087
env:
9188
DATABASE_URL: postgres://postgres:postgres@localhost:5432/wagtail_newsletter
9289
DB: postgres

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
### Added
11+
- Development tooling with `uv` (#85)
12+
- Support for Django 5.2, Wagtail 7.0 and 7.1. (#85)
13+
14+
### Removed
15+
16+
- Support for Python 3.9, Django 5.0, Wagtail 5.2 and 6.4. (#85)
17+
818
## [0.2.2] - 2025-04-16
919

1020
### Added

CONTRIBUTING.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ git clone https://github.com/wagtail/wagtail-newsletter.git
99
cd wagtail-newsletter
1010
```
1111

12-
With your preferred virtualenv activated, install testing dependencies:
12+
Install development dependencies:
13+
14+
### Using uv (recommended)
15+
16+
```sh
17+
uv sync --extra=dev
18+
```
1319

1420
### Using pip
1521

1622
```sh
1723
python -m pip install --upgrade 'pip>=21.3'
18-
python -m pip install -e '.[testing,ci,mailchimp,mrml]' -U
24+
python -m pip install -e '.[dev]' -U
1925
```
2026

2127
### Using flit
@@ -56,6 +62,5 @@ To run the test app interactively, use `tox -e interactive`, visit `http://127.0
5662
The documentation source lives under `docs/`. It's built with [Sphinx](https://www.sphinx-doc.org/). You can start a development server that will auto-build and refresh the page in the browser:
5763

5864
```sh
59-
pip install sphinx-autobuild
6065
sphinx-autobuild docs docs/_build/html
6166
```

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Turn Wagtail pages into newsletters.
1616

1717
## Supported versions
1818

19-
- Python (3.9, 3.10, 3.11, 3.12)
20-
- Django (4.2, 5.0)
21-
- Wagtail (5.2, 6.1, 6.2)
19+
- Python (3.10, 3.11, 3.12, 3.13)
20+
- Django (4.2, 5.1, 5.2)
21+
- Wagtail (6.3, 7.0, 7.1)
2222

2323
## Installation
2424

pyproject.toml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,50 +15,51 @@ classifiers = [
1515
"Operating System :: OS Independent",
1616
"Programming Language :: Python",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2222
"Framework :: Django",
2323
"Framework :: Django :: 4.2",
24-
"Framework :: Django :: 5.0",
24+
"Framework :: Django :: 5.1",
25+
"Framework :: Django :: 5.2",
2526
"Framework :: Wagtail",
26-
"Framework :: Wagtail :: 5",
2727
"Framework :: Wagtail :: 6",
28+
"Framework :: Wagtail :: 7",
2829
]
29-
requires-python = ">=3.9"
30+
requires-python = ">=3.10"
3031
dynamic = ["version"]
3132
dependencies = [
3233
"Django>=4.2",
33-
"Wagtail>=5.2",
34+
"Wagtail>=6.3",
3435
"queryish>=0.2",
3536
]
3637

3738
[project.optional-dependencies]
3839
testing = [
39-
"dj-database-url==2.1.0",
40-
"django-debug-toolbar==4.4.2",
41-
"django-stubs==4.2.7",
42-
"pre-commit==3.4.0",
43-
"pyright==1.1.360",
44-
"pytest==8.1.1",
45-
"pytest-cov==5.0.0",
46-
"pytest-django==4.8.0",
47-
]
48-
ci = [
49-
"tox==4.11.3",
50-
"tox-gh-actions==3.1.3",
40+
"dj-database-url",
41+
"django-debug-toolbar",
42+
"django-stubs",
43+
"pyright",
44+
"pytest",
45+
"pytest-cov",
46+
"pytest-django",
5147
]
5248
docs = [
53-
"sphinx==7.3.7",
54-
"sphinx-wagtail-theme==6.4.0",
49+
"sphinx",
50+
"sphinx-wagtail-theme",
51+
"sphinx-autobuild",
5552
]
5653
mailchimp = [
5754
"mailchimp-marketing>=3.0.80",
5855
]
5956
mrml = [
6057
"mrml>=0.2",
6158
]
59+
dev = [
60+
"wagtail-newsletter[testing,docs,mailchimp,mrml]",
61+
"psycopg",
62+
]
6263

6364
[project.urls]
6465
Home = "https://github.com/wagtail/wagtail-newsletter"
@@ -79,7 +80,7 @@ exclude = [
7980
]
8081

8182
[tool.pyright]
82-
pythonVersion = "3.9"
83+
pythonVersion = "3.10"
8384

8485
[tool.pytest.ini_options]
8586
DJANGO_SETTINGS_MODULE = "wagtail_newsletter.test.settings"

tox.ini

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
[tox]
22
envlist =
3-
python{3.9,3.10,3.11,3.12}-django{4.2}-wagtail{5.2,6.3,6.4}-{sqlite,postgres}
4-
python{3.10,3.11,3.12}-django{5.0}-wagtail{5.2}-{sqlite,postgres}
5-
python{3.10,3.11,3.12}-django{5.0,5.1}-wagtail{6.3,6.4}-{sqlite,postgres}
6-
python{3.13}-django{5.1}-wagtail{6.3,6.4}-{sqlite,postgres}
3+
python{3.10,3.11,3.12,3.13}-django{4.2,5.1,5.2}-wagtail{6.3,7.0,7.1}-{sqlite,postgres}
74

85
[gh-actions]
96
python =
10-
3.9: python3.9
117
3.10: python3.10
128
3.11: python3.11
139
3.12: python3.12
@@ -22,7 +18,6 @@ DB =
2218
commands = pytest --cov {posargs: -vv}
2319

2420
basepython =
25-
python3.9: python3.9
2621
python3.10: python3.10
2722
python3.11: python3.11
2823
python3.12: python3.12
@@ -32,12 +27,12 @@ deps =
3227
coverage
3328

3429
django4.2: Django>=4.2,<4.3
35-
django5.0: Django>=5.0,<5.1
3630
django5.1: Django>=5.1,<5.2
31+
django5.2: Django>=5.2,<5.3
3732

38-
wagtail5.2: wagtail>=5.2,<5.3
3933
wagtail6.3: wagtail>=6.3,<6.4
40-
wagtail6.4: wagtail>=6.4,<6.5
34+
wagtail7.0: wagtail>=7.0,<7.1
35+
wagtail7.1: wagtail>=7.1,<7.2
4136

4237
postgres: psycopg2>=2.6
4338

0 commit comments

Comments
 (0)