Skip to content

Commit e5d6042

Browse files
committed
⬆️(back) upgrade to django 5.0
All the lib we are using are now compatible with django 5.0 The codebase is compatible with django 5.1 but with the end of postgresql 12 support we have to wai a bit before upgrading to this version of django.
1 parent 120cf29 commit e5d6042

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
1414
- Add fields to video to store its size and duration
1515
- Display in admin video duration and size
1616

17+
### Changed
18+
19+
- Upgrade to django 5.0
20+
1721
### Fixed
1822

1923
- Authorize ended live to initiate a transcription

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"matchPackageNames": [
4848
"Django"
4949
],
50-
"allowedVersions": "<5"
50+
"allowedVersions": "<5.1.0"
5151
},
5252
{
5353
"enabled": false,

src/backend/marsha/bbb/tests/api/classroom/test_retrieve.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"""Tests for the classroom retrieve API."""
22

3-
from datetime import datetime, timedelta
3+
from datetime import datetime, timedelta, timezone
44
import json
55
import zoneinfo
66

77
from django.core.cache import cache
88
from django.test import TestCase, override_settings
9-
from django.utils import timezone
109

1110
import responses
1211

src/backend/marsha/bbb/tests/bbb_utils/test_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_bbb_create_new_classroom(self):
2626
title="Classroom 001",
2727
meeting_id="7a567d67-29d3-4547-96f3-035733a4dfaa",
2828
)
29-
self.assertQuerysetEqual(classroom.sessions.all(), [])
29+
self.assertQuerySetEqual(classroom.sessions.all(), [])
3030

3131
responses.add(
3232
responses.GET,

src/backend/marsha/core/tests/management_commands/test_send_vod_convert_reminders.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""Test send_vod_convert_reminders command."""
22

3-
from datetime import datetime, timedelta
3+
from datetime import datetime, timedelta, timezone
44
from io import StringIO
55
from unittest import mock
66

77
from django.core import mail
88
from django.core.management import call_command
99
from django.test import TestCase
10-
from django.utils import timezone
10+
from django.utils import timezone as django_timezone
1111

1212
from marsha.core.defaults import HARVESTED, IDLE, JITSI, RUNNING, STOPPED
1313
from marsha.core.factories import VideoFactory
@@ -27,7 +27,7 @@ def test_send_vod_convert_reminders(self):
2727
"""Test send_vod_convert_reminders command."""
2828
expiration_reminder_date = datetime(2022, 11, 1, 15, 00, tzinfo=timezone.utc)
2929

30-
start = timezone.now() - timedelta(minutes=20)
30+
start = django_timezone.now() - timedelta(minutes=20)
3131
stop = start + timedelta(minutes=10)
3232

3333
# first live not started yet, should not be reminded.

src/backend/marsha/core/tests/utils/test_send_emails.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Test the send_emails functions."""
22

3+
from datetime import datetime, timezone
4+
35
from django.core import mail
46
from django.test import TestCase, override_settings
5-
from django.utils import timezone
6-
from django.utils.datetime_safe import datetime
77

88
from marsha.core.factories import VideoFactory
99
from marsha.core.utils.send_emails import (

src/backend/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ install_requires =
4747
django-storages==1.14.3
4848
django-peertube-runner-connector==0.12.1
4949
django-waffle==4.2.0
50-
Django<5
50+
Django==5.0.9
5151
djangorestframework==3.15.2
5252
djangorestframework_simplejwt==5.3.1
5353
dockerflow==2024.4.2

0 commit comments

Comments
 (0)