Skip to content

Commit b7b6722

Browse files
committed
Check compatibility with Django 5.2 and Python 3.13.
1 parent 7412e25 commit b7b6722

File tree

8 files changed

+33
-28
lines changed

8 files changed

+33
-28
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false # If one test fails, complete the other jobs.
1212
matrix:
13-
python: [ 3.8, 3.9, '3.10' ]
13+
python: [ 3.8, 3.9, '3.10', '3.11', '3.12', '3.13' ]
1414
steps:
1515
- uses: actions/checkout@v2
1616
- name: Set up Python ${{ matrix.python-version }}
@@ -26,20 +26,20 @@ jobs:
2626
- name: Run tests
2727
run: tox
2828
- name: Flake8
29-
if: ${{ matrix.python == '3.8' }}
29+
if: ${{ matrix.python == '3.12' }}
3030
run: |
3131
pip install flake8
3232
flake8 ./
3333
- name: Isort
34-
if: ${{ matrix.python == '3.8' }}
34+
if: ${{ matrix.python == '3.12' }}
3535
uses: jamescurtin/isort-action@master
3636
- name: Coverage
37-
if: ${{ matrix.python == '3.8' }}
37+
if: ${{ matrix.python == '3.12' }}
3838
run: |
3939
pip install coverage[toml] django
4040
coverage run ./example_project/manage.py test photologue
4141
- name: Upload coverage
42-
if: ${{ matrix.python == '3.8' }}
42+
if: ${{ matrix.python == '3.12' }}
4343
uses: codecov/codecov-action@v1
4444
with:
4545
name: Python ${{ matrix.python }}

CHANGELOG.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Changelog
44
3.18 (unreleased)
55
-----------------
66

7-
- Nothing changed yet.
7+
- Checked compatibility with Django 5.1 and 5.2.
8+
- Dropped Django 3.2 and 4.1.
89

910

1011
3.17 (2023-10-25)

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2007-2019, Justin C. Driscoll and all the people named in CONTRIBUTORS.txt.
1+
Copyright (c) 2007-2025, Justin C. Driscoll and all the people named in CONTRIBUTORS.txt.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

example_project/example_project/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
DEBUG = True
1212

13-
ALLOWED_HOSTS = []
13+
ALLOWED_HOSTS = ['*']
1414

1515

