Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
feat!: Upgrade to Django 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Oct 9, 2023
1 parent 060d90c commit 5b612c5
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- ubuntu-20.04
python-version:
- 3.8
toxenv: [ django32, django42 ]
toxenv: [ django42 ]
steps:
- uses: actions/checkout@v1
- name: setup python
Expand All @@ -46,7 +46,7 @@ jobs:
make static
make validate_translations
- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django32'
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v1
with:
flags: unittests
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## re-compile requirements .txt files from .in files
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
Expand Down
3 changes: 3 additions & 0 deletions registrar/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,6 @@

# disable indexing on history_date
SIMPLE_HISTORY_DATE_INDEX = False

# Keep using deprecated pytz for Django>4
USE_DEPRECATED_PYTZ = True
9 changes: 3 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ async-timeout==4.0.3
# via redis
backoff==1.10.0
# via analytics-python
backports-zoneinfo==0.2.1
# via django
billiard==3.6.4.0
# via celery
celery==4.4.7
Expand All @@ -39,9 +41,8 @@ defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==3.2.22
django==4.2.6
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
# django-cors-headers
Expand Down Expand Up @@ -80,9 +81,6 @@ django-mysql==4.11.0
# via -r requirements/base.in
django-simple-history==3.4.0
# via -r requirements/base.in
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
django-storages==1.10.1
# via
# -c requirements/constraints.txt
Expand Down Expand Up @@ -167,7 +165,6 @@ pytz==2023.3.post1
# via
# -r requirements/base.in
# celery
# django
# djangorestframework
# drf-yasg
pyyaml==6.0.1
Expand Down
2 changes: 1 addition & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


# using LTS django version
Django<4.0


# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
Expand Down
3 changes: 2 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# Common constraints for edx repos
-c common_constraints.txt

Django<4.0
# This constraint can be removed once global constraint is updated.
Django<4.3

