Skip to content

Commit

Permalink
feat: upgrade Django to 4.2 & drop support for Django 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Apr 17, 2024
1 parent 43ac63e commit ddbd37d
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
python-version: ['3.8']
toxenv: [quality, docs, django32-celery53, django42-celery53, django32-pii-annotations]
toxenv: [quality, docs, django42-celery53, django42-pii-annotations]
env:
RUNJSHINT: true
steps:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Change Log
Unreleased
----------

[4.15.4]
--------
* feat: upgrade Django to 4.2 & drop support for Django 3.2

[4.15.3]
--------
* feat: replacing non encrypted fields of degreed config model with encrypted ones
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ $(COMMON_CONSTRAINTS_TXT):
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

check_pins: $(COMMON_CONSTRAINTS_TXT) ## check that our local copy of edx-platform pins is accurate
sed 's/Django<2.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
echo "### DON'T edit this file, it's copied from edx-platform. See make upgrade" > $(LOCAL_EDX_PINS)
curl -fsSL $(PLATFORM_BASE_REQS) | grep -v '^-e' | grep -v 'via edx-enterprise$$' >> $(LOCAL_EDX_PINS)
# These requirement pins are removed because this is causing a deadlock in upgrading celery in both
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.15.3"
__version__ = "4.15.4"
2 changes: 1 addition & 1 deletion enterprise/static/enterprise/bundles/main.style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ tox==3.28.0
# via
# -c requirements/constraints.txt
# -r requirements/ci.in
virtualenv==20.25.1
virtualenv==20.25.2
# via tox
2 changes: 1 addition & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# mock has dropped support for python 3.5 after 3.0.5
mock==3.0.5

# freezegun>0.3.14 requires python-dateutil>2.8.1 to pass the tests which is a dependency of edx-platform
# and edx-drf-extensions.
freezegun==0.3.14
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ vine==5.1.0
# amqp
# celery
# kombu
virtualenv==20.25.1
virtualenv==20.25.2
# via tox
wcwidth==0.2.13
# via
Expand Down
4 changes: 2 additions & 2 deletions requirements/edx-platform-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ edx-celeryutils==1.3.0
# super-csv
edx-codejail==3.3.3
# via -r requirements/edx/kernel.in
edx-completion==4.5.0
edx-completion==4.6.0
# via -r requirements/edx/kernel.in
edx-django-release-util==1.4.0
# via
Expand Down Expand Up @@ -469,7 +469,7 @@ edx-drf-extensions==10.2.0
# edx-when
# edxval
# openedx-learning
edx-enterprise==4.15.2
edx-enterprise==4.15.3
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/kernel.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/js_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ attrs==23.2.0
# trio
autocommand==2.2.2
# via jaraco-text
backports-tarfile==1.0.0
backports-tarfile==1.1.0
# via jaraco-context
certifi==2024.2.2
# via selenium
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get_requirements(requirements_file):
classifiers=[
"Development Status :: 3 - Alpha",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Natural Language :: English",
Expand Down
45 changes: 22 additions & 23 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,42}-celery{53}, django{32}-pii-annotations
envlist = py38-django{42}-celery{53}, django{42}-pii-annotations

[doc8]
max-line-length = 120
Expand All @@ -11,7 +11,7 @@ norecursedirs = .* docs requirements node_modules

[isort]
line_length = 120
known_edx =
known_edx =
known_django = django
known_djangoapp = model_utils
known_first_party = consent,enterprise,enterprise_learner_portal,integrated_channels
Expand All @@ -23,24 +23,23 @@ sections = FUTURE,STDLIB,THIRDPARTY,DJANGO,DJANGOAPP,EDX,FIRSTPARTY,LOCALFOLDER
universal = 1

[testenv]
setenv =
setenv =
TOXENV={envname}
deps =
django32: Django>=3.2,<4.0
django42: Django>=4.2,<4.3
deps =
django42: Django>=4.2,<5.0
celery53: -r{toxinidir}/requirements/celery53.txt
-r{toxinidir}/requirements/test.txt
commands =
commands =
py.test -Wd {posargs}

[testenv:docs]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = enterprise.settings.test
PYTHONPATH = {toxinidir}
allowlist_externals =
make
rm
deps =
deps =
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build --ignore-path docs/decisions README.rst docs
Expand All @@ -51,27 +50,27 @@ commands =
python setup.py check --restructuredtext

[testenv:isort]
deps =
deps =
-r{toxinidir}/requirements/dev.txt
commands =
commands =
isort --skip migrations tests test_utils enterprise enterprise_learner_portal consent integrated_channels manage.py setup.py

[testenv:isort-check]
deps =
deps =
-r{toxinidir}/requirements/dev.txt
commands =
commands =
isort --skip migrations --check-only --diff tests test_utils enterprise enterprise_learner_portal consent integrated_channels manage.py setup.py

[testenv:quality]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = enterprise.settings.test
allowlist_externals =
make
rm
touch
deps =
deps =
-r{toxinidir}/requirements/dev.txt
commands =
commands =
touch tests/__init__.py
pylint -j 0 enterprise enterprise_learner_portal consent integrated_channels tests test_utils requirements/check_pins.py --django-settings-module=enterprise.settings.test
rm tests/__init__.py
Expand All @@ -80,18 +79,18 @@ commands =

[testenv:jasmine]
passenv = JASMINE_BROWSER DISPLAY
deps =
django32: Django>=3.2,<4.0
deps =
django42: Django>=4.2,<5.0
-r{toxinidir}/requirements/js_test.txt
commands =
commands =
jasmine

[testenv:pii-annotations]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = enterprise.settings.test
deps =
django32: Django>=3.2,<4.0
deps =
django42: Django>=4.2,<5.0
-r{toxinidir}/requirements/test.txt
commands =
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage

0 comments on commit ddbd37d

Please sign in to comment.