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

feat!: Upgrade to Django 4.2 #1503

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/testing-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker exec -t insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
source /edx/app/insights/venvs/insights/bin/activate &&
PATH=\$PATH:/edx/app/insights/nodeenvs/insights/bin:/snap/bin &&
export TOXENV=django32 &&
export TOXENV=django42 &&
pip install -r requirements/github.txt &&
set -x &&
nodeenv --node=${NODE_VERSION} /edx/app/insights/nodeenvs/insights-test-${NODE} &&
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ docker exec -t insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
source /edx/app/insights/venvs/insights/bin/activate &&
PATH=\$PATH:/edx/app/insights/nodeenvs/insights/bin:/snap/bin &&
export TOXENV=django32 &&
export TOXENV=django42 &&
pip install -r requirements/github.txt &&
make $TARGETS
"
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
matrix:
python-version: ["3.8"]
os: [ubuntu-20.04]
toxenv: [django32]
toxenv: [django42]
node: [16]
env:
DATA_API_VERSION: "latest"
steps:
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: start container
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ $(COMMON_CONSTRAINTS_TXT):

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(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 install -qr requirements/pip_tools.txt ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
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
Expand Down
9 changes: 4 additions & 5 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ asgiref==3.7.2
# via
# django
# django-countries
backports-zoneinfo==0.2.1
# via django
certifi==2023.7.22
# via requests
cffi==1.15.1
Expand All @@ -30,9 +32,8 @@ defusedxml==0.7.1
# via
# python3-openid
# social-auth-core
django==3.2.21
django==4.2.5
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
# django-appconf
Expand Down Expand Up @@ -168,9 +169,7 @@ python-slugify==8.0.1
python3-openid==3.2.0
# via social-auth-core
pytz==2023.3.post1
# via
# django
# djangorestframework
# via djangorestframework
pyyaml==6.0.1
# via
# code-annotations
Expand Down
2 changes: 1 addition & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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
4 changes: 2 additions & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# Newer version of django-webpack-loader is not compatible with npm webpack-bundle-tracker > 0.4.3
django-webpack-loader==0.7.0

# Constraint Django to 3.2 LTS
django<3.3
# Constraint Django to 4.2 LTS
Django<5.0

# urllib3 > 2.0.2 introduces an error
urllib3>=1.26.15, <2
2 changes: 1 addition & 1 deletion requirements/django.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
django==3.2.21
django==4.2.5
8 changes: 5 additions & 3 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ babel==2.12.1
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo==0.2.1
# via
# -r requirements/base.txt
# django
beautifulsoup4==4.12.2
# via pydata-sphinx-theme
certifi==2023.7.22
Expand Down Expand Up @@ -51,9 +55,8 @@ defusedxml==0.7.1
# -r requirements/base.txt
# python3-openid
# social-auth-core
django==3.2.21
django==4.2.5
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-appconf
Expand Down Expand Up @@ -240,7 +243,6 @@ pytz==2023.3.post1
# via
# -r requirements/base.txt
# babel
# django
# djangorestframework
pyyaml==6.0.1
# via
Expand Down
8 changes: 5 additions & 3 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ astroid==2.15.6
# -r requirements/test.txt
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
# via
# -r requirements/test.txt
# django
bok-choy==2.0.2
# via -r requirements/test.txt
build==1.0.3
Expand Down Expand Up @@ -75,9 +79,8 @@ distlib==0.3.7
# via
# -r requirements/tox.txt
# virtualenv
django==3.2.21
django==4.2.5
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/test.txt
# django-appconf
Expand Down Expand Up @@ -350,7 +353,6 @@ python3-openid==3.2.0
pytz==2023.3.post1
# via
# -r requirements/test.txt
# django
# djangorestframework
pyyaml==6.0.1
# via
Expand Down
8 changes: 5 additions & 3 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ asgiref==3.7.2
# -r requirements/base.txt
# django
# django-countries
backports-zoneinfo==0.2.1
# via
# -r requirements/base.txt
# django
certifi==2023.7.22
# via
# -r requirements/base.txt
Expand Down Expand Up @@ -41,9 +45,8 @@ defusedxml==0.7.1
# -r requirements/base.txt
# python3-openid
# social-auth-core
django==3.2.21
django==4.2.5
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-appconf
Expand Down Expand Up @@ -221,7 +224,6 @@ python3-openid==3.2.0
pytz==2023.3.post1
# via
# -r requirements/base.txt
# django
# djangorestframework
pyyaml==6.0.1
# via
Expand Down
6 changes: 4 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ astroid==2.15.6
# -r requirements/test.in
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
# via
# -r requirements/base.txt
# django
bok-choy==2.0.2
# via -r requirements/test.in
certifi==2023.7.22
Expand Down Expand Up @@ -62,7 +66,6 @@ defusedxml==0.7.1
dill==0.3.7
# via pylint
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-appconf
Expand Down Expand Up @@ -280,7 +283,6 @@ python3-openid==3.2.0
pytz==2023.3.post1
# via
# -r requirements/base.txt
# django
# djangorestframework
pyyaml==6.0.1
# via
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32}
envlist = py38-django{42}
skipsdist = true

[pytest]
Expand All @@ -22,7 +22,7 @@ passenv =
SELENIUM_BROWSER
BOKCHOY_HEADLESS
deps =
django32: -r requirements/django.txt
django42: -r requirements/django.txt
-r {toxinidir}/requirements/test.txt
allowlist_externals =
make
Expand Down
Loading