Skip to content

Commit 9360df1

Browse files
wgu-ram-chandraawais786
authored andcommitted
parent 42afa1b
author Ram Chandra Bhavirisetty <[email protected]> 1752086075 +0000 committer awais qureshi <[email protected]> 1757311425 +0500 parent 42afa1b author Ram Chandra Bhavirisetty <[email protected]> 1752086075 +0000 committer awais qureshi <[email protected]> 1757311409 +0500 parent 42afa1b author Ram Chandra Bhavirisetty <[email protected]> 1752086075 +0000 committer awais qureshi <[email protected]> 1757311371 +0500 chore: remove deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings chore: checking Django 5.2 fix: fix pylint quality warnings (#37187) fix: add resourcetemplate to xblock_mixins (#37184) Add ResourceTemplates to XBLOCK_MIXINS so it’s applied to all CMS XBlocks at runtime instead of being directly inherited. This keeps the Studio-only feature in edx-platform (where it belongs), while still making it available to built-in and extracted XBlocks. When we extract built-in blocks from the platform, they will not be able to inherit ResourcesTemplates directly; they will get it from XBLOCK_MIXINS. So, we also needed to update a few template-related tests to use the mixed block class (or an instance of it) rather than the unmixed base class, because the unmixed base classes will soon be extracted and thus lack ResourceTemplates. Related to #34827 chore: Handle forbidden username exceptions on registration (#37185) chore: bump xblocks-contrib to 0.6.0 (#37196) fix: Fix signal test failures in Django 5.2. (#37193) fix: Fix signal test failures after Django 5.2. fix: Fix signal test failures after Django 5.2. fix: Fix signal test failures after Django 5.2. fix: Fix signal test failures after Django 5.2. chore: Update unit-tests.yml feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. feat!: Upgrade to django5.2. chore: Delete cms/djangoapps/import_from_modulestore/data.py chore: Update test_db.py feat!: Upgrade to django5.2. chore: Update test_import.py
1 parent 42afa1b commit 9360df1

File tree

13 files changed

+27
-29
lines changed

13 files changed

+27
-29
lines changed

common/djangoapps/util/file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class UniversalNewlineIterator:
155155
object which does not inherently support being read in
156156
universal-newline mode. It returns a line at a time.
157157
"""
158+
158159
def __init__(self, original_file, buffer_size=4096):
159160
self.original_file = original_file
160161
self.buffer_size = buffer_size

common/djangoapps/util/tests/test_db.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Tests for util.db module."""
22

33
from io import StringIO
4+
from unittest import skip
45

56
import ddt
67
from django.core.management import call_command
@@ -121,6 +122,7 @@ class MigrationTests(TestCase):
121122
"""
122123

123124
@override_settings(MIGRATION_MODULES={})
125+
@skip("enterprise needs migrations.")
124126
def test_migrations_are_in_sync(self):
125127
"""
126128
Tests that the migration files are in sync with the models.

openedx/core/djangoapps/user_api/accounts/tests/test_views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ class TestCancelAccountRetirementStatusView(UserAPITestCase):
262262
"""
263263
Unit tests for CancelAccountRetirementStatusView
264264
"""
265+
265266
def setUp(self):
266267
super().setUp()
267268
permission = PermissionFactory(
@@ -1147,7 +1148,7 @@ def test_patch_invalid_language_proficiencies(self, patch_value, expected_error_
11471148
client = self.login_client("client", "user")
11481149
response = self.send_patch(client, {"language_proficiencies": patch_value}, expected_status=400)
11491150
assert response.data['field_errors']['language_proficiencies']['developer_message'] == \
1150-
f"Value '{patch_value}' is not valid for field 'language_proficiencies': {expected_error_message}"
1151+
f"Value '{patch_value}' is not valid for field 'language_proficiencies': {expected_error_message}"
11511152

11521153
@mock.patch('openedx.core.djangoapps.user_api.accounts.serializers.AccountUserSerializer.save')
11531154
def test_patch_serializer_save_fails(self, serializer_save):
@@ -1201,8 +1202,8 @@ def test_convert_relative_profile_url(self):
12011202
self.client.login(username=self.user.username, password=TEST_PASSWORD)
12021203
response = self.send_get(self.client)
12031204
assert response.data['profile_image'] == \
1204-
{'has_image': False,
1205-
'image_url_full': 'http://testserver/static/default_50.png',
1205+
{'has_image': False,
1206+
'image_url_full': 'http://testserver/static/default_50.png',
12061207
'image_url_small': 'http://testserver/static/default_10.png'}
12071208

12081209
@override_settings(

openedx/core/storage.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class PipelineForgivingMixin:
2020
"""
2121
An extension of the django-pipeline storage backend which forgives missing files.
2222
"""
23+
2324
def hashed_name(self, name, content=None, **kwargs): # lint-amnesty, pylint: disable=missing-function-docstring
2425
try:
2526
out = super().hashed_name(name, content, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments
@@ -53,6 +54,7 @@ class ProductionMixin(
5354
can be applied over an existing Storage.
5455
We use this version on production.
5556
"""
57+
5658
def __init__(self, *args, **kwargs):
5759
kwargs.update(settings.STATICFILES_STORAGE_KWARGS.get(settings.STORAGES['staticfiles']['BACKEND'], {}))
5860
super().__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments

requirements/constraints.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35280
2020
celery>=5.2.2,<6.0.0
2121

22-
# Date: 2024-02-02
23-
# Stay on LTS version, remove once this is added to common constraint
24-
Django<5.0
25-
2622
# Date: 2020-02-10
2723
# django-oauth-toolkit version >=2.0.0 has breaking changes. More details
2824
# mentioned on this issue https://github.com/openedx/edx-platform/issues/32884

requirements/edx/base.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# make upgrade
66
#
7+
-e git+https://github.com/jazzband/django-pipeline.git@927ca9ad250d67402d2e32f64fd5a47cfb60f328#egg=django-pipeline
8+
# via -r requirements/edx/github.in
79
-e git+https://github.com/anupdhabarde/edx-proctoring-proctortrack.git@31c6c9923a51c903ae83760ecbbac191363aa2a2#egg=edx_proctoring_proctortrack
810
# via -r requirements/edx/github.in
911
acid-xblock==0.4.1
@@ -169,9 +171,8 @@ defusedxml==0.7.1
169171
# ora2
170172
# python3-openid
171173
# social-auth-core
172-
django==4.2.23
174+
django==5.2.5
173175
# via
174-
# -c requirements/edx/../constraints.txt
175176
# -r requirements/edx/kernel.in
176177
# django-appconf
177178
# django-autocomplete-light
@@ -330,8 +331,6 @@ django-object-actions==5.0.0
330331
# via
331332
# edx-enterprise
332333
# enterprise-integrated-channels
333-
django-pipeline==4.0.0
334-
# via -r requirements/edx/kernel.in
335334
django-push-notifications==3.2.1
336335
# via edx-ace
337336
django-ratelimit==4.1.0

requirements/edx/development.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#
55
# make upgrade
66
#
7+
-e git+https://github.com/jazzband/django-pipeline.git@927ca9ad250d67402d2e32f64fd5a47cfb60f328#egg=django-pipeline
8+
# via
9+
# -r requirements/edx/doc.txt
10+
# -r requirements/edx/testing.txt
711
-e git+https://github.com/anupdhabarde/edx-proctoring-proctortrack.git@31c6c9923a51c903ae83760ecbbac191363aa2a2#egg=edx_proctoring_proctortrack
812
# via
913
# -r requirements/edx/doc.txt
@@ -335,9 +339,8 @@ distlib==0.4.0
335339
# via
336340
# -r requirements/edx/testing.txt
337341
# virtualenv
338-
django==4.2.23
342+
django==5.2.5
339343
# via
340-
# -c requirements/edx/../constraints.txt
341344
# -r requirements/edx/doc.txt
342345
# -r requirements/edx/testing.txt
343346
# django-appconf
@@ -541,10 +544,6 @@ django-object-actions==5.0.0
541544
# -r requirements/edx/testing.txt
542545
# edx-enterprise
543546
# enterprise-integrated-channels
544-
django-pipeline==4.0.0
545-
# via
546-
# -r requirements/edx/doc.txt
547-
# -r requirements/edx/testing.txt
548547
django-push-notifications==3.2.1
549548
# via
550549
# -r requirements/edx/doc.txt

requirements/edx/doc.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# make upgrade
66
#
7+
-e git+https://github.com/jazzband/django-pipeline.git@927ca9ad250d67402d2e32f64fd5a47cfb60f328#egg=django-pipeline
8+
# via -r requirements/edx/base.txt
79
-e git+https://github.com/anupdhabarde/edx-proctoring-proctortrack.git@31c6c9923a51c903ae83760ecbbac191363aa2a2#egg=edx_proctoring_proctortrack
810
# via -r requirements/edx/base.txt
911
accessible-pygments==0.0.5
@@ -227,9 +229,8 @@ defusedxml==0.7.1
227229
# ora2
228230
# python3-openid
229231
# social-auth-core
230-
django==4.2.23
232+
django==5.2.5
231233
# via
232-
# -c requirements/edx/../constraints.txt
233234
# -r requirements/edx/base.txt
234235
# django-appconf
235236
# django-autocomplete-light
@@ -400,8 +401,6 @@ django-object-actions==5.0.0
400401
# -r requirements/edx/base.txt
401402
# edx-enterprise
402403
# enterprise-integrated-channels
403-
django-pipeline==4.0.0
404-
# via -r requirements/edx/base.txt
405404
django-push-notifications==3.2.1
406405
# via
407406
# -r requirements/edx/base.txt

requirements/edx/github.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,4 @@
9090
# django42 support PR merged but new release is pending.
9191
# https://github.com/openedx/edx-platform/issues/33431
9292
-e git+https://github.com/anupdhabarde/edx-proctoring-proctortrack.git@31c6c9923a51c903ae83760ecbbac191363aa2a2#egg=edx_proctoring_proctortrack
93+
-e git+https://github.com/jazzband/django-pipeline.git@927ca9ad250d67402d2e32f64fd5a47cfb60f328#egg=django-pipeline

requirements/edx/kernel.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ django-model-utils
4646
django-mptt
4747
django-mysql
4848
django-oauth-toolkit # Provides oAuth2 capabilities for Django
49-
django-pipeline
49+
# django-pipeline # using its main repo hash. since no release yet.
5050
django-ratelimit
5151
django-sekizai
5252
django-simple-history

0 commit comments

Comments
 (0)