Skip to content

Commit fa08150

Browse files
committed
[deps] Added support for Django >=5.1,<5.3 and Python >=3.12, 3.14 #340
- Dropped support for Python < 3.9 - Dropped support for Django < 4.2 Closes #340
1 parent 3678d8d commit fa08150

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

Diff for: .github/workflows/build.yml

+19-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,29 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
python-version:
29-
- "3.8"
3029
- "3.9"
3130
- "3.10"
31+
- "3.11"
32+
- "3.12"
33+
- "3.13"
3234
django-version:
33-
- django~=3.2.0
34-
- django~=4.1.0
3535
- django~=4.2.0
36+
- django~=5.0.0
37+
- django~=5.1.0
38+
- django~=5.2.0
39+
exclude:
40+
# Django 5.0+ requires Python >=3.10
41+
- python-version: "3.9"
42+
django-version: django~=5.0.0
43+
- python-version: "3.9"
44+
django-version: django~=5.1.0
45+
- python-version: "3.9"
46+
django-version: django~=5.2.0
47+
# Python 3.13 supported only in Django >=5.1.3
48+
- python-version: "3.13"
49+
django-version: django~=4.2.0
50+
- python-version: "3.13"
51+
django-version: django~=5.0.0
3652

3753
steps:
3854
- uses: actions/checkout@v4

Diff for: openwisp_notifications/tests/test_websockets.py

-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys
21
import uuid
32
from datetime import timedelta
43
from unittest.mock import patch
@@ -215,10 +214,6 @@ async def test_short_term_notification_storm_prevention(
215214
async def test_long_term_notification_storm_prevention(
216215
self, admin_user, admin_client
217216
):
218-
if sys.version_info[:2] == (3, 7):
219-
NotificationConsumer._backoff_increment = 60
220-
NotificationConsumer._max_allowed_backoff = 5
221-
222217
datetime_now = now()
223218
freezer = freeze_time(datetime_now).start()
224219
await bulk_create_notification(admin_user, count=30)
@@ -232,12 +227,8 @@ async def test_long_term_notification_storm_prevention(
232227
# _initial_backoff is mocked since the time is frozen in this test
233228
# which was leading to initialization case getting skipped.
234229
with patch.object(NotificationConsumer, '_initial_backoff', 0):
235-
if sys.version_info[:2] == (3, 7):
236-
NotificationConsumer._initial_backoff = 0
237230
await create_notification(admin_user)
238231
response = await communicator.receive_json_from()
239-
if sys.version_info[:2] == (3, 7):
240-
NotificationConsumer._initial_backoff = 1
241232

242233
# These notifications will increment the backoff time beyond allowed limit.
243234
for _ in range(2):
@@ -263,7 +254,3 @@ async def test_long_term_notification_storm_prevention(
263254
assert response['reload_widget'] is True
264255

265256
await communicator.disconnect()
266-
267-
if sys.version_info[:1] == (3, 7):
268-
NotificationConsumer._backoff_increment = 1
269-
NotificationConsumer._max_allowed_backoff = 15

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ def get_install_requires():
6464
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
6565
'Operating System :: OS Independent',
6666
'Framework :: Django',
67-
'Programming Language :: Python :: 3.8',
67+
'Programming Language :: Python :: 3',
6868
],
6969
)

0 commit comments

Comments
 (0)