Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Upgrade to Django 4.2 #525

Merged
merged 10 commits into from
Oct 5, 2023
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
python-version: ["3.8"]
django-version: ["pinned", "4.2"]
django-version: ["pinned"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,10 @@ $(COMMON_CONSTRAINTS_TXT):

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
sed 's/Django<2.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-271 for more details.
sed 's/pyjwt\[crypto\]<2.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed 's/social-auth-core<4.0.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed 's/edx-auth-backends<4.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed 's/edx-drf-extensions<7.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed 's/drf-jwt<1.19.1//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
UsamaSadiq marked this conversation as resolved.
Show resolved Hide resolved
mv requirements/common_constraints.tmp requirements/common_constraints.txt
# Make sure to compile files after any other files they include!
pip-compile --upgrade --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in
Expand Down
5 changes: 5 additions & 0 deletions license_manager/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@

USE_TZ = True

# Django 4.0+ uses zoneinfo if this is not set. We can remove this and
# migrate to zoneinfo after Django 4.2 upgrade. See more on following url
# https://docs.djangoproject.com/en/4.2/releases/4.0/#zoneinfo-default-timezone-implementation
USE_DEPRECATED_PYTZ = True

LOCALE_PATHS = (
root('conf', 'locale'),
)
Expand Down
20 changes: 10 additions & 10 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ backoff==1.10.0
backports-zoneinfo[tzdata]==0.2.1
# via
# celery
# django
# kombu
billiard==4.1.0
# via celery
boto3==1.28.48
boto3==1.28.51
# via django-ses
botocore==1.31.48
botocore==1.31.51
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -57,17 +58,17 @@ click-repl==0.3.0
# via celery
code-annotations==1.5.0
# via edx-toggles
cryptography==41.0.3
cryptography==41.0.4
# via
# pyjwt
# social-auth-core
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-celery-results
# django-cors-headers
Expand Down Expand Up @@ -105,7 +106,7 @@ django-durationwidget==1.0.5
# via -r requirements/base.in
django-extensions==3.2.3
# via -r requirements/base.in
django-filter==23.2
django-filter==23.3
# via -r requirements/base.in
django-log-request-id==2.1.0
# via -r requirements/base.in
Expand Down Expand Up @@ -159,7 +160,7 @@ edx-django-utils==5.7.0
# edx-drf-extensions
# edx-rest-api-client
# edx-toggles
edx-drf-extensions==8.9.3
edx-drf-extensions==8.10.0
# via
# -r requirements/base.in
# edx-rbac
Expand Down Expand Up @@ -232,7 +233,6 @@ python3-openid==3.2.0
pytz==2023.3.post1
# via
# -r requirements/base.in
# django
# django-ses
# djangorestframework
# drf-yasg
Expand Down Expand Up @@ -284,7 +284,7 @@ stevedore==5.1.0
# edx-opaque-keys
text-unidecode==1.3
# via python-slugify
typing-extensions==4.7.1
typing-extensions==4.8.0
# via
# asgiref
# edx-opaque-keys
Expand All @@ -308,5 +308,5 @@ vine==5.0.0
# kombu
wcwidth==0.2.6
# via prompt-toolkit
zipp==3.16.2
zipp==3.17.0
# via -r requirements/base.in
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
5 changes: 5 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ wrapt==1.11.*
edx-lint<5.3
pylint<2.15
astroid<2.12

# Stay on LTS release
# This can be removed once all IDAs have been upgraded to Django 4.2
# and the global constraint has been updated from Django<4.0 to Django<4.3
Django<4.3
22 changes: 11 additions & 11 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ backports-zoneinfo[tzdata]==0.2.1
# via
# -r requirements/validation.txt
# celery
# django
# kombu
billiard==4.1.0
# via
# -r requirements/validation.txt
# celery
boto3==1.28.48
boto3==1.28.51
# via
# -r requirements/validation.txt
# django-ses
botocore==1.31.48
botocore==1.31.51
# via
# -r requirements/validation.txt
# boto3
Expand Down Expand Up @@ -108,7 +109,7 @@ coverage[toml]==7.3.1
# via
# -r requirements/validation.txt
# pytest-cov
cryptography==41.0.3
cryptography==41.0.4
# via
# -r requirements/validation.txt
# pyjwt
Expand All @@ -130,9 +131,9 @@ dill==0.3.7
# via
# -r requirements/validation.txt
# pylint
django==3.2.21
django==4.2.5
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/validation.txt
# django-celery-results
# django-cors-headers
Expand Down Expand Up @@ -173,13 +174,13 @@ django-debug-toolbar==4.2.0
# via -r requirements/dev.in
django-durationwidget==1.0.5
# via -r requirements/validation.txt
django-dynamic-fixture==4.0.0
django-dynamic-fixture==4.0.1
# via -r requirements/validation.txt
django-extensions==3.2.3
# via
# -r requirements/dev.in
# -r requirements/validation.txt
django-filter==23.2
django-filter==23.3
# via -r requirements/validation.txt
django-log-request-id==2.1.0
# via -r requirements/validation.txt
Expand Down Expand Up @@ -237,7 +238,7 @@ edx-django-utils==5.7.0
# edx-drf-extensions
# edx-rest-api-client
# edx-toggles
edx-drf-extensions==8.9.3
edx-drf-extensions==8.10.0
# via
# -r requirements/validation.txt
# edx-rbac
Expand Down Expand Up @@ -471,7 +472,6 @@ python3-openid==3.2.0
pytz==2023.3.post1
# via
# -r requirements/validation.txt
# django
# django-ses
# djangorestframework
# drf-yasg
Expand Down Expand Up @@ -566,7 +566,7 @@ tomlkit==0.12.1
# via
# -r requirements/validation.txt
# pylint
typing-extensions==4.7.1
typing-extensions==4.8.0
# via
# -r requirements/validation.txt
# annotated-types
Expand Down Expand Up @@ -616,7 +616,7 @@ wrapt==1.11.2
# -c requirements/constraints.txt
# -r requirements/validation.txt
# astroid
zipp==3.16.2
zipp==3.17.0
# via
# -r requirements/pip-tools.txt
# -r requirements/validation.txt
Expand Down
24 changes: 12 additions & 12 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,19 @@ backports-zoneinfo[tzdata]==0.2.1
# via
# -r requirements/test.txt
# celery
# django
# kombu
beautifulsoup4==4.12.2
# via pydata-sphinx-theme
billiard==4.1.0
# via
# -r requirements/test.txt
# celery
boto3==1.28.48
boto3==1.28.51
# via
# -r requirements/test.txt
# django-ses
botocore==1.31.48
botocore==1.31.51
# via
# -r requirements/test.txt
# boto3
Expand Down Expand Up @@ -110,7 +111,7 @@ coverage[toml]==7.3.1
# via
# -r requirements/test.txt
# pytest-cov
cryptography==41.0.3
cryptography==41.0.4
# via
# -r requirements/test.txt
# pyjwt
Expand All @@ -126,9 +127,9 @@ dill==0.3.7
# via
# -r requirements/test.txt
# pylint
django==3.2.21
django==4.2.5
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/test.txt
# django-celery-results
# django-cors-headers
Expand Down Expand Up @@ -165,11 +166,11 @@ django-crum==0.7.9
# edx-toggles
django-durationwidget==1.0.5
# via -r requirements/test.txt
django-dynamic-fixture==4.0.0
django-dynamic-fixture==4.0.1
# via -r requirements/test.txt
django-extensions==3.2.3
# via -r requirements/test.txt
django-filter==23.2
django-filter==23.3
# via -r requirements/test.txt
django-log-request-id==2.1.0
# via -r requirements/test.txt
Expand Down Expand Up @@ -236,7 +237,7 @@ edx-django-utils==5.7.0
# edx-drf-extensions
# edx-rest-api-client
# edx-toggles
edx-drf-extensions==8.9.3
edx-drf-extensions==8.10.0
# via
# -r requirements/test.txt
# edx-rbac
Expand Down Expand Up @@ -368,7 +369,7 @@ pycparser==2.21
# via
# -r requirements/test.txt
# cffi
pydata-sphinx-theme==0.13.3
pydata-sphinx-theme==0.14.0
# via sphinx-book-theme
pygments==2.16.1
# via
Expand Down Expand Up @@ -443,7 +444,6 @@ pytz==2023.3.post1
# via
# -r requirements/test.txt
# babel
# django
# django-ses
# djangorestframework
# drf-yasg
Expand Down Expand Up @@ -555,7 +555,7 @@ tomlkit==0.12.1
# via
# -r requirements/test.txt
# pylint
typing-extensions==4.7.1
typing-extensions==4.8.0
# via
# -r requirements/test.txt
# asgiref
Expand Down Expand Up @@ -598,7 +598,7 @@ wrapt==1.11.2
# -c requirements/constraints.txt
# -r requirements/test.txt
# astroid
zipp==3.16.2
zipp==3.17.0
# via
# -r requirements/test.txt
# importlib-metadata
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tomli==2.0.1
# pyproject-hooks
wheel==0.41.2
# via pip-tools
zipp==3.16.2
zipp==3.17.0
# via importlib-metadata

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