Skip to content

Commit fe34bbe

Browse files
authored
Merge pull request #93 from openedx/jenkins/cleanup-python-code-f3819d7
chore: Post Django 3.2 cleanup
2 parents f3819d7 + bf196a9 commit fe34bbe

File tree

18 files changed

+193
-144
lines changed

18 files changed

+193
-144
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [master]
66
pull_request:
77
branches:
8-
- '**'
8+
- "**"
99

1010
jobs:
1111
run_tests:
@@ -14,32 +14,39 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-20.04]
17-
python-version: ['3.8']
18-
toxenv: [django22-celery44-drflatest, django22-celery50-drflatest, django30-celery44-drflatest,
19-
django30-celery50-drflatest, django31-celery44-drflatest, django31-celery50-drflatest,
20-
django32-celery44-drflatest, django32-celery50-drflatest, quality, docs, pii_check]
17+
python-version: ["3.8"]
18+
toxenv:
19+
[
20+
django32-celery44-drflatest,
21+
django32-celery50-drflatest,
22+
django40-celery44-drflatest,
23+
django40-celery50-drflatest,
24+
quality,
25+
docs,
26+
pii_check,
27+
]
2128

2229
steps:
23-
- uses: actions/checkout@v2
24-
- name: setup python
25-
uses: actions/setup-python@v2
26-
with:
27-
python-version: ${{ matrix.python-version }}
30+
- uses: actions/checkout@v2
31+
- name: setup python
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.python-version }}
2835

29-
- name: Install pip
30-
run: pip install -r requirements/pip.txt
36+
- name: Install pip
37+
run: pip install -r requirements/pip.txt
3138

32-
- name: Install Dependencies
33-
run: pip install -r requirements/ci.txt
39+
- name: Install Dependencies
40+
run: pip install -r requirements/ci.txt
3441

35-
- name: Run Tests
36-
env:
37-
TOXENV: ${{ matrix.toxenv }}
38-
run: tox
42+
- name: Run Tests
43+
env:
44+
TOXENV: ${{ matrix.toxenv }}
45+
run: tox
3946

40-
- name: Run Coverage
41-
if: matrix.python-version == '3.8' && matrix.toxenv=='django22-celery44-drflatest'
42-
uses: codecov/codecov-action@v1
43-
with:
44-
flags: unittests
45-
fail_ci_if_error: true
47+
- name: Run Coverage
48+
if: matrix.python-version == '3.8' && matrix.toxenv=='django32-celery44-drflatest'
49+
uses: codecov/codecov-action@v2
50+
with:
51+
flags: unittests
52+
fail_ci_if_error: true

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ Change Log
1414
Unreleased
1515
----------
1616

17+
[3.0.0] - 2022-02-17
18+
1719
* Fix `dev.in` to pull from `ci.txt` rather than `travis.txt`.
20+
* Dropped Django22, 30 and 31 support.
21+
* Added Django40 support.
1822

1923
[2.1.1] - 2021-09-01
2024
~~~~~~~~~~~~~~~~~~~~

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ docs: ## generate Sphinx HTML documentation, including API docs
2929
tox -e docs
3030
$(BROWSER)docs/_build/html/index.html
3131

32+
COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
33+
.PHONY: $(COMMON_CONSTRAINTS_TXT)
34+
$(COMMON_CONSTRAINTS_TXT):
35+
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
36+
3237
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
33-
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
38+
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
3439
pip install -qr requirements/pip-tools.txt
3540
# Make sure to compile files after any other files they include!
3641
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in

requirements/base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Core requirements for using this application
22
-c constraints.txt
33

4-
Django>=1.11 # Web application framework
4+
Django # Web application framework
55
django-model-utils # Provides TimeStampedModel abstract base class
66
django-crum
77
djangorestframework

requirements/base.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
#
77
amqp==2.6.1
88
# via kombu
9+
asgiref==3.5.0
10+
# via django
911
billiard==3.6.4.0
1012
# via celery
1113
celery==4.4.7
1214
# via
1315
# -c requirements/constraints.txt
1416
# edx-celeryutils
15-
django==2.2.26
17+
django==3.2.12
1618
# via
17-
# -c requirements/constraints.txt
19+
# -c requirements/common_constraints.txt
1820
# -r requirements/base.in
1921
# django-crum
2022
# django-model-utils
@@ -34,19 +36,19 @@ django-waffle==2.3.0
3436
# via edx-django-utils
3537
djangorestframework==3.13.1
3638
# via -r requirements/base.in
37-
edx-celeryutils==1.1.1
39+
edx-celeryutils==1.2.1
3840
# via -r requirements/base.in
39-
edx-django-utils==4.4.1
41+
edx-django-utils==4.5.0
4042
# via -r requirements/base.in
4143
future==0.18.2
4244
# via edx-celeryutils
4345
jsonfield==3.1.0
4446
# via edx-celeryutils
4547
kombu==4.6.11
4648
# via celery
47-
newrelic==7.2.4.171
49+
newrelic==7.4.0.172
4850
# via edx-django-utils
49-
pbr==5.8.0
51+
pbr==5.8.1
5052
# via stevedore
5153
psutil==5.9.0
5254
# via edx-django-utils

requirements/ci.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@
66
#
77
certifi==2021.10.8
88
# via requests
9-
charset-normalizer==2.0.10
9+
charset-normalizer==2.0.12
1010
# via requests
1111
codecov==2.1.12
1212
# via -r requirements/ci.in
13-
coverage==6.2
13+
coverage==6.3.1
1414
# via codecov
1515
distlib==0.3.4
1616
# via virtualenv
17-
filelock==3.4.2
17+
filelock==3.5.0
1818
# via
1919
# tox
2020
# virtualenv
2121
idna==3.3
2222
# via requests
2323
packaging==21.3
2424
# via tox
25-
platformdirs==2.4.1
25+
platformdirs==2.5.0
2626
# via virtualenv
2727
pluggy==1.0.0
2828
# via tox
2929
py==1.11.0
3030
# via tox
31-
pyparsing==3.0.6
31+
pyparsing==3.0.7
3232
# via packaging
3333
requests==2.27.1
3434
# via codecov
@@ -46,5 +46,5 @@ tox-battery==0.6.1
4646
# via -r requirements/ci.in
4747
urllib3==1.26.8
4848
# via requests
49-
virtualenv==20.13.0
49+
virtualenv==20.13.1
5050
# via tox
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
15+
# using LTS django version
16+
Django<4.0
17+
18+
# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
19+
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
20+
elasticsearch<7.14.0
21+
22+
setuptools<60

requirements/constraints.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Version constraints for pip installation.
1+
# Version constraints for pip-installation.
22
#
33
# This file doesn't install any packages. It specifies version constraints
44
# that will be applied if a package is needed.
55
#
6-
# When pinning something here, please provide an explanation of why. Ideally,
6+
# When pinning something here, please provide an explanation of why. Ideally,
77
# link to other information that will help people in the future to remove the
8-
# pin when possible. Writing an issue against the offending project and
8+
# pin when possible. Writing an issue against the offending project and
99
# linking to it here is good.
1010

11-
# stay on LTS version
12-
django< 2.3
11+
# Common constraints for edx repos
12+
-c common_constraints.txt
1313

14-
celery<5.0 # we still want to support celery 4
14+
celery<5.0 # we still want to support celery 4

0 commit comments

Comments
 (0)