# Version 3.2.0 contains bad arabic translations that will cause validation tests to fail
django-extensions<3.2.0
Expand Down
20 changes: 12 additions & 8 deletions requirements/devstack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ backoff==1.10.0
# via
# -r requirements/local.txt
# analytics-python
backports-zoneinfo==0.2.1
# via
# -r requirements/local.txt
# django
beautifulsoup4==4.12.2
# via
# -r requirements/local.txt
Expand All @@ -48,12 +52,12 @@ billiard==3.6.4.0
# via
# -r requirements/local.txt
# celery
boto3==1.28.60
boto3==1.28.62
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
# moto
botocore==1.31.60
botocore==1.31.62
# via
# -r requirements/local.txt
# boto3
Expand Down Expand Up @@ -122,9 +126,8 @@ distlib==0.3.7
# via
# -r requirements/local.txt
# virtualenv
django==3.2.22
django==4.2.6
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/local.txt
# django-cors-headers
Expand Down Expand Up @@ -171,8 +174,6 @@ django-mysql==4.11.0
# via -r requirements/local.txt
django-simple-history==3.4.0
# via -r requirements/local.txt
# -c requirements/common_constraints.txt
# -r requirements/local.txt
django-storages==1.10.1
# via
# -c requirements/constraints.txt
Expand Down Expand Up @@ -219,7 +220,7 @@ edx-django-utils==5.7.0
# edx-rest-api-client
edx-drf-extensions==8.10.0
# via -r requirements/local.txt
edx-i18n-tools==1.2.0
edx-i18n-tools==1.3.0
# via -r requirements/local.txt
edx-lint==5.3.4
# via -r requirements/local.txt
Expand Down Expand Up @@ -289,6 +290,10 @@ lazy-object-proxy==1.9.0
# via
# -r requirements/local.txt
# astroid
lxml==4.9.3
# via
# -r requirements/local.txt
# edx-i18n-tools
lz4==4.3.2
# via
# -r requirements/local.txt
Expand Down Expand Up @@ -450,7 +455,6 @@ pytz==2023.3.post1
# -r requirements/local.txt
# babel
# celery
# django
# djangorestframework
# drf-yasg
pywatchman==1.4.1
Expand Down
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==3.2.22
django==4.2.6
18 changes: 10 additions & 8 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ backoff==1.10.0
# via
# -r requirements/test.txt
# analytics-python
backports-zoneinfo==0.2.1
# via
# -r requirements/test.txt
# django
beautifulsoup4==4.12.2
# via
# -r requirements/docs.txt
Expand All @@ -48,12 +52,12 @@ billiard==3.6.4.0
# via
# -r requirements/test.txt
# celery
boto3==1.28.60
boto3==1.28.62
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# moto
botocore==1.31.60
botocore==1.31.62
# via
# -r requirements/test.txt
# boto3
Expand Down Expand Up @@ -122,9 +126,8 @@ distlib==0.3.7
# via
# -r requirements/test.txt
# virtualenv
django==3.2.22
django==4.2.6
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/test.txt
# django-cors-headers
Expand Down Expand Up @@ -171,8 +174,6 @@ django-mysql==4.11.0
# via -r requirements/test.txt
django-simple-history==3.4.0
# via -r requirements/test.txt
# -c requirements/common_constraints.txt
# -r requirements/test.txt
django-storages==1.10.1
# via
# -c requirements/constraints.txt
Expand Down Expand Up @@ -219,7 +220,7 @@ edx-django-utils==5.7.0
# edx-rest-api-client
edx-drf-extensions==8.10.0
# via -r requirements/test.txt
edx-i18n-tools==1.2.0
edx-i18n-tools==1.3.0
# via -r requirements/local.in
edx-lint==5.3.4
# via -r requirements/test.txt
Expand Down Expand Up @@ -291,6 +292,8 @@ lazy-object-proxy==1.9.0
# via
# -r requirements/test.txt
# astroid
lxml==4.9.3
# via edx-i18n-tools
lz4==4.3.2
# via ruamel-yaml-cmd
markupsafe==2.1.3
Expand Down Expand Up @@ -443,7 +446,6 @@ pytz==2023.3.post1
# -r requirements/test.txt
# babel
# celery
# django
# djangorestframework
# drf-yasg
pywatchman==1.4.1
Expand Down
23 changes: 17 additions & 6 deletions requirements/monitoring/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ backoff==1.10.0
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# analytics-python
backports-zoneinfo==0.2.1
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# django
beautifulsoup4==4.12.2
# via
# -r requirements/monitoring/../devstack.txt
Expand All @@ -73,14 +80,14 @@ billiard==3.6.4.0
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# celery
boto3==1.28.60
boto3==1.28.62
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# moto
botocore==1.31.60
botocore==1.31.62
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand Down Expand Up @@ -185,7 +192,7 @@ distlib==0.3.7
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../test.txt
# virtualenv
django==3.2.22
django==4.2.6
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand Down Expand Up @@ -348,7 +355,7 @@ edx-drf-extensions==8.10.0
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
edx-i18n-tools==1.2.0
edx-i18n-tools==1.3.0
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand Down Expand Up @@ -472,6 +479,11 @@ lazy-object-proxy==1.9.0
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../test.txt
# astroid
lxml==4.9.3
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
# edx-i18n-tools
lz4==4.3.2
# via
# -r requirements/monitoring/../devstack.txt
Expand Down Expand Up @@ -719,7 +731,6 @@ pytz==2023.3.post1
# -r requirements/monitoring/../test.txt
# babel
# celery
# django
# djangorestframework
# drf-yasg
pywatchman==1.4.1
Expand Down Expand Up @@ -1015,7 +1026,7 @@ zope-event==5.0
# via
# -r requirements/monitoring/../production.txt
# gevent
zope-interface==6.0
zope-interface==6.1
# via
# -r requirements/monitoring/../production.txt
# gevent
Expand Down
16 changes: 8 additions & 8 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ backoff==1.10.0
# via
# -r requirements/base.txt
# analytics-python
backports-zoneinfo==0.2.1
# via
# -r requirements/base.txt
# django
billiard==3.6.4.0
# via
# -r requirements/base.txt
# celery
boto3==1.28.60
boto3==1.28.62
# via
# -c requirements/constraints.txt
# -r requirements/production.in
botocore==1.31.60
botocore==1.31.62
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -66,9 +70,8 @@ defusedxml==0.8.0rc2
# -r requirements/base.txt
# python3-openid
# social-auth-core
django==3.2.22
django==4.2.6
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-cors-headers
Expand Down Expand Up @@ -109,8 +112,6 @@ django-mysql==4.11.0
# via -r requirements/base.txt
django-simple-history==3.4.0
# via -r requirements/base.txt
# -c requirements/common_constraints.txt
# -r requirements/base.txt
django-storages==1.10.1
# via
# -c requirements/constraints.txt
Expand Down Expand Up @@ -248,7 +249,6 @@ pytz==2023.3.post1
# via
# -r requirements/base.txt
# celery
# django
# djangorestframework
# drf-yasg
pyyaml==6.0.1
Expand Down Expand Up @@ -331,7 +331,7 @@ vine==1.3.0
# celery
zope-event==5.0
# via gevent
zope-interface==6.0
zope-interface==6.1
# via gevent

# The following packages are considered to be unsafe in a requirements file:
Expand Down
Loading

0 comments on commit 5b612c5

Please sign in to comment.