1616
INSTALLED_APPS = (

example_project/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-r ../requirements.txt
22
# The following is only required if developing for Photologue.
3-
factory-boy
3+
factory-boy>=3.3.2 # Note: version that formally supports Dj5.2 not yet released.
44
# The following is only required if you plan on using Amazon AWS S3
55
# -r example_storages/s3_requirements.txt
66

photologue/tests/test_zipupload.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ def test_good_data(self):
7474

7575
self.assertEqual(response['Location'], location)
7676

77-
self.assertQuerysetEqual(Gallery.objects.all(),
77+
self.assertQuerySetEqual(Gallery.objects.all(),
7878
['<Gallery: This is a test title>'],
7979
transform=repr)
80-
self.assertQuerysetEqual(Photo.objects.all(),
80+
self.assertQuerySetEqual(Photo.objects.all(),
8181
['<Photo: This is a test title 1>'],
8282
transform=repr)
8383

8484
# The photo is attached to the gallery.
8585
gallery = Gallery.objects.get(title='This is a test title')
86-
self.assertQuerysetEqual(gallery.photos.all(),
86+
self.assertQuerySetEqual(gallery.photos.all(),
8787
['<Photo: This is a test title 1>'],
8888
transform=repr)
8989

@@ -116,10 +116,10 @@ def test_not_image(self):
116116
response = self.client.post('/admin/photologue/photo/upload_zip/', test_data)
117117
self.assertEqual(response.status_code, 302)
118118

119-
self.assertQuerysetEqual(Gallery.objects.all(),
119+
self.assertQuerySetEqual(Gallery.objects.all(),
120120
['<Gallery: This is a test title>'],
121121
transform=repr)
122-
self.assertQuerysetEqual(Photo.objects.all(),
122+
self.assertQuerySetEqual(Photo.objects.all(),
123123
['<Photo: This is a test title 1>'],
124124
transform=repr)
125125

@@ -135,10 +135,10 @@ def test_ignored(self):
135135
response = self.client.post('/admin/photologue/photo/upload_zip/', test_data)
136136
self.assertEqual(response.status_code, 302)
137137

138-
self.assertQuerysetEqual(Gallery.objects.all(),
138+
self.assertQuerySetEqual(Gallery.objects.all(),
139139
['<Gallery: This is a test title>'],
140140
transform=repr)
141-
self.assertQuerysetEqual(Photo.objects.all(),
141+
self.assertQuerySetEqual(Photo.objects.all(),
142142
['<Photo: This is a test title 1>'],
143143
transform=repr)
144144

@@ -153,15 +153,15 @@ def test_existing_gallery(self):
153153
response = self.client.post('/admin/photologue/photo/upload_zip/', test_data)
154154
self.assertEqual(response.status_code, 302)
155155

156-
self.assertQuerysetEqual(Gallery.objects.all(),
156+
self.assertQuerySetEqual(Gallery.objects.all(),
157157
['<Gallery: Existing>'],
158158
transform=repr)
159-
self.assertQuerysetEqual(Photo.objects.all(),
159+
self.assertQuerySetEqual(Photo.objects.all(),
160160
['<Photo: Existing 1>'],
161161
transform=repr)
162162

163163
# The photo is attached to the existing gallery.
164-
self.assertQuerysetEqual(existing_gallery.photos.all(),
164+
self.assertQuerySetEqual(existing_gallery.photos.all(),
165165
['<Photo: Existing 1>'],
166166
transform=repr)
167167

@@ -177,7 +177,7 @@ def test_existing_gallery_custom_title(self):
177177
response = self.client.post('/admin/photologue/photo/upload_zip/', test_data)
178178
self.assertEqual(response.status_code, 302)
179179

180-
self.assertQuerysetEqual(Photo.objects.all(),
180+
self.assertQuerySetEqual(Photo.objects.all(),
181181
['<Photo: Custom title 1>'],
182182
transform=repr)
183183

@@ -191,7 +191,7 @@ def test_duplicate_slug(self):
191191
response = self.client.post('/admin/photologue/photo/upload_zip/', test_data)
192192
self.assertEqual(response.status_code, 302)
193193

194-
self.assertQuerysetEqual(Photo.objects.all(),
194+
self.assertQuerySetEqual(Photo.objects.all(),
195195
[
196196
'<Photo: This is a test title 1>',
197197
'<Photo: This is a test title 2>',

requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Note: Specifying django here crashes tox; it's autoinstalled with other packages it
22
# so can be removed from this file.
3-
Pillow>=9
4-
django-sortedm2m>=3.1.1
3+
# Cannot force a precise Pillow version as we need to support Py3.8-Py3.13 and there's
4+
# no Pillow version that meets both requirements.
5+
Pillow>=10
6+
django-sortedm2m>=4.0.0 # Support for Django 5.1.
57
ExifRead>=3

tox.ini

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
[tox]
77
envlist =
8-
py{38,39}-django32
9-
py{38,39,310}-django41
10-
py{38,39,310,311}-django42
8+
py{38,39,310,311,312}-django42
9+
py{310,311,312,313}-django51
10+
py{310,311,312,313}-django52
1111

1212
[testenv]
1313
deps =
14-
django32: Django>=3.2,<4.0
15-
django41: Django>=4.1,<4.2
1614
django42: Django>=4.2,<5.0
15+
django51: Django>=5.1,<5.2
16+
django52: Django>=5.2,<6.0
1717
-r{toxinidir}/example_project/requirements.txt
1818
changedir =
1919
{toxinidir}/example_project/
@@ -26,3 +26,5 @@ python =
2626
3.9: py39
2727
3.10: py310
2828
3.11: py311
29+
3.12: py312
30+
3.13: py313

0 commit comments

Comments
 (0)