Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.12, django 5.0, wagtail 6.1, postgres 12-16, psycopg 3 #40

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e4932fa
django 4.2 support
jorenham Oct 13, 2023
58ec8cd
python 3.11 and 3.12 support
jorenham Oct 13, 2023
96535bd
wagtail 5.1 support
jorenham Oct 13, 2023
8107a4f
test on postgres 12 & 16 with psycopg3
jorenham Oct 13, 2023
83288db
set minimum wagatil version to 3.0
jorenham Oct 13, 2023
76fd974
fix tox version conflict
jorenham Oct 13, 2023
7cd3d9f
drop django 4.0 from the test matrix, as suggested by @zerolab
jorenham Oct 13, 2023
b6f63ea
testing matrix version dependency version fixes
jorenham Oct 13, 2023
5019d53
testing matrix dependency conflict fix (attempt)
jorenham Oct 13, 2023
0f4d1ae
import error fix
jorenham Oct 13, 2023
223a3a2
allow postgres connection without password
jorenham Oct 13, 2023
4f46197
moved `POSTGRES_HOST_AUTH_METHOD=trust` from tox to the workflow config
jorenham Oct 13, 2023
a864876
fixed missing postgres password
jorenham Oct 13, 2023
7c77f21
fix postgres testing matrix version dependency conflicts
jorenham Oct 13, 2023
2ff5a08
support django 5.0 and wagtail 5.2
jorenham Dec 15, 2023
db2fa9c
test matrix fix attempt
jorenham Dec 15, 2023
3c04b9f
yet another test matrix fix attempt
jorenham Dec 15, 2023
eb18ead
last testing matrix fix attempt
jorenham Dec 15, 2023
1098181
test using latest postgres and psycopg versions
jorenham Feb 8, 2024
ec99bd9
Upgrade to Node 20
jorenham Feb 8, 2024
b5fd7f6
Upgrade `actions/cache`, `actions/setup-node`, and `actions/setup-pyt…
jorenham Feb 8, 2024
ad8139d
remove redundant multi-line run statements
jorenham Feb 8, 2024
d517ecf
use latest `py-actions/flake8@v2` minor release
jorenham Feb 8, 2024
ffb6111
remove wagtail<3 specific migration code
jorenham Feb 8, 2024
cc05253
consistent test matrix `include` ordering
jorenham Feb 8, 2024
27b7718
configures concurrency groups and cancellation for faster workflow runs
jorenham Feb 8, 2024
1be9070
linter fixes
jorenham Feb 8, 2024
b5a5363
Slimmed down the test matrix
jorenham Feb 8, 2024
e1eb8b1
Fix test matrix python/wagtail version compat issue
jorenham Feb 8, 2024
c8282f3
Fix tox version compat issues by preferring LTS's
jorenham Feb 8, 2024
46b6a69
remove redendant test matrix tests, enabled the pip cache
jorenham Feb 8, 2024
1461865
disabled the pip cache (no requirements.txt)
jorenham Feb 8, 2024
2fe4094
Initial wagtail 6.0 support
jorenham Feb 8, 2024
2f40530
small changes referring to renamed/removed features in wagtail 6
jorenham Feb 8, 2024
906d050
add wagtail 6.1 to the testing matrix
jorenham May 24, 2024
d785a06
Update supported versions section
jorenham May 24, 2024
449bf2d
add missing test dependency, and remove unused ones
jorenham May 24, 2024
7c2cf76
update the changelog
jorenham May 24, 2024
ce195c1
update postgres and actions in `nightly-tests` workflow
jorenham May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/report_nightly_build_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Called by GitHub Actions when the nightly build fails.
This reports an error to the #nightly-build-failures Slack channel.
"""

import os
import requests

Expand Down
127 changes: 54 additions & 73 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ on:
branches:
- main
- 'stable/**'

pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
check-client:
name: 🧑‍🚀 preflight (check client)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- id: npm-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('.nvmrc') }}-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -30,120 +33,98 @@ jobs:
name: ⚫ Black (check server)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Python black Lint
uses: psf/black@stable

check-server-flake8:
name: 🎱 flake8 (check server)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Python flake8 Lint
uses: py-actions/flake8@v2.0.0
uses: py-actions/flake8@v2

test-sqlite:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
django: ['3.2', '4.0']
wagtail: ['2.16', '3.0', '4.0']
include:
- wagtail: '2.15'
- python: '3.8'
django: '3.2'
python: '3.7'
- wagtail: '2.15'
wagtail: '3.0'
- python: '3.8'
django: '3.2'
python: '3.8'
- wagtail: '2.15'
wagtail: '4.1'
- python: '3.10'
django: '3.2'
python: '3.9'
- wagtail: '2.15'
django: '3.2'
python: '3.10'
- wagtail: '4.0'
django: '4.1'
python: '3.8'
- wagtail: '4.0'
django: '4.1'
python: '3.9'
- wagtail: '4.0'
django: '4.1'
python: '3.10'

wagtail: '5.2'
- python: '3.12'
django: '5.0'
wagtail: '5.2'
- python: '3.12'
django: '5.0'
wagtail: '6.1'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Tox
run: |
python -m pip install tox
run: pip install tox
- name: Test
run: |
tox
run: tox
env:
TOXENV: python${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}-sqlite

test-postgres:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
django: ['3.2', '4.0']
wagtail: ['2.16', '3.0', '4.0']
postgres: ['10.8']
include:
- wagtail: '2.15'
- python: '3.8'
django: '3.2'
postgres: '10.8'
python: '3.7'
- wagtail: '2.15'
wagtail: '3.0'
postgres: '12'
- python: '3.8'
django: '3.2'
postgres: '10.8'
python: '3.8'
- wagtail: '2.15'
wagtail: '4.1'
postgres: '12'
- python: '3.10'
django: '3.2'
postgres: '10.8'
python: '3.9'
- wagtail: '2.15'
django: '3.2'
postgres: '10.8'
python: '3.10'
- wagtail: '4.0'
django: '4.1'
postgres: '10.8'
python: '3.8'
- wagtail: '4.0'
django: '4.1'
postgres: '10.8'
python: '3.9'
- wagtail: '4.0'
django: '4.1'
postgres: '10.8'
python: '3.10'

wagtail: '5.2'
postgres: '12'
- python: '3.12'
django: '5.0'
wagtail: '5.2'
postgres: '16'
- python: '3.12'
django: '5.0'
wagtail: '6.1'
postgres: '16'
services:
postgres:
image: postgres:${{ matrix.postgres }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Tox
run: |
python -m pip install tox
run: pip install tox
- name: Test
run: |
tox
run: tox
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/wagtail_hallo
TOXENV: python${{ matrix.python }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}-postgres
12 changes: 6 additions & 6 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:

services:
postgres:
image: postgres:10.8
image: postgres:16
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "psycopg2>=2.6"
pip install "psycopg>=3.1.8"
pip install "git+https://github.com/wagtail/wagtail.git@main#egg=wagtail"
pip install -e .[testing]
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add Django 4.1 and Python 3.10 classifier to PyPI _Joren Hammudoglu_
- Add Django 4.1 support to CI _Joren Hammudoglu_
- Add support for Wagtail 4 _Katherine Domingo_
- Add support for Python 3.12, Django 5.0, Wagtail 6.1 and Psycopg 3 by _Joren Hammudoglu_

## [0.1.0] - 2022-05-05

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This is the legacy rich text editor for the Wagtail CMS. Based on [Hallo.js](htt

## Supported Versions

- Python 3.7, 3.8, 3.9 3.10
- Django 3.2. 4.0 4.1
- Wagtail 2.15, 2.16, 3.0, 4.0
- Python 3.8, 3.9, 3.10, 3.11, 3.12
- Django 3.2, 4.1, 4.2, 5.0
- Wagtail 3.0, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1

## Installing the Hallo Editor

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"$": "readonly",
"addMessage": "readonly",
"buildExpandingFormset": "readonly",
"cancelSpinner": "readonly",
"escapeHtml": "readonly",
"insertRichTextDeleteControl": "readonly",
"jQuery": "readonly",
Expand Down
15 changes: 9 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,28 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"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.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Wagtail",
"Framework :: Wagtail :: 2",
"Framework :: Wagtail :: 3",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6",
],
install_requires=[
"Django>=3.2,<4.2",
"Wagtail>=2.15,<4.1",
"Django>=3.2,<6.0",
"Wagtail>=3.0,<7.0",
],
extras_require={
"testing": ["dj-database-url==0.5.0", "freezegun==0.3.15"],
"testing": ["html5lib==1.1"],
},
zip_safe=False,
)
2 changes: 1 addition & 1 deletion testmanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def runtests():
try:
execute_from_command_line(argv)
finally:
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT
from wagtail.test.settings import STATIC_ROOT, MEDIA_ROOT

shutil.rmtree(STATIC_ROOT, ignore_errors=True)
shutil.rmtree(MEDIA_ROOT, ignore_errors=True)
Expand Down
23 changes: 12 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,36 @@ skipsdist = True
usedevelop = True

envlist =
python{3.7,3.8,3.9,3.10}-django{3.2}-wagtail{2.15,2.16,3.0,4.0,main}-{sqlite,postgres}
python{3.8,3.9,3.10}-django{4.0}-wagtail{2.16,3.0,4.0,main}-{sqlite,postgres}
python{3.8,3.9,3.10}-django{4.1,main}-wagtail{4.0,main}-{sqlite,postgres}
python{3.8,3.9,3.10}-django3.2-wagtail3.0-{sqlite,postgres}
python{3.9,3.10,3.11}-django4.1-wagtail4.2-{sqlite,postgres}
python{3.10,3.11,3.12}-django{4.2,5.0}-wagtail{5.2,6.1}-{sqlite,postgres}

[testenv]
install_command = pip install -e ".[testing]" -U {opts} {packages}
commands = coverage run testmanage.py test --deprecation all

basepython =
python3.7: python3.7
python3.8: python3.8
python3.9: python3.9
python3.10: python3.10
python3.11: python3.11
python3.12: python3.12

deps =
coverage

django3.2: Django>=3.2,<3.3
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
django3.2: django>=3.2,<3.3
django4.2: django>=4.2,<5.0
django5.0: django>=5.0,<5.1
djangomain: git+https://github.com/django/django.git@main#egg=Django

wagtail2.15: wagtail>=2.15,<2.16
wagtail2.16: wagtail>=2.16,<3.0
wagtail3.0: wagtail>=3.0,<3.1
wagtail4.0: wagtail>=4.0,<4.1
wagtail4.1: wagtail>=4.1,<4.2
wagtail5.2: wagtail>=5.2,<5.3
wagtail6.1: wagtail>=6.1,<6.2
wagtailmain: git+https://github.com/wagtail/wagtail.git

postgres: psycopg2>=2.6
postgres: psycopg>=3.1.18

setenv =
postgres: DATABASE_URL={env:DATABASE_URL:postgres:///wagtail_hallo}
4 changes: 2 additions & 2 deletions wagtail_hallo/static/css/hallo.css
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@
display: block;
}

/*
/*
These styles correspond to the image formats defined in wagtailimages/formats.py,
so that images displayed in the rich text field receive more or less the same
styling that they would receive on the site front-end.

Wagtail installations that define their own image formats (in a myApp.image_formats module)
should ideally use the insert_editor_css hook to pass in their own custom CSS to have those
should ideally use the insert_global_admin_css hook to pass in their own custom CSS to have those
images render within the rich text area in the same styles that would appear on the front-end.
close as possible to match line-height space above p
*/
Expand Down
Loading