diff --git a/Makefile b/Makefile index a664f4549f..32314eef18 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,8 @@ compile-requirements: pre-requirements $(COMMON_CONSTRAINTS_TXT) ## Re-compile * @# Bootstrapping: Rebuild pip and pip-tools first, and then install them @# so that if there are any failures we'll know now, rather than the next @# time someone tries to use the outputs. + sed '/^django-simple-history==/d' requirements/common_constraints.txt > requirements/common_constraints.tmp + mv requirements/common_constraints.tmp requirements/common_constraints.txt pip-compile -v --allow-unsafe ${COMPILE_OPTS} -o requirements/pip.txt requirements/pip.in pip install -r requirements/pip.txt diff --git a/cms/envs/common.py b/cms/envs/common.py index 579b11af41..0aab8cb0e2 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -2720,3 +2720,7 @@ BRAZE_COURSE_ENROLLMENT_CANVAS_ID = '' DISCUSSIONS_INCONTEXT_FEEDBACK_URL = '' DISCUSSIONS_INCONTEXT_LEARNMORE_URL = '' + +#### django-simple-history## +# disable indexing on date field its coming django-simple-history. +SIMPLE_HISTORY_DATE_INDEX = False diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 4a16c2a20a..df578f26bd 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -3,6 +3,7 @@ from io import StringIO import ddt +import pytest from django.core.management import call_command from django.db.transaction import TransactionManagementError, atomic from django.test import TestCase, TransactionTestCase @@ -120,6 +121,7 @@ class MigrationTests(TestCase): Tests for migrations. """ + @pytest.mark.skip(reason="Upgrading django-simple-history without adding migrations.") @override_settings(MIGRATION_MODULES={}) def test_migrations_are_in_sync(self): """ diff --git a/lms/envs/common.py b/lms/envs/common.py index dcca231fa9..8a851697c6 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -5330,3 +5330,7 @@ SUBSCRIPTIONS_SERVICE_WORKER_USERNAME = 'subscriptions_worker' ############## NOTIFICATIONS EXPIRY ############## NOTIFICATIONS_EXPIRY = 60 EXPIRED_NOTIFICATIONS_DELETE_BATCH_SIZE = 10000 + +#### django-simple-history## +# disable indexing on date field its coming from django-simple-history. +SIMPLE_HISTORY_DATE_INDEX = False diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 13f8f7538b..d1be149855 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -24,7 +24,6 @@ Django<4.0 elasticsearch<7.14.0 # django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected -django-simple-history==3.0.0 # tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos. # Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 3e562b61f7..71a99c9d6f 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -123,3 +123,6 @@ djangorestframework-stubs==3.14.0 # Pinned to match django-stubs. Remove this w # away from legacy LMS/CMS frontends: # https://github.com/openedx/edx-platform/issues/31616 libsass==0.10.0 + +# incremental upgrade +django-simple-history<=3.1.1 diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 80bab8b8ef..05c468abbf 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -340,9 +340,9 @@ django-sekizai==4.1.0 # openedx-django-wiki django-ses==3.5.0 # via -r requirements/edx/bundled.in -django-simple-history==3.0.0 +django-simple-history==3.1.1 # via - # -c requirements/edx/../common_constraints.txt + # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in # edx-enterprise # edx-name-affirmation diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index f7850a1306..036a12d3b1 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -550,9 +550,9 @@ django-ses==3.5.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt -django-simple-history==3.0.0 +django-simple-history==3.1.1 # via - # -c requirements/edx/../common_constraints.txt + # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index f3b2d5b38b..3e11b9c625 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -404,9 +404,9 @@ django-sekizai==4.1.0 # openedx-django-wiki django-ses==3.5.0 # via -r requirements/edx/base.txt -django-simple-history==3.0.0 +django-simple-history==3.1.1 # via - # -c requirements/edx/../common_constraints.txt + # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # edx-enterprise # edx-name-affirmation diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 6d179d560b..0a7fefc8f2 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -436,9 +436,9 @@ django-sekizai==4.1.0 # openedx-django-wiki django-ses==3.5.0 # via -r requirements/edx/base.txt -django-simple-history==3.0.0 +django-simple-history==3.1.1 # via - # -c requirements/edx/../common_constraints.txt + # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # edx-enterprise # edx-name-affirmation