Skip to content

Commit 7bfa4bf

Browse files
hunzlahmalikfeanil
authored andcommitted
feat: remove django42, upgrade to django52
1 parent f2097e6 commit 7bfa4bf

File tree

9 files changed

+40
-14
lines changed

9 files changed

+40
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
python-version: ["3.11", "3.12"]
17-
toxenv: ["django42", "django52", "quality", "pii_check", "check_keywords"]
17+
toxenv: ["django52", "quality", "pii_check", "check_keywords"]
1818

1919
services:
2020
mysql:

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ develop: requirements test.requirements
7171
piptools: ## install pinned version of pip-compile and pip-sync
7272
pip install -r requirements/pip-tools.txt
7373

74+
prepare-common-constraints:
75+
curl -s https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt \
76+
| grep -iv '^[dD]jango' > requirements/common_constraints.txt
77+
7478
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
79+
compile-requirements: prepare-common-constraints
7580
compile-requirements: piptools ## Re-compile *.in requirements to *.txt (without upgrading)
7681
# Make sure to compile files after any other files they include!
7782
pip-compile ${COMPILE_OPTS} --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in

requirements/base.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ click==8.3.0
3030
# via edx-django-utils
3131
cryptography==46.0.3
3232
# via pyjwt
33-
django==4.2.25
33+
django==5.2.7
3434
# via
35-
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
35+
# -c requirements/constraints.txt
3636
# -r requirements/base.in
3737
# django-cors-headers
3838
# django-crum
@@ -85,7 +85,7 @@ edx-opaque-keys==3.0.0
8585
# via edx-drf-extensions
8686
elasticsearch==7.13.4
8787
# via
88-
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
88+
# -c requirements/common_constraints.txt
8989
# -r requirements/base.in
9090
# django-elasticsearch-dsl-drf
9191
# elasticsearch-dsl
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# A central location for most common version constraints
2+
# (across edx repos) for pip-installation.
3+
#
4+
# Similar to other constraint files this file doesn't install any packages.
5+
# It specifies version constraints that will be applied if a package is needed.
6+
# When pinning something here, please provide an explanation of why it is a good
7+
# idea to pin this package across all edx repos, Ideally, link to other information
8+
# that will help people in the future to remove the pin when possible.
9+
# Writing an issue against the offending project and linking to it here is good.
10+
#
11+
# Note: Changes to this file will automatically be used by other repos, referencing
12+
# this file from Github directly. It does not require packaging in edx-lint.
13+
14+
# using LTS django version
15+
16+
# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
17+
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
18+
# See https://github.com/openedx/edx-platform/issues/35126 for more info
19+
elasticsearch<7.14.0

requirements/constraints.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@
99
# linking to it here is good.
1010

1111
# Common constraints for edx repos
12-
-c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
12+
-c common_constraints.txt
13+
14+
# Repo-specific override for Django
15+
Django<5.3

requirements/django.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
django==4.2.25
1+
django==5.2.7

requirements/quality.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ distlib==0.4.0
9797
# via
9898
# -r requirements/test.txt
9999
# virtualenv
100-
django==4.2.25
100+
django==5.2.7
101101
# via
102-
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
102+
# -c requirements/constraints.txt
103103
# -r requirements/base.txt
104104
# -r requirements/test.txt
105105
# django-cors-headers
@@ -185,7 +185,7 @@ edx-opaque-keys==3.0.0
185185
# edx-drf-extensions
186186
elasticsearch==7.13.4
187187
# via
188-
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
188+
# -c requirements/common_constraints.txt
189189
# -r requirements/base.txt
190190
# -r requirements/test.txt
191191
# django-elasticsearch-dsl-drf

requirements/test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ dill==0.4.0
7272
distlib==0.4.0
7373
# via virtualenv
7474
# via
75-
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
75+
# -c requirements/constraints.txt
7676
# -r requirements/base.txt
7777
# django-cors-headers
7878
# django-crum
@@ -136,7 +136,7 @@ edx-opaque-keys==3.0.0
136136
# edx-drf-extensions
137137
elasticsearch==7.13.4
138138
# via
139-
# -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt
139+
# -c requirements/common_constraints.txt
140140
# -r requirements/base.txt
141141
# django-elasticsearch-dsl-drf
142142
# elasticsearch-dsl

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
[tox]
2-
envlist = py{311,312}-django{42,52}, quality, pii_check, check_keywords
2+
envlist = py{311,312}-django{52}, quality, pii_check, check_keywords
33
skipsdist = true
44
isolated_build = true # Enable isolated build environments
55

66
[testenv]
77
envdir = {toxworkdir}/{envname}
88
deps =
9-
django42: Django>=4.2,<5.0
109
django52: Django>=5.2,<6.0
1110
passenv =
1211
CONN_MAX_AGE
@@ -37,7 +36,7 @@ envdir = {toxworkdir}/{envname}
3736
allowlist_externals =
3837
make
3938
deps =
40-
Django>=4.2,<5.0
39+
Django>=5.2,<6.0
4140
commands =
4241
make pii_check
4342

0 commit comments

Comments
 (0)