From a8510c5b9602cf6ee412309f59afbab7db65bf84 Mon Sep 17 00:00:00 2001 From: Simon Chen Date: Thu, 28 Oct 2021 10:38:16 -0400 Subject: [PATCH] build: upgrade Django from 2.2 to 3.2 (#986) Since edx-platform is already upgraded to django 3.2, this is a change that should minimum effect in production Co-authored-by: Simon Chen --- .github/workflows/ci.yml | 4 +-- CHANGELOG.rst | 4 +++ edx_proctoring/__init__.py | 2 +- package.json | 2 +- requirements/base.txt | 31 ++++++++++++----------- requirements/celery50.txt | 2 +- requirements/ci.txt | 12 ++++----- requirements/common_constraints.txt | 9 +++++-- requirements/dev.txt | 30 +++++++++++----------- requirements/quality.txt | 18 +++++++------ requirements/test.txt | 39 ++++++++++++++++------------- tox.ini | 7 ++---- 12 files changed, 88 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee5213bfb73..caba1459509 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,6 @@ jobs: node-version: - 10 toxenv: - - django22-drf310 - - django22-drflatest - django30-drflatest - django31-drflatest - django32-drflatest @@ -60,7 +58,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.toxenv == 'django22-drf310' || matrix.toxenv == 'django22-drflatest' + if: matrix.toxenv == 'django32-drflatest' uses: codecov/codecov-action@v1 with: flags: unittests diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 91d640f6b21..b66392b6bb3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,10 @@ Change Log Unreleased ~~~~~~~~~~ +[4.3.0] - 2021-10-28 +~~~~~~~~~~~~~~~~~~~~ +* Upgrade the requirements and move edx-proctoring to be on Django 3.2 instead of Django 2.2 + [4.2.0] - 2021-10-20 ~~~~~~~~~~~~~~~~~~~~ * Timed exams should remain visible after the course end date has passed diff --git a/edx_proctoring/__init__.py b/edx_proctoring/__init__.py index d073c2fb631..1c1ca31b2f1 100644 --- a/edx_proctoring/__init__.py +++ b/edx_proctoring/__init__.py @@ -3,6 +3,6 @@ """ # Be sure to update the version number in edx_proctoring/package.json -__version__ = '4.2.0' +__version__ = '4.3.0' default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name diff --git a/package.json b/package.json index 1ba4012f72c..cfaff6b8541 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@edx/edx-proctoring", "//": "Note that the version format is slightly different than that of the Python version when using prereleases.", - "version": "4.2.0", + "version": "4.3.0", "main": "edx_proctoring/static/index.js", "scripts": { "test": "gulp test" diff --git a/requirements/base.txt b/requirements/base.txt index a15972b24ed..5cae491c605 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,6 +8,8 @@ amqp==5.0.6 # via kombu appdirs==1.4.4 # via fs +asgiref==3.4.1 + # via django billiard==3.6.4.0 # via celery celery==5.0.4 @@ -16,9 +18,9 @@ celery==5.0.4 # event-tracking certifi==2021.10.8 # via requests -cffi==1.14.6 +cffi==1.15.0 # via cryptography -charset-normalizer==2.0.6 +charset-normalizer==2.0.7 # via requests click==7.1.2 # via @@ -35,7 +37,7 @@ click-repl==0.2.0 # via celery cryptography==35.0.0 # via pyjwt -django==2.2.24 +django==3.2.8 # via # -c requirements/common_constraints.txt # -r requirements/base.in @@ -54,7 +56,7 @@ django-crum==0.7.9 # edx-django-utils django-ipware==4.0.0 # via -r requirements/base.in -django-model-utils==4.1.1 +django-model-utils==4.2.0 # via # -r requirements/base.in # edx-when @@ -74,7 +76,7 @@ djangorestframework==3.12.4 # -r requirements/base.in # drf-jwt # edx-drf-extensions -drf-jwt==1.19.0 +drf-jwt==1.19.1 # via # -c requirements/common_constraints.txt # edx-drf-extensions @@ -83,6 +85,7 @@ edx-django-utils==4.4.0 # edx-drf-extensions # edx-rest-api-client # edx-when + # event-tracking edx-drf-extensions==8.0.0 # via # -r requirements/base.in @@ -94,15 +97,15 @@ edx-opaque-keys==2.2.2 # edx-when edx-rest-api-client==5.4.0 # via -r requirements/base.in -edx-when==2.2.1 +edx-when==2.2.2 # via -r requirements/base.in -event-tracking==1.1.1 +event-tracking==1.1.3 # via -r requirements/base.in fs==2.4.13 # via xblock future==0.18.2 # via pyjwkest -idna==3.2 +idna==3.3 # via requests jsonfield==3.1.0 # via -r requirements/base.in @@ -112,11 +115,11 @@ lxml==4.6.3 # via xblock markupsafe==2.0.1 # via xblock -newrelic==7.0.0.166 +newrelic==7.2.2.169 # via edx-django-utils pbr==5.6.0 # via stevedore -prompt-toolkit==3.0.20 +prompt-toolkit==3.0.21 # via click-repl psutil==5.8.0 # via edx-django-utils @@ -128,13 +131,13 @@ pycryptodomex==3.11.0 # pyjwkest pyjwkest==1.4.2 # via edx-drf-extensions -pyjwt[crypto]==2.2.0 +pyjwt[crypto]==2.3.0 # via # -r requirements/base.in # drf-jwt # edx-drf-extensions # edx-rest-api-client -pymongo==3.12.0 +pymongo==3.12.1 # via # edx-opaque-keys # event-tracking @@ -151,7 +154,7 @@ pytz==2021.3 # event-tracking # fs # xblock -pyyaml==5.4.1 +pyyaml==6.0 # via xblock requests==2.26.0 # via @@ -175,7 +178,7 @@ slumber==0.7.1 # via edx-rest-api-client sqlparse==0.4.2 # via django -stevedore==3.4.0 +stevedore==3.5.0 # via # edx-django-utils # edx-opaque-keys diff --git a/requirements/celery50.txt b/requirements/celery50.txt index ec6e2241396..c6796fd872d 100644 --- a/requirements/celery50.txt +++ b/requirements/celery50.txt @@ -5,5 +5,5 @@ click==7.1.2 click-didyoumean==0.3.0 click-repl==0.2.0 kombu==5.1.0 -prompt-toolkit==3.0.20 +prompt-toolkit==3.0.21 vine==5.0.0 diff --git a/requirements/ci.txt b/requirements/ci.txt index f5b77c9a597..ba506577d79 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -8,19 +8,19 @@ backports.entry-points-selectable==1.1.0 # via virtualenv certifi==2021.10.8 # via requests -charset-normalizer==2.0.6 +charset-normalizer==2.0.7 # via requests codecov==2.1.12 # via -r requirements/ci.in -coverage==6.0.1 +coverage==6.0.2 # via codecov distlib==0.3.3 # via virtualenv -filelock==3.3.0 +filelock==3.3.1 # via # tox # virtualenv -idna==3.2 +idna==3.3 # via requests packaging==21.0 # via tox @@ -30,7 +30,7 @@ pluggy==1.0.0 # via tox py==1.10.0 # via tox -pyparsing==2.4.7 +pyparsing==3.0.2 # via packaging requests==2.26.0 # via codecov @@ -48,5 +48,5 @@ tox-battery==0.6.1 # via -r requirements/ci.in urllib3==1.26.7 # via requests -virtualenv==20.8.1 +virtualenv==20.9.0 # via tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index db041ec460e..7556cd2d475 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -3,6 +3,11 @@ # See BOM-2721 for more details. # Below is the copied and edited version of common_constraints +# 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-2721 for more details. +# Below is the copied and edited version of common_constraints + # A central location for most common version constraints # (across edx repos) for pip-installation. # @@ -18,11 +23,11 @@ # using LTS django version -Django<2.3 +Django<3.3 # latest version is causing e2e failures in edx-platform. # See comment. -drf-jwt<1.19.1 +drf-jwt<1.19.2 # 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 diff --git a/requirements/dev.txt b/requirements/dev.txt index daf2430eac9..d50c0552a86 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,7 +4,9 @@ # # make upgrade # -astroid==2.8.2 +asgiref==3.4.1 + # via django +astroid==2.8.4 # via # pylint # pylint-celery @@ -27,21 +29,21 @@ diff-cover==6.4.2 # via -r requirements/dev.in distlib==0.3.3 # via virtualenv -django==2.2.24 +django==3.2.8 # via # -c requirements/common_constraints.txt # -r requirements/dev.in # -r requirements/quality.in # edx-i18n-tools -docutils==0.17.1 +docutils==0.18 # via rstcheck edx-i18n-tools==0.8.1 # via -r requirements/dev.in -edx-lint==5.2.0 +edx-lint==5.2.1 # via # -r requirements/dev.in # -r requirements/quality.in -filelock==3.3.0 +filelock==3.3.1 # via # tox # virtualenv @@ -74,9 +76,9 @@ path.py==12.5.0 # via -r requirements/dev.in pbr==5.6.0 # via stevedore -pep517==0.11.0 +pep517==0.12.0 # via pip-tools -pip-tools==6.3.1 +pip-tools==6.4.0 # via -r requirements/dev.in platformdirs==2.4.0 # via @@ -90,7 +92,7 @@ polib==1.1.1 # via edx-i18n-tools py==1.10.0 # via tox -pycodestyle==2.7.0 +pycodestyle==2.8.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in @@ -110,13 +112,13 @@ pylint-plugin-utils==0.6 # via # pylint-celery # pylint-django -pyparsing==2.4.7 +pyparsing==3.0.2 # via packaging python-slugify==5.0.2 # via code-annotations pytz==2021.3 # via django -pyyaml==5.4.1 +pyyaml==6.0 # via # code-annotations # edx-i18n-tools @@ -131,7 +133,7 @@ snowballstemmer==2.1.0 # via pydocstyle sqlparse==0.4.2 # via django -stevedore==3.4.0 +stevedore==3.5.0 # via code-annotations text-unidecode==1.3 # via python-slugify @@ -139,7 +141,7 @@ toml==0.10.2 # via # pylint # tox -tomli==1.2.1 +tomli==1.2.2 # via pep517 tox==3.24.4 # via @@ -151,13 +153,13 @@ typing-extensions==3.10.0.2 # via # astroid # pylint -virtualenv==20.8.1 +virtualenv==20.9.0 # via tox wheel==0.37.0 # via # -r requirements/dev.in # pip-tools -wrapt==1.12.1 +wrapt==1.13.2 # via astroid # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/quality.txt b/requirements/quality.txt index d1ac3e6792c..afa674c17c6 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -4,7 +4,9 @@ # # make upgrade # -astroid==2.8.2 +asgiref==3.4.1 + # via django +astroid==2.8.4 # via # pylint # pylint-celery @@ -18,13 +20,13 @@ click-log==0.3.2 # via edx-lint code-annotations==1.2.0 # via edx-lint -django==2.2.24 +django==3.2.8 # via # -c requirements/common_constraints.txt # -r requirements/quality.in -docutils==0.17.1 +docutils==0.18 # via rstcheck -edx-lint==5.2.0 +edx-lint==5.2.1 # via -r requirements/quality.in isort==5.9.3 # via @@ -42,7 +44,7 @@ pbr==5.6.0 # via stevedore platformdirs==2.4.0 # via pylint -pycodestyle==2.7.0 +pycodestyle==2.8.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in @@ -64,7 +66,7 @@ python-slugify==5.0.2 # via code-annotations pytz==2021.3 # via django -pyyaml==5.4.1 +pyyaml==6.0 # via code-annotations rstcheck==3.3.1 # via -r requirements/quality.in @@ -74,7 +76,7 @@ snowballstemmer==2.1.0 # via pydocstyle sqlparse==0.4.2 # via django -stevedore==3.4.0 +stevedore==3.5.0 # via code-annotations text-unidecode==1.3 # via python-slugify @@ -84,7 +86,7 @@ typing-extensions==3.10.0.2 # via # astroid # pylint -wrapt==1.12.1 +wrapt==1.13.2 # via astroid # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.txt b/requirements/test.txt index 1f374301d65..bddaed90212 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -7,8 +7,12 @@ # via kombu appdirs==1.4.4 # via fs +asgiref==3.4.1 + # via django attrs==21.2.0 - # via pytest + # via + # outcome + # pytest # via celery bok-choy==1.1.1 # via -r requirements/test.in @@ -17,9 +21,9 @@ bok-choy==1.1.1 # event-tracking certifi==2021.10.8 # via requests -cffi==1.14.6 +cffi==1.15.0 # via cryptography -charset-normalizer==2.0.6 +charset-normalizer==2.0.7 # via requests # via # -c requirements/constraints.txt @@ -34,7 +38,7 @@ click-plugins==1.1.1 # via celery code-annotations==1.2.0 # via -r requirements/test.in -coverage[toml]==6.0.1 +coverage[toml]==6.0.2 # via pytest-cov cryptography==35.0.0 # via pyjwt @@ -59,7 +63,7 @@ django-crum==0.7.9 # edx-django-utils django-ipware==4.0.0 # via -r requirements/base.in -django-model-utils==4.1.1 +django-model-utils==4.2.0 # via # -r requirements/base.in # edx-when @@ -78,7 +82,7 @@ django-webpack-loader==0.7.0 # -r requirements/base.in # drf-jwt # edx-drf-extensions -drf-jwt==1.19.0 +drf-jwt==1.19.1 # via # -c requirements/common_constraints.txt # edx-drf-extensions @@ -87,6 +91,7 @@ edx-django-utils==4.4.0 # edx-drf-extensions # edx-rest-api-client # edx-when + # event-tracking edx-drf-extensions==8.0.0 # via # -r requirements/base.in @@ -100,9 +105,9 @@ edx-opaque-keys==2.2.2 # edx-when edx-rest-api-client==5.4.0 # via -r requirements/base.in -edx-when==2.2.1 +edx-when==2.2.2 # via -r requirements/base.in -event-tracking==1.1.1 +event-tracking==1.1.3 # via -r requirements/base.in execnet==1.9.0 # via pytest-xdist @@ -116,7 +121,7 @@ httmock==1.4.0 # via -r requirements/test.in httpretty==1.1.4 # via -r requirements/test.in -idna==3.2 +idna==3.3 # via requests iniconfig==1.1.1 # via pytest @@ -139,7 +144,7 @@ mock==4.0.3 # via -r requirements/test.in mypy-extensions==0.4.3 # via logilab-common -newrelic==7.0.0.166 +newrelic==7.2.2.169 # via edx-django-utils packaging==21.0 # via pytest @@ -166,17 +171,17 @@ pycryptodomex==3.11.0 # pyjwkest pyjwkest==1.4.2 # via edx-drf-extensions -pyjwt[crypto]==2.2.0 +pyjwt[crypto]==2.3.0 # via # -r requirements/base.in # drf-jwt # edx-drf-extensions # edx-rest-api-client -pymongo==3.12.0 +pymongo==3.12.1 # via # edx-opaque-keys # event-tracking -pyparsing==2.4.7 +pyparsing==3.0.2 # via packaging pytest==6.2.5 # via @@ -208,7 +213,7 @@ pytz==2021.3 # event-tracking # fs # xblock -pyyaml==5.4.1 +pyyaml==6.0 # via # code-annotations # edx-i18n-tools @@ -221,7 +226,7 @@ requests==2.26.0 # pyjwkest # responses # slumber -responses==0.14.0 +responses==0.15.0 # via -r requirements/test.in rules==3.0 # via -r requirements/base.in @@ -245,7 +250,7 @@ slumber==0.7.1 # via edx-rest-api-client sqlparse==0.4.2 # via django -stevedore==3.4.0 +stevedore==3.5.0 # via # code-annotations # edx-django-utils @@ -258,7 +263,7 @@ text-unidecode==1.3 # via python-slugify toml==0.10.2 # via pytest -tomli==1.2.1 +tomli==1.2.2 # via coverage typing-extensions==3.10.0.2 # via logilab-common diff --git a/tox.ini b/tox.ini index 0b8ed2bdde9..6d4de7e7875 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py38-celery{50}-django{22,30,31,32}-drf{310,latest} + py38-celery{50}-django{30,31,32}-drflatest quality, version_check, pii_check, @@ -8,9 +8,8 @@ envlist = [testenv] deps = - django22: Django>=2.2,<2.3 django30: Django>=3.0,<3.1 - drf310: djangorestframework<3.11.0 + django31: Django>=3.1,<3.2 drflatest: djangorestframework celery50: -r{toxinidir}/requirements/celery50.txt -rrequirements/test.txt @@ -69,8 +68,6 @@ commands = whitelist_externals = make deps = - Django>=2.2,<2.3 - djangorestframework<3.10.0 -r{toxinidir}/requirements/test.txt commands = make pii_check