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
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,11 @@ $(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/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 -i.'' 's/Django<4.0//g' requirements/common_constraints.txt
sed -i.'' 's/django-simple-history==3.0.0//g' 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
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.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
40 changes: 20 additions & 20 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.60
# via django-ses
botocore==1.31.48
botocore==1.31.60
# via
# boto3
# s3transfer
Expand All @@ -35,11 +36,11 @@ celery==5.3.4
# edx-celeryutils
certifi==2023.7.22
# via requests
cffi==1.15.1
cffi==1.16.0
# via
# cryptography
# pynacl
charset-normalizer==3.2.0
charset-normalizer==3.3.0
# via requests
click==8.1.7
# via
Expand All @@ -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
defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==3.2.21
django==4.2.6
# 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 @@ -157,11 +158,11 @@ 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
edx-opaque-keys==2.5.0
edx-opaque-keys==2.5.1
# via edx-drf-extensions
edx-rbac==1.8.0
# via -r requirements/base.in
Expand Down Expand Up @@ -189,13 +190,13 @@ monotonic==1.6
# via analytics-python
mysqlclient==2.2.0
# via -r requirements/base.in
newrelic==9.0.0
newrelic==9.1.0
# via edx-django-utils
oauthlib==3.2.2
# via
# requests-oauthlib
# social-auth-core
packaging==23.1
packaging==23.2
# via drf-yasg
pbr==5.11.1
# via stevedore
Expand Down Expand Up @@ -230,15 +231,14 @@ python3-openid==3.2.0
pytz==2023.3.post1
# via
# -r requirements/base.in
# django
# django-ses
# djangorestframework
# drf-yasg
pyyaml==6.0.1
# via
# code-annotations
# drf-yasg
redis==5.0.0
redis==5.0.1
# via -r requirements/base.in
requests==2.31.0
# via
Expand All @@ -252,7 +252,7 @@ requests-oauthlib==1.3.1
# via social-auth-core
rules==3.3
# via -r requirements/base.in
s3transfer==0.6.2
s3transfer==0.7.0
# via boto3
semantic-version==2.10.0
# via edx-drf-extensions
Expand Down Expand Up @@ -282,7 +282,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 @@ -295,7 +295,7 @@ unicodecsv==0.14.1
# via djangorestframework-csv
uritemplate==4.1.1
# via drf-yasg
urllib3==1.26.16
urllib3==1.26.17
# via
# botocore
# requests
Expand All @@ -304,7 +304,7 @@ vine==5.0.0
# amqp
# celery
# kombu
wcwidth==0.2.6
wcwidth==0.2.8
# 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
Loading
Loading