diff --git a/edx_proctoring/admin.py b/edx_proctoring/admin.py index 0c7c693ff6b..ddf9d8405f7 100644 --- a/edx_proctoring/admin.py +++ b/edx_proctoring/admin.py @@ -308,12 +308,12 @@ def has_delete_permission(self, request, obj=None): """ Allow deletes """ return True - def save_model(self, request, review, form, change): # pylint: disable=arguments-differ + def save_model(self, request, obj, form, change): """ Override callback so that we can inject the user_id that made the change """ - review.reviewed_by = request.user - review.save() + obj.reviewed_by = request.user + obj.save() def get_form(self, request, obj=None, change=False, **kwargs): """ Returns software secure review form """ @@ -322,11 +322,11 @@ def get_form(self, request, obj=None, change=False, **kwargs): del form.base_fields['video_url'] return form - def lookup_allowed(self, key, value): # pylint: disable=arguments-differ + def lookup_allowed(self, lookup, value): """ Checks if lookup allowed or not """ - if key == 'exam__course_id': + if lookup == 'exam__course_id': return True - return super().lookup_allowed(key, value) + return super().lookup_allowed(lookup, value) class ProctoredExamSoftwareSecureReviewHistoryAdmin(ProctoredExamSoftwareSecureReviewAdmin): @@ -344,7 +344,7 @@ class ProctoredExamSoftwareSecureReviewHistoryAdmin(ProctoredExamSoftwareSecureR 'modified', ] - def save_model(self, request, review, form, change): + def save_model(self, request, obj, form, change): # pylint: disable=unused-argument """ History can't be updated """ diff --git a/edx_proctoring/backends/rest.py b/edx_proctoring/backends/rest.py index ecafd28c00b..3de639cd625 100644 --- a/edx_proctoring/backends/rest.py +++ b/edx_proctoring/backends/rest.py @@ -104,7 +104,7 @@ def get_javascript(self): Returns the url of the javascript bundle into which the provider's JS will be loaded """ # use the defined npm_module name, or else the python package name - package = getattr(self, 'npm_module', self.__class__.__module__.split('.')[0]) + package = getattr(self, 'npm_module', self.__class__.__module__.split('.', maxsplit=1)[0]) js_url = '' try: bundle_chunks = get_files(package, config="WORKERS") diff --git a/requirements/base.txt b/requirements/base.txt index d142afd15f4..263ea8ca280 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade @@ -20,12 +20,6 @@ cffi==1.14.5 # via cryptography chardet==4.0.0 # via requests -click-didyoumean==0.0.3 - # via celery -click-plugins==1.1.1 - # via celery -click-repl==0.2.0 - # via celery click==7.1.2 # via # -c requirements/constraints.txt @@ -33,8 +27,28 @@ click==7.1.2 # click-didyoumean # click-plugins # click-repl +click-didyoumean==0.0.3 + # via celery +click-plugins==1.1.1 + # via celery +click-repl==0.2.0 + # via celery cryptography==3.4.7 # via pyjwt +django==2.2.24 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/base.in + # django-crum + # django-model-utils + # djangorestframework + # drf-jwt + # edx-django-utils + # edx-drf-extensions + # edx-when + # event-tracking + # jsonfield2 + # rest-condition django-crum==0.7.9 # via # -r requirements/base.in @@ -50,22 +64,10 @@ django-waffle==2.2.0 # -r requirements/base.in # edx-django-utils # edx-drf-extensions -django-webpack-loader==1.0.0 - # via -r requirements/base.in -django==2.2.24 +django-webpack-loader==0.7.0 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.in - # django-crum - # django-model-utils - # djangorestframework - # drf-jwt - # edx-django-utils - # edx-drf-extensions - # edx-when - # event-tracking - # jsonfield2 - # rest-condition djangorestframework==3.12.4 # via # -r requirements/base.in @@ -85,7 +87,7 @@ edx-drf-extensions==6.5.0 # via # -r requirements/base.in # edx-when -edx-opaque-keys==2.2.1 +edx-opaque-keys==2.2.2 # via # -r requirements/base.in # edx-drf-extensions @@ -112,11 +114,11 @@ lxml==4.6.3 # via xblock markupsafe==2.0.1 # via xblock -newrelic==6.4.1.158 +newrelic==6.4.4.161 # via edx-django-utils pbr==5.6.0 # via stevedore -prompt-toolkit==3.0.18 +prompt-toolkit==3.0.19 # via click-repl psutil==5.8.0 # via edx-django-utils @@ -181,7 +183,7 @@ stevedore==3.3.0 # via # edx-django-utils # edx-opaque-keys -urllib3==1.26.5 +urllib3==1.26.6 # via requests vine==5.0.0 # via diff --git a/requirements/celery50.txt b/requirements/celery50.txt index 50985f8960c..4ba0a37dd3a 100644 --- a/requirements/celery50.txt +++ b/requirements/celery50.txt @@ -1,9 +1,9 @@ amqp==5.0.6 billiard==3.6.4.0 celery==5.0.4 +click==7.1.2 click-didyoumean==0.0.3 click-repl==0.2.0 -click==7.1.2 kombu==5.1.0 -prompt-toolkit==3.0.18 +prompt-toolkit==3.0.19 vine==5.0.0 diff --git a/requirements/ci.txt b/requirements/ci.txt index 5c413a5cc69..a19923ab517 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade @@ -22,7 +22,7 @@ filelock==3.0.12 # virtualenv idna==2.10 # via requests -packaging==20.9 +packaging==21.0 # via tox pluggy==0.13.1 # via tox @@ -38,13 +38,13 @@ six==1.16.0 # virtualenv toml==0.10.2 # via tox -tox-battery==0.6.1 - # via -r requirements/ci.in tox==3.23.1 # via # -r requirements/ci.in # tox-battery -urllib3==1.26.5 +tox-battery==0.6.1 + # via -r requirements/ci.in +urllib3==1.26.6 # via requests virtualenv==20.4.7 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 2c273a9b131..e06f065ba8a 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -18,3 +18,6 @@ jsonfield2==3.0.3 celery==5.0.4 # celery latest version requires click<8.0.0 click<8.0.0 + +# pinning because to match pin in edx-platform: https://github.com/edx/edx-platform/blob/e25f00f35cb2ed70502bb0b28909535d55e5525e/requirements/constraints.txt#L83 +django-webpack-loader<1.0.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 31542846361..c5bc75ca938 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade # appdirs==1.4.4 # via virtualenv -astroid==2.5.6 +astroid==2.6.2 # via # pylint # pylint-celery @@ -18,8 +18,6 @@ chardet==4.0.0 # via # diff-cover # requests -click-log==0.3.2 - # via edx-lint click==7.1.2 # via # -c requirements/constraints.txt @@ -27,11 +25,13 @@ click==7.1.2 # code-annotations # edx-lint # pip-tools +click-log==0.3.2 + # via edx-lint code-annotations==1.1.2 # via edx-lint colorama==0.4.4 # via twine -diff-cover==5.1.2 +diff-cover==6.0.0 # via -r requirements/dev.in distlib==0.3.2 # via virtualenv @@ -42,9 +42,8 @@ django==2.2.24 # -r requirements/quality.in # edx-i18n-tools # edx-lint -docutils==0.16 +docutils==0.17.1 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # readme-renderer # rstcheck edx-i18n-tools==0.5.3 @@ -59,23 +58,23 @@ filelock==3.0.12 # virtualenv idna==2.10 # via requests -importlib-metadata==4.5.0 +importlib-metadata==4.6.1 # via # keyring # twine inflect==5.3.0 # via jinja2-pluralize -isort==5.8.0 +isort==5.9.2 # via # -r requirements/quality.in # pylint -jinja2-pluralize==0.3.0 - # via diff-cover jinja2==3.0.1 # via # code-annotations # diff-cover # jinja2-pluralize +jinja2-pluralize==0.3.0 + # via diff-cover keyring==23.0.1 # via twine lazy-object-proxy==1.6.0 @@ -84,21 +83,21 @@ markupsafe==2.0.1 # via jinja2 mccabe==0.6.1 # via pylint -packaging==20.9 +packaging==21.0 # via # bleach # tox +path==16.0.0 + # via path.py path.py==12.5.0 # via # -r requirements/dev.in # edx-i18n-tools -path==15.1.2 - # via path.py pbr==5.6.0 # via stevedore pep517==0.10.0 # via pip-tools -pip-tools==6.1.0 +pip-tools==6.2.0 # via -r requirements/dev.in pkginfo==1.7.0 # via twine @@ -118,6 +117,12 @@ pygments==2.9.0 # via # diff-cover # readme-renderer +pylint==2.9.3 + # via + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils pylint-celery==0.3 # via edx-lint pylint-django==2.4.4 @@ -126,12 +131,6 @@ pylint-plugin-utils==0.6 # via # pylint-celery # pylint-django -pylint==2.8.3 - # via - # edx-lint - # pylint-celery - # pylint-django - # pylint-plugin-utils pyparsing==2.4.7 # via packaging python-slugify==5.0.2 @@ -144,12 +143,12 @@ pyyaml==5.4.1 # edx-i18n-tools readme-renderer==29.0 # via twine -requests-toolbelt==0.9.1 - # via twine requests==2.25.1 # via # requests-toolbelt # twine +requests-toolbelt==0.9.1 + # via twine rfc3986==1.5.0 # via twine rstcheck==3.3.1 @@ -175,30 +174,33 @@ toml==0.10.2 # pep517 # pylint # tox -tox-battery==0.6.1 - # via -r requirements/dev.in tox==3.23.1 # via # -r requirements/dev.in # tox-battery -tqdm==4.61.0 +tox-battery==0.6.1 + # via -r requirements/dev.in +tqdm==4.61.2 # via twine twine==3.4.1 # via # -r requirements/dev.in # -r requirements/quality.in -urllib3==1.26.5 +urllib3==1.26.6 # via requests virtualenv==20.4.7 # via tox webencodings==0.5.1 # via bleach wheel==0.36.2 - # via -r requirements/dev.in + # via + # -r requirements/dev.in + # pip-tools wrapt==1.12.1 # via astroid -zipp==3.4.1 +zipp==3.5.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip +# setuptools diff --git a/requirements/doc.txt b/requirements/doc.txt index cedabef1a19..e1c7ab92b3b 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade @@ -28,12 +28,6 @@ chardet==4.0.0 # via # doc8 # requests -click-didyoumean==0.0.3 - # via celery -click-plugins==1.1.1 - # via celery -click-repl==0.2.0 - # via celery click==7.1.2 # via # -c requirements/constraints.txt @@ -41,8 +35,28 @@ click==7.1.2 # click-didyoumean # click-plugins # click-repl +click-didyoumean==0.0.3 + # via celery +click-plugins==1.1.1 + # via celery +click-repl==0.2.0 + # via celery cryptography==3.4.7 # via pyjwt +django==2.2.24 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/base.in + # django-crum + # django-model-utils + # djangorestframework + # drf-jwt + # edx-django-utils + # edx-drf-extensions + # edx-when + # event-tracking + # jsonfield2 + # rest-condition django-crum==0.7.9 # via # -r requirements/base.in @@ -58,22 +72,10 @@ django-waffle==2.2.0 # -r requirements/base.in # edx-django-utils # edx-drf-extensions -django-webpack-loader==1.0.0 - # via -r requirements/base.in -django==2.2.24 +django-webpack-loader==0.7.0 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.in - # django-crum - # django-model-utils - # djangorestframework - # drf-jwt - # edx-django-utils - # edx-drf-extensions - # edx-when - # event-tracking - # jsonfield2 - # rest-condition djangorestframework==3.12.4 # via # -r requirements/base.in @@ -82,9 +84,8 @@ djangorestframework==3.12.4 # rest-condition doc8==0.8.1 # via -r requirements/doc.in -docutils==0.16 +docutils==0.17.1 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # doc8 # readme-renderer # restructuredtext-lint @@ -102,14 +103,14 @@ edx-drf-extensions==6.5.0 # via # -r requirements/base.in # edx-when -edx-opaque-keys==2.2.1 +edx-opaque-keys==2.2.2 # via # -r requirements/base.in # edx-drf-extensions # edx-when edx-rest-api-client==5.3.0 # via -r requirements/base.in -edx-sphinx-theme==2.1.0 +edx-sphinx-theme==3.0.0 # via -r requirements/doc.in edx-when==2.0.0 # via -r requirements/base.in @@ -137,9 +138,9 @@ markupsafe==2.0.1 # via # jinja2 # xblock -newrelic==6.4.1.158 +newrelic==6.4.4.161 # via edx-django-utils -packaging==20.9 +packaging==21.0 # via # bleach # sphinx @@ -147,7 +148,7 @@ pbr==5.6.0 # via stevedore pockets==0.9.1 # via sphinxcontrib-napoleon -prompt-toolkit==3.0.18 +prompt-toolkit==3.0.19 # via click-repl psutil==5.8.0 # via edx-django-utils @@ -227,7 +228,7 @@ slumber==0.7.1 # via edx-rest-api-client snowballstemmer==2.1.0 # via sphinx -sphinx==4.0.2 +sphinx==4.0.3 # via # -r requirements/doc.in # edx-sphinx-theme @@ -252,7 +253,7 @@ stevedore==3.3.0 # doc8 # edx-django-utils # edx-opaque-keys -urllib3==1.26.5 +urllib3==1.26.6 # via requests vine==5.0.0 # via diff --git a/requirements/pip.txt b/requirements/pip.txt index 2f010c11dd6..58aa05fbe27 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade diff --git a/requirements/quality.txt b/requirements/quality.txt index 71ba9ff6f8b..27e16bdd37b 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade # -astroid==2.5.6 +astroid==2.6.2 # via # pylint # pylint-celery @@ -14,14 +14,14 @@ certifi==2021.5.30 # via requests chardet==4.0.0 # via requests -click-log==0.3.2 - # via edx-lint click==7.1.2 # via # -c requirements/constraints.txt # click-log # code-annotations # edx-lint +click-log==0.3.2 + # via edx-lint code-annotations==1.1.2 # via edx-lint colorama==0.4.4 @@ -31,20 +31,19 @@ django==2.2.24 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.in # edx-lint -docutils==0.16 +docutils==0.17.1 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # readme-renderer # rstcheck edx-lint==5.0.0 # via -r requirements/quality.in idna==2.10 # via requests -importlib-metadata==4.5.0 +importlib-metadata==4.6.1 # via # keyring # twine -isort==5.8.0 +isort==5.9.2 # via # -r requirements/quality.in # pylint @@ -58,7 +57,7 @@ markupsafe==2.0.1 # via jinja2 mccabe==0.6.1 # via pylint -packaging==20.9 +packaging==21.0 # via bleach pbr==5.6.0 # via stevedore @@ -70,6 +69,12 @@ pydocstyle==6.1.1 # via -r requirements/quality.in pygments==2.9.0 # via readme-renderer +pylint==2.9.3 + # via + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils pylint-celery==0.3 # via edx-lint pylint-django==2.4.4 @@ -78,12 +83,6 @@ pylint-plugin-utils==0.6 # via # pylint-celery # pylint-django -pylint==2.8.3 - # via - # edx-lint - # pylint-celery - # pylint-django - # pylint-plugin-utils pyparsing==2.4.7 # via packaging python-slugify==5.0.2 @@ -94,12 +93,12 @@ pyyaml==5.4.1 # via code-annotations readme-renderer==29.0 # via twine -requests-toolbelt==0.9.1 - # via twine requests==2.25.1 # via # requests-toolbelt # twine +requests-toolbelt==0.9.1 + # via twine rfc3986==1.5.0 # via twine rstcheck==3.3.1 @@ -119,15 +118,15 @@ text-unidecode==1.3 # via python-slugify toml==0.10.2 # via pylint -tqdm==4.61.0 +tqdm==4.61.2 # via twine twine==3.4.1 # via -r requirements/quality.in -urllib3==1.26.5 +urllib3==1.26.6 # via requests webencodings==0.5.1 # via bleach wrapt==1.12.1 # via astroid -zipp==3.4.1 +zipp==3.5.0 # via importlib-metadata diff --git a/requirements/test.txt b/requirements/test.txt index d5dd5269325..51b69e2d500 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,12 +1,10 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade # # via kombu -apipkg==1.5 - # via execnet appdirs==1.4.4 # via fs attrs==21.2.0 @@ -23,10 +21,6 @@ cffi==1.14.5 # via cryptography chardet==4.0.0 # via requests - # via celery -click-plugins==1.1.1 - # via celery - # via celery # via # -c requirements/constraints.txt # celery @@ -34,6 +28,10 @@ click-plugins==1.1.1 # click-plugins # click-repl # code-annotations + # via celery +click-plugins==1.1.1 + # via celery + # via celery code-annotations==1.1.2 # via -r requirements/test.in coverage==5.5 @@ -42,6 +40,20 @@ cryptography==3.4.7 # via pyjwt ddt==1.4.2 # via -r requirements/test.in + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/base.in + # django-crum + # django-model-utils + # djangorestframework + # drf-jwt + # edx-django-utils + # edx-drf-extensions + # edx-i18n-tools + # edx-when + # event-tracking + # jsonfield2 + # rest-condition django-crum==0.7.9 # via # -r requirements/base.in @@ -57,22 +69,10 @@ django-waffle==2.2.0 # -r requirements/base.in # edx-django-utils # edx-drf-extensions -django-webpack-loader==1.0.0 - # via -r requirements/base.in +django-webpack-loader==0.7.0 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.in - # django-crum - # django-model-utils - # djangorestframework - # drf-jwt - # edx-django-utils - # edx-drf-extensions - # edx-i18n-tools - # edx-when - # event-tracking - # jsonfield2 - # rest-condition # via # -r requirements/base.in # drf-jwt @@ -93,7 +93,7 @@ edx-drf-extensions==6.5.0 # edx-when edx-i18n-tools==0.5.3 # via -r requirements/test.in -edx-opaque-keys==2.2.1 +edx-opaque-keys==2.2.2 # via # -r requirements/base.in # edx-drf-extensions @@ -104,7 +104,7 @@ edx-when==2.0.0 # via -r requirements/base.in event-tracking==1.0.4 # via -r requirements/base.in -execnet==1.8.1 +execnet==1.9.0 # via pytest-xdist freezegun==1.1.0 # via -r requirements/test.in @@ -141,14 +141,14 @@ mock==4.0.3 # via -r requirements/test.in mypy-extensions==0.4.3 # via logilab-common -newrelic==6.4.1.158 +newrelic==6.4.4.161 # via edx-django-utils -packaging==20.9 +packaging==21.0 # via pytest +path==16.0.0 + # via path.py path.py==12.5.0 # via edx-i18n-tools -path==15.1.2 - # via path.py pbr==5.6.0 # via stevedore pluggy==0.13.1 @@ -182,20 +182,20 @@ pymongo==3.11.4 # event-tracking pyparsing==2.4.7 # via packaging +pytest==6.2.4 + # via + # pytest-cov + # pytest-django + # pytest-forked + # pytest-xdist pytest-cov==2.12.1 # via -r requirements/test.in pytest-django==4.4.0 # via -r requirements/test.in pytest-forked==1.3.0 # via pytest-xdist -pytest-xdist==2.2.1 +pytest-xdist==2.3.0 # via -r requirements/test.in -pytest==6.2.4 - # via - # pytest-cov - # pytest-django - # pytest-forked - # pytest-xdist python-dateutil==2.8.1 # via # -r requirements/base.in @@ -269,7 +269,7 @@ toml==0.10.2 # pytest-cov typing-extensions==3.10.0.0 # via logilab-common -urllib3==1.26.5 +urllib3==1.26.6 # via # requests # responses