From ce5680a17bf3c4da2efea1bca6d346c57acb926a Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Mon, 30 Sep 2024 11:51:17 +0500 Subject: [PATCH 1/9] chore: Replace pkg_resources lib with xblockutils --- openassessment/xblock/load_static.py | 9 +++++-- openassessment/xblock/openassessmentblock.py | 9 ++++--- .../xblock/test/test_load_static.py | 24 +++++++++---------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/openassessment/xblock/load_static.py b/openassessment/xblock/load_static.py index 766a75ce55..1bf39a26b6 100644 --- a/openassessment/xblock/load_static.py +++ b/openassessment/xblock/load_static.py @@ -5,8 +5,11 @@ import logging from urllib.parse import urlparse -from pkg_resources import resource_string from django.conf import settings +try: + from xblock.utils.resources import ResourceLoader +except ModuleNotFoundError: + from xblockutils.resources import ResourceLoader logger = logging.getLogger(__name__) # pylint: disable=invalid-name @@ -31,6 +34,8 @@ class LoadStatic: _base_url = '' _is_loaded = False + resource_loader = ResourceLoader(__name__) + @staticmethod def reload_manifest(): """ @@ -45,7 +50,7 @@ def reload_manifest(): logger.error('LMS_ROOT_URL is undefined') try: - json_data = resource_string(__name__, 'static/dist/manifest.json').decode("utf8") + json_data = LoadStatic.resource_loader.load_unicode('static/dist/manifest.json') LoadStatic._manifest = json.loads(json_data) base_url_override = LoadStatic._manifest.get('base_url', None) LoadStatic._is_loaded = True diff --git a/openassessment/xblock/openassessmentblock.py b/openassessment/xblock/openassessmentblock.py index f950a7909d..18d23e2f05 100644 --- a/openassessment/xblock/openassessmentblock.py +++ b/openassessment/xblock/openassessmentblock.py @@ -7,8 +7,11 @@ import logging import re -import pkg_resources import pytz +try: + from xblock.utils.resources import ResourceLoader +except ModuleNotFoundError: + from xblockutils.resources import ResourceLoader from django.conf import settings from django.contrib.auth import get_user_model @@ -72,12 +75,12 @@ from openassessment.xblock.apis.ora_data_accessor import ORADataAccessor logger = logging.getLogger(__name__) # pylint: disable=invalid-name +resource_loader = ResourceLoader(__name__) def load(path): """Handy helper for getting resources from our kit.""" - data = pkg_resources.resource_string(__name__, path) - return data.decode("utf8") + return resource_loader.load_unicode(path) @XBlock.needs("i18n") diff --git a/openassessment/xblock/test/test_load_static.py b/openassessment/xblock/test/test_load_static.py index c722fc14e5..08a6f61b45 100644 --- a/openassessment/xblock/test/test_load_static.py +++ b/openassessment/xblock/test/test_load_static.py @@ -65,24 +65,24 @@ def test_get_url_absolute_base_url(self): self.assertEqual(LoadStatic.get_url(key_url), urljoin( absolute_base_url, loaded_key_url)) - @patch('pkg_resources.resource_string') - def test_get_url_file_not_found(self, resource_string): + @patch('xblock.utils.resources.ResourceLoader.load_unicode') + def test_get_url_file_not_found(self, load_unicode): key_url = 'some_url.js' - resource_string.side_effect = IOError() + load_unicode.side_effect = IOError() self.assertEqual(LoadStatic.get_url(key_url), urljoin( self.default_base_url, 'some_url.js')) @override_settings(LMS_ROOT_URL='localhost/') - @patch('pkg_resources.resource_string') - def test_get_url_file_not_found_with_root_url(self, resource_string): + @patch('xblock.utils.resources.ResourceLoader.load_unicode') + def test_get_url_file_not_found_with_root_url(self, load_unicode): key_url = 'some_url.js' - resource_string.side_effect = IOError() + load_unicode.side_effect = IOError() self.assertEqual(LoadStatic.get_url(key_url), urljoin( 'localhost/', self.default_base_url, 'some_url.js')) - @patch('pkg_resources.resource_string') - def test_get_url_with_manifest(self, resource_string): - resource_string.return_value = None + @patch('xblock.utils.resources.ResourceLoader.load_unicode') + def test_get_url_with_manifest(self, load_unicode): + load_unicode.return_value = None key_url = 'some_url.js' with patch('json.loads') as jsondata: jsondata.return_value = { @@ -92,9 +92,9 @@ def test_get_url_with_manifest(self, resource_string): self.default_base_url, 'some_url.hashchunk.js')) @override_settings(LMS_ROOT_URL='localhost/') - @patch('pkg_resources.resource_string') - def test_get_url_with_manifest_and_root_url(self, resource_string): - resource_string.return_value = None + @patch('xblock.utils.resources.ResourceLoader.load_unicode') + def test_get_url_with_manifest_and_root_url(self, load_unicode): + load_unicode.return_value = None key_url = 'some_url.js' with patch('json.loads') as jsondata: jsondata.return_value = { From 2a47b16c671dcc0df43e0be14c72febc65412e8d Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Mon, 30 Sep 2024 14:11:19 +0500 Subject: [PATCH 2/9] chore: Drop support for python 3.8 - Drop support for python 3.8 and add support for python 3.11 and 3.12 --- .github/workflows/ci.yml | 2 +- .github/workflows/pypi-publish.yml | 6 +- .readthedocs.yaml | 2 +- openassessment/__init__.py | 2 +- requirements/base.txt | 92 +++++++------- requirements/ci.txt | 31 ++--- requirements/common_constraints.txt | 4 + requirements/docs.txt | 74 ++++++----- requirements/pip-tools.txt | 19 +-- requirements/pip.txt | 6 +- requirements/quality.txt | 183 +++++++++++++--------------- requirements/test-acceptance.txt | 170 +++++++++++++------------- requirements/test.txt | 161 ++++++++++++------------ requirements/tox.txt | 20 ++- setup.py | 2 +- tox.ini | 2 +- 16 files changed, 383 insertions(+), 393 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6060a4fdff..7681e02d96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3.8', '3.11'] + python-version: ['3.11', '3.12'] node-version: [16] toxenv: [quality, js, django42] diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 46b87e3af4..f9e1cf0dcb 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -10,13 +10,17 @@ jobs: push: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.11, 3.12] + steps: - name: Checkout uses: actions/checkout@v2 - name: setup python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} - name: Install pip run: pip install -r requirements/pip.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4afd46ce44..ae70bc6d14 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,7 +14,7 @@ sphinx: build: os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.12" # Optionally install extra requirements required to build your docs python: diff --git a/openassessment/__init__.py b/openassessment/__init__.py index 8a95f62793..5fb23d0abe 100644 --- a/openassessment/__init__.py +++ b/openassessment/__init__.py @@ -2,4 +2,4 @@ Initialization Information for Open Assessment Module """ -__version__ = '6.12.0' +__version__ = '7.0.0' diff --git a/requirements/base.txt b/requirements/base.txt index 46a3edbaa3..c12bf435e7 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,24 +8,19 @@ appdirs==1.4.4 # via fs asgiref==3.8.1 # via django -attrs==23.2.0 +attrs==24.2.0 # via openedx-events -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # django - # djangorestframework bleach==6.1.0 # via -r requirements/base.in -boto3==1.34.91 +boto3==1.35.29 # via -r requirements/base.in -botocore==1.34.91 +botocore==1.35.29 # via # boto3 # s3transfer -certifi==2024.2.2 +certifi==2024.8.30 # via requests -cffi==1.16.0 +cffi==1.17.1 # via pynacl charset-normalizer==3.3.2 # via requests @@ -37,7 +32,7 @@ code-annotations==1.8.0 # via edx-toggles defusedxml==0.7.1 # via -r requirements/base.in -django==4.2.11 +django==4.2.16 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -45,6 +40,7 @@ django==4.2.11 # django-model-utils # django-waffle # djangorestframework + # edx-django-release-util # edx-django-utils # edx-i18n-tools # edx-submissions @@ -56,7 +52,7 @@ django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-model-utils==4.5.0 +django-model-utils==5.0.0 # via # -r requirements/base.in # edx-submissions @@ -68,26 +64,33 @@ django-waffle==4.1.0 # via # edx-django-utils # edx-toggles -djangorestframework==3.15.1 +djangorestframework==3.15.2 # via # -r requirements/base.in # edx-submissions -edx-django-utils==5.12.0 +dnspython==2.6.1 + # via pymongo +edx-ccx-keys==1.3.0 + # via openedx-events +edx-django-release-util==1.4.0 + # via edx-submissions +edx-django-utils==5.15.0 # via # -r requirements/base.in # edx-toggles # openedx-events -edx-i18n-tools==1.6.0 +edx-i18n-tools==1.6.3 # via -r requirements/base.in -edx-opaque-keys[django]==2.8.0 +edx-opaque-keys[django]==2.11.0 # via # -r requirements/base.in + # edx-ccx-keys # openedx-events -edx-submissions==3.7.0 +edx-submissions==3.8.0 # via -r requirements/base.in edx-toggles==5.2.0 # via -r requirements/base.in -fastavro==1.9.4 +fastavro==1.9.7 # via openedx-events fs==2.0.18 # via @@ -99,7 +102,7 @@ idna==2.8 # via # -c requirements/constraints.txt # requests -jinja2==3.1.3 +jinja2==3.1.4 # via code-annotations jmespath==1.0.1 # via @@ -115,26 +118,26 @@ loremipsum==1.0.5 # via # -c requirements/constraints.txt # -r requirements/base.in -lxml[html-clean]==5.2.1 +lxml[html-clean]==5.3.0 # via # -r requirements/base.in # edx-i18n-tools # lxml-html-clean # xblock -lxml-html-clean==0.1.1 +lxml-html-clean==0.2.2 # via lxml -mako==1.3.3 +mako==1.3.5 # via xblock markupsafe==2.1.5 # via # jinja2 # mako # xblock -newrelic==9.9.0 +newrelic==10.0.0 # via edx-django-utils -openedx-events==9.9.2 +openedx-events==9.14.1 # via -r requirements/base.in -openedx-filters==1.8.1 +openedx-filters==1.10.0 # via -r requirements/base.in path==13.1.0 # via @@ -143,15 +146,15 @@ path==13.1.0 # path-py path-py==12.5.0 # via -r requirements/base.in -pbr==6.0.0 +pbr==6.1.0 # via stevedore polib==1.2.0 # via edx-i18n-tools -psutil==5.9.8 +psutil==6.0.0 # via edx-django-utils pycparser==2.22 # via cffi -pymongo==3.13.0 +pymongo==4.9.1 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils @@ -166,48 +169,49 @@ python-swiftclient==3.13.1 # via # -c requirements/constraints.txt # -r requirements/base.in -pytz==2024.1 +pytz==2024.2 # via # -r requirements/base.in # edx-submissions # fs # xblock -pyyaml==6.0.1 +pyyaml==6.0.2 # via # code-annotations + # edx-django-release-util # edx-i18n-tools # xblock -requests==2.31.0 +requests==2.32.3 # via python-swiftclient -s3transfer==0.10.1 +s3transfer==0.10.2 # via boto3 -simplejson==3.19.2 +simplejson==3.19.3 # via xblock six==1.16.0 # via # bleach + # edx-ccx-keys + # edx-django-release-util # fs # html5lib # python-dateutil # python-swiftclient -sqlparse==0.5.0 +sqlparse==0.5.1 # via django -stevedore==5.2.0 +stevedore==5.3.0 # via # code-annotations # edx-django-utils # edx-opaque-keys text-unidecode==1.3 # via python-slugify -typing-extensions==4.11.0 - # via - # asgiref - # edx-opaque-keys -urllib3==1.26.18 +typing-extensions==4.12.2 + # via edx-opaque-keys +urllib3==2.2.3 # via # botocore # requests -voluptuous==0.14.2 +voluptuous==0.15.2 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -217,9 +221,9 @@ webencodings==0.5.1 # via # bleach # html5lib -webob==1.8.7 +webob==1.8.8 # via xblock -xblock==4.0.1 +xblock==5.1.0 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/ci.txt b/requirements/ci.txt index 6b818bedc4..6c4aa3e9e7 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -cachetools==5.3.3 +cachetools==5.5.0 # via # -r requirements/tox.txt # tox -certifi==2024.2.2 +certifi==2024.8.30 # via requests chardet==5.2.0 # via @@ -20,9 +20,9 @@ colorama==0.4.6 # via # -r requirements/tox.txt # tox -coverage==6.5.0 +coverage[toml]==7.6.1 # via coveralls -coveralls==3.3.1 +coveralls==4.0.1 # via -r requirements/ci.in distlib==0.3.8 # via @@ -30,7 +30,7 @@ distlib==0.3.8 # virtualenv docopt==0.6.2 # via coveralls -filelock==3.13.4 +filelock==3.16.1 # via # -r requirements/tox.txt # tox @@ -39,12 +39,12 @@ idna==2.8 # via # -c requirements/constraints.txt # requests -packaging==24.0 +packaging==24.1 # via # -r requirements/tox.txt # pyproject-api # tox -platformdirs==4.2.1 +platformdirs==4.3.6 # via # -r requirements/tox.txt # tox @@ -53,22 +53,17 @@ pluggy==1.5.0 # via # -r requirements/tox.txt # tox -pyproject-api==1.6.1 +pyproject-api==1.8.0 # via # -r requirements/tox.txt # tox -requests==2.31.0 +requests==2.32.3 # via coveralls -tomli==2.0.1 - # via - # -r requirements/tox.txt - # pyproject-api - # tox -tox==4.14.2 +tox==4.20.0 # via -r requirements/tox.txt -urllib3==2.2.1 +urllib3==2.2.3 # via requests -virtualenv==20.26.0 +virtualenv==20.26.6 # via # -r requirements/tox.txt # tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 8b0c901b10..8e497092bf 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -1,4 +1,8 @@ + + + + # A central location for most common version constraints # (across edx repos) for pip-installation. # diff --git a/requirements/docs.txt b/requirements/docs.txt index 27cc459218..341e5fce11 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,63 +1,68 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -accessible-pygments==0.0.4 +accessible-pygments==0.0.5 # via pydata-sphinx-theme -alabaster==0.7.13 +alabaster==1.0.0 # via sphinx -babel==2.14.0 +anyio==4.6.0 + # via + # starlette + # watchfiles +babel==2.16.0 # via # pydata-sphinx-theme # sphinx beautifulsoup4==4.12.3 # via pydata-sphinx-theme -certifi==2024.2.2 +certifi==2024.8.30 # via requests charset-normalizer==3.3.2 # via requests +click==8.1.7 + # via uvicorn colorama==0.4.6 # via sphinx-autobuild -docutils==0.17.1 +docutils==0.21.2 # via # pydata-sphinx-theme # sphinx +h11==0.14.0 + # via uvicorn idna==2.8 # via # -c requirements/constraints.txt + # anyio # requests imagesize==1.4.1 # via sphinx -jinja2==3.1.3 +jinja2==3.1.4 # via sphinx -livereload==2.6.3 - # via sphinx-autobuild markupsafe==2.1.5 # via jinja2 -packaging==24.0 +packaging==24.1 # via # pydata-sphinx-theme # sphinx -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.15.4 # via sphinx-book-theme -pygments==2.17.2 +pygments==2.18.0 # via # accessible-pygments # pydata-sphinx-theme # sphinx -pytz==2024.1 - # via babel -requests==2.31.0 +requests==2.32.3 # via sphinx -six==1.16.0 - # via livereload +sniffio==1.3.1 + # via anyio snowballstemmer==2.2.0 # via sphinx -soupsieve==2.5 +soupsieve==2.6 # via beautifulsoup4 -sphinx==4.3.2 +sphinx==8.0.2 # via # -r requirements/docs.in # pydata-sphinx-theme @@ -65,34 +70,37 @@ sphinx==4.3.2 # sphinx-book-theme # sphinx-copybutton # sphinxcontrib-contentui -sphinx-autobuild==2021.3.14 +sphinx-autobuild==2024.9.19 # via -r requirements/docs.in -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.3 # via -r requirements/docs.in sphinx-copybutton==0.5.2 # via -r requirements/docs.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-contentui==0.2.5 # via -r requirements/docs.in -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-mermaid==0.9.2 # via -r requirements/docs.in -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx -tornado==6.4 - # via livereload -typing-extensions==4.11.0 +starlette==0.39.2 + # via sphinx-autobuild +typing-extensions==4.12.2 # via pydata-sphinx-theme -urllib3==2.2.1 +urllib3==2.2.3 # via requests - -# The following packages are considered to be unsafe in a requirements file: -# setuptools +uvicorn==0.31.0 + # via sphinx-autobuild +watchfiles==0.24.0 + # via sphinx-autobuild +websockets==13.1 + # via sphinx-autobuild diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 1471eddf1c..6eb4c37409 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,32 +1,23 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -build==1.2.1 +build==1.2.2 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.1.0 - # via build -packaging==24.0 +packaging==24.1 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in -pyproject-hooks==1.0.0 - # via - # build - # pip-tools -tomli==2.0.1 +pyproject-hooks==1.2.0 # via # build # pip-tools - # pyproject-hooks -wheel==0.43.0 +wheel==0.44.0 # via pip-tools -zipp==3.18.1 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip.txt b/requirements/pip.txt index e551e29df0..501b162f91 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -wheel==0.43.0 +wheel==0.44.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.0 +pip==24.2 # via -r requirements/pip.in setuptools==59.8.0 # via diff --git a/requirements/quality.txt b/requirements/quality.txt index 1e387a3ab2..f22cd21b08 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -20,23 +20,15 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -astroid==3.1.0 +astroid==3.3.4 # via # pylint # pylint-celery -attrs==23.2.0 +attrs==24.2.0 # via # -r requirements/test.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/test.txt - # celery - # django - # djangorestframework - # kombu -billiard==4.2.0 +billiard==4.2.1 # via # -r requirements/test.txt # celery @@ -46,28 +38,28 @@ binaryornot==0.4.4 # cookiecutter bleach==6.1.0 # via -r requirements/test.txt -boto3==1.34.91 +boto3==1.35.29 # via # -r requirements/test.txt # fs-s3fs # moto -botocore==1.34.91 +botocore==1.35.29 # via # -r requirements/test.txt # boto3 # moto # s3transfer -cachetools==5.3.3 +cachetools==5.5.0 # via # -r requirements/test.txt # tox celery==5.4.0 # via -r requirements/test.txt -certifi==2024.2.2 +certifi==2024.8.30 # via # -r requirements/test.txt # requests -cffi==1.16.0 +cffi==1.17.1 # via # -r requirements/test.txt # cryptography @@ -120,11 +112,11 @@ cookiecutter==2.6.0 # via # -r requirements/test.txt # xblock-sdk -coverage[toml]==7.5.0 +coverage[toml]==7.6.1 # via # -r requirements/test.txt # pytest-cov -cryptography==42.0.5 +cryptography==43.0.1 # via # -r requirements/test.txt # moto @@ -134,13 +126,13 @@ ddt==1.0.0 # -r requirements/test.txt defusedxml==0.7.1 # via -r requirements/test.txt -dill==0.3.8 +dill==0.3.9 # via pylint distlib==0.3.8 # via # -r requirements/test.txt # virtualenv -django==4.2.11 +django==4.2.16 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -148,6 +140,7 @@ django==4.2.11 # django-model-utils # django-waffle # djangorestframework + # edx-django-release-util # edx-django-utils # edx-i18n-tools # edx-submissions @@ -161,7 +154,7 @@ django-crum==0.7.9 # -r requirements/test.txt # edx-django-utils # edx-toggles -django-model-utils==4.5.0 +django-model-utils==5.0.0 # via # -r requirements/test.txt # edx-submissions @@ -174,42 +167,51 @@ django-waffle==4.1.0 # -r requirements/test.txt # edx-django-utils # edx-toggles -djangorestframework==3.15.1 +djangorestframework==3.15.2 + # via + # -r requirements/test.txt + # edx-submissions +dnspython==2.6.1 + # via + # -r requirements/test.txt + # pymongo +edx-ccx-keys==1.3.0 + # via + # -r requirements/test.txt + # openedx-events +edx-django-release-util==1.4.0 # via # -r requirements/test.txt # edx-submissions -edx-django-utils==5.12.0 +edx-django-utils==5.15.0 # via # -r requirements/test.txt # edx-toggles # openedx-events -edx-i18n-tools==1.6.0 +edx-i18n-tools==1.6.3 # via -r requirements/test.txt -edx-lint==5.3.6 +edx-lint==5.4.0 # via -r requirements/quality.in -edx-opaque-keys[django]==2.8.0 +edx-opaque-keys[django]==2.11.0 # via # -r requirements/test.txt + # edx-ccx-keys # openedx-events -edx-submissions==3.7.0 +edx-submissions==3.8.0 # via -r requirements/test.txt edx-toggles==5.2.0 # via -r requirements/test.txt -exceptiongroup==1.2.1 - # via - # -r requirements/test.txt - # pytest -factory-boy==3.3.0 +factory-boy==3.3.1 # via -r requirements/test.txt -faker==24.11.0 +faker==30.0.0 # via # -r requirements/test.txt # factory-boy -fastavro==1.9.4 +fastavro==1.9.7 # via # -r requirements/test.txt # openedx-events -filelock==3.13.4 +filelock==3.16.1 # via # -r requirements/test.txt # tox @@ -242,7 +244,7 @@ iniconfig==2.0.0 # pytest isort==5.13.2 # via pylint -jinja2==3.1.3 +jinja2==3.1.4 # via # -r requirements/test.txt # code-annotations @@ -257,7 +259,7 @@ jsonfield==3.1.0 # via # -r requirements/test.txt # edx-submissions -kombu==5.3.7 +kombu==5.4.2 # via # -r requirements/test.txt # celery @@ -267,16 +269,18 @@ loremipsum==1.0.5 # via # -c requirements/constraints.txt # -r requirements/test.txt -lxml[html-clean]==5.2.1 +lxml[html-clean]==5.3.0 # via # -r requirements/test.txt # edx-i18n-tools # lxml-html-clean # xblock # xblock-sdk -lxml-html-clean==0.1.1 - # via -r requirements/test.txt -mako==1.3.3 +lxml-html-clean==0.2.2 + # via + # -r requirements/test.txt + # lxml +mako==1.3.5 # via # -r requirements/test.txt # xblock @@ -299,21 +303,21 @@ mdurl==0.1.2 # markdown-it-py mock==5.1.0 # via -r requirements/test.txt -more-itertools==10.2.0 +more-itertools==10.5.0 # via -r requirements/test.txt moto==4.2.14 # via # -c requirements/constraints.txt # -r requirements/test.txt -newrelic==9.9.0 +newrelic==10.0.0 # via # -r requirements/test.txt # edx-django-utils -openedx-events==9.9.2 +openedx-events==9.14.1 # via -r requirements/test.txt -openedx-filters==1.8.1 +openedx-filters==1.10.0 # via -r requirements/test.txt -packaging==24.0 +packaging==24.1 # via # -r requirements/test.txt # pyproject-api @@ -327,11 +331,11 @@ path==13.1.0 # path-py path-py==12.5.0 # via -r requirements/test.txt -pbr==6.0.0 +pbr==6.1.0 # via # -r requirements/test.txt # stevedore -platformdirs==4.2.1 +platformdirs==4.3.6 # via # -r requirements/test.txt # pylint @@ -346,25 +350,25 @@ polib==1.2.0 # via # -r requirements/test.txt # edx-i18n-tools -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.48 # via # -r requirements/test.txt # click-repl -psutil==5.9.8 +psutil==6.0.0 # via # -r requirements/test.txt # edx-django-utils -pycodestyle==2.11.1 +pycodestyle==2.12.1 # via -r requirements/quality.in pycparser==2.22 # via # -r requirements/test.txt # cffi -pygments==2.17.2 +pygments==2.18.0 # via # -r requirements/test.txt # rich -pylint==3.1.0 +pylint==3.3.1 # via # edx-lint # pylint-celery @@ -378,7 +382,7 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pymongo==3.13.0 +pymongo==4.9.1 # via # -r requirements/test.txt # edx-opaque-keys @@ -390,18 +394,18 @@ pypng==0.20220715.0 # via # -r requirements/test.txt # xblock-sdk -pyproject-api==1.6.1 +pyproject-api==1.8.0 # via # -r requirements/test.txt # tox -pytest==8.1.1 +pytest==8.3.3 # via # -r requirements/test.txt # pytest-cov # pytest-django pytest-cov==5.0.0 # via -r requirements/test.txt -pytest-django==4.8.0 +pytest-django==4.9.0 # via -r requirements/test.txt python-dateutil==2.9.0.post0 # via @@ -422,21 +426,22 @@ python-swiftclient==3.13.1 # via # -c requirements/constraints.txt # -r requirements/test.txt -pytz==2024.1 +pytz==2024.2 # via # -r requirements/test.txt # edx-submissions # fs # xblock -pyyaml==6.0.1 +pyyaml==6.0.2 # via # -r requirements/test.txt # code-annotations # cookiecutter + # edx-django-release-util # edx-i18n-tools # responses # xblock -requests==2.31.0 +requests==2.32.3 # via # -r requirements/test.txt # cookiecutter @@ -444,19 +449,19 @@ requests==2.31.0 # python-swiftclient # responses # xblock-sdk -responses==0.25.0 +responses==0.25.3 # via # -r requirements/test.txt # moto -rich==13.7.1 +rich==13.8.1 # via # -r requirements/test.txt # cookiecutter -s3transfer==0.10.1 +s3transfer==0.10.2 # via # -r requirements/test.txt # boto3 -simplejson==3.19.2 +simplejson==3.19.3 # via # -r requirements/test.txt # xblock @@ -465,6 +470,8 @@ six==1.16.0 # via # -r requirements/test.txt # bleach + # edx-ccx-keys + # edx-django-release-util # edx-lint # freezegun # fs @@ -472,54 +479,40 @@ six==1.16.0 # html5lib # python-dateutil # python-swiftclient -sqlparse==0.5.0 +sqlparse==0.5.1 # via # -r requirements/test.txt # django -stevedore==5.2.0 +stevedore==5.3.0 # via # -r requirements/test.txt # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==8.1.0 +testfixtures==8.3.0 # via -r requirements/test.txt text-unidecode==1.3 # via # -r requirements/test.txt # python-slugify -tomli==2.0.1 - # via - # -r requirements/test.txt - # coverage - # pylint - # pyproject-api - # pytest - # tox -tomlkit==0.12.4 +tomlkit==0.13.2 # via pylint -tox==4.14.2 +tox==4.20.0 # via -r requirements/test.txt -types-python-dateutil==2.9.0.20240316 +types-python-dateutil==2.9.0.20240906 # via # -r requirements/test.txt # arrow -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via # -r requirements/test.txt - # asgiref - # astroid # edx-opaque-keys - # faker - # kombu - # pylint - # rich -tzdata==2024.1 +tzdata==2024.2 # via # -r requirements/test.txt - # backports-zoneinfo # celery -urllib3==1.26.18 + # kombu +urllib3==2.2.3 # via # -r requirements/test.txt # botocore @@ -531,11 +524,11 @@ vine==5.1.0 # amqp # celery # kombu -virtualenv==20.26.0 +virtualenv==20.26.6 # via # -r requirements/test.txt # tox -voluptuous==0.14.2 +voluptuous==0.15.2 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -553,20 +546,20 @@ webencodings==0.5.1 # -r requirements/test.txt # bleach # html5lib -webob==1.8.7 +webob==1.8.8 # via # -r requirements/test.txt # xblock # xblock-sdk -werkzeug==3.0.2 +werkzeug==3.0.4 # via # -r requirements/test.txt # moto -xblock==4.0.1 +xblock==5.1.0 # via # -r requirements/test.txt # xblock-sdk -xblock-sdk==0.11.0 +xblock-sdk==0.12.0 # via -r requirements/test.txt xmltodict==0.13.0 # via diff --git a/requirements/test-acceptance.txt b/requirements/test-acceptance.txt index c628ff4cc9..0acc0cefc9 100644 --- a/requirements/test-acceptance.txt +++ b/requirements/test-acceptance.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -20,19 +20,11 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -attrs==23.2.0 +attrs==24.2.0 # via # -r requirements/test.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/test.txt - # celery - # django - # djangorestframework - # kombu -billiard==4.2.0 +billiard==4.2.1 # via # -r requirements/test.txt # celery @@ -42,28 +34,28 @@ binaryornot==0.4.4 # cookiecutter bleach==6.1.0 # via -r requirements/test.txt -boto3==1.34.91 +boto3==1.35.29 # via # -r requirements/test.txt # fs-s3fs # moto -botocore==1.34.91 +botocore==1.35.29 # via # -r requirements/test.txt # boto3 # moto # s3transfer -cachetools==5.3.3 +cachetools==5.5.0 # via # -r requirements/test.txt # tox celery==5.4.0 # via -r requirements/test.txt -certifi==2024.2.2 +certifi==2024.8.30 # via # -r requirements/test.txt # requests -cffi==1.16.0 +cffi==1.17.1 # via # -r requirements/test.txt # cryptography @@ -111,11 +103,11 @@ cookiecutter==2.6.0 # via # -r requirements/test.txt # xblock-sdk -coverage[toml]==7.5.0 +coverage[toml]==7.6.1 # via # -r requirements/test.txt # pytest-cov -cryptography==42.0.5 +cryptography==43.0.1 # via # -r requirements/test.txt # moto @@ -130,7 +122,7 @@ distlib==0.3.8 # via # -r requirements/test.txt # virtualenv -django==4.2.11 +django==4.2.16 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -138,6 +130,7 @@ django==4.2.11 # django-model-utils # django-waffle # djangorestframework + # edx-django-release-util # edx-django-utils # edx-i18n-tools # edx-submissions @@ -151,7 +144,7 @@ django-crum==0.7.9 # -r requirements/test.txt # edx-django-utils # edx-toggles -django-model-utils==4.5.0 +django-model-utils==5.0.0 # via # -r requirements/test.txt # edx-submissions @@ -164,40 +157,49 @@ django-waffle==4.1.0 # -r requirements/test.txt # edx-django-utils # edx-toggles -djangorestframework==3.15.1 +djangorestframework==3.15.2 + # via + # -r requirements/test.txt + # edx-submissions +dnspython==2.6.1 + # via + # -r requirements/test.txt + # pymongo +edx-ccx-keys==1.3.0 + # via + # -r requirements/test.txt + # openedx-events +edx-django-release-util==1.4.0 # via # -r requirements/test.txt # edx-submissions -edx-django-utils==5.12.0 +edx-django-utils==5.15.0 # via # -r requirements/test.txt # edx-toggles # openedx-events -edx-i18n-tools==1.6.0 +edx-i18n-tools==1.6.3 # via -r requirements/test.txt -edx-opaque-keys[django]==2.8.0 +edx-opaque-keys[django]==2.11.0 # via # -r requirements/test.txt + # edx-ccx-keys # openedx-events -edx-submissions==3.7.0 +edx-submissions==3.8.0 # via -r requirements/test.txt edx-toggles==5.2.0 # via -r requirements/test.txt -exceptiongroup==1.2.1 - # via - # -r requirements/test.txt - # pytest -factory-boy==3.3.0 +factory-boy==3.3.1 # via -r requirements/test.txt -faker==24.11.0 +faker==30.0.0 # via # -r requirements/test.txt # factory-boy -fastavro==1.9.4 +fastavro==1.9.7 # via # -r requirements/test.txt # openedx-events -filelock==3.13.4 +filelock==3.16.1 # via # -r requirements/test.txt # tox @@ -228,7 +230,7 @@ iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -jinja2==3.1.3 +jinja2==3.1.4 # via # -r requirements/test.txt # code-annotations @@ -243,7 +245,7 @@ jsonfield==3.1.0 # via # -r requirements/test.txt # edx-submissions -kombu==5.3.7 +kombu==5.4.2 # via # -r requirements/test.txt # celery @@ -253,16 +255,18 @@ loremipsum==1.0.5 # via # -c requirements/constraints.txt # -r requirements/test.txt -lxml[html-clean]==5.2.1 +lxml[html-clean]==5.3.0 # via # -r requirements/test.txt # edx-i18n-tools # lxml-html-clean # xblock # xblock-sdk -lxml-html-clean==0.1.1 - # via -r requirements/test.txt -mako==1.3.3 +lxml-html-clean==0.2.2 + # via + # -r requirements/test.txt + # lxml +mako==1.3.5 # via # -r requirements/test.txt # xblock @@ -283,21 +287,21 @@ mdurl==0.1.2 # markdown-it-py mock==5.1.0 # via -r requirements/test.txt -more-itertools==10.2.0 +more-itertools==10.5.0 # via -r requirements/test.txt moto==4.2.14 # via # -c requirements/constraints.txt # -r requirements/test.txt -newrelic==9.9.0 +newrelic==10.0.0 # via # -r requirements/test.txt # edx-django-utils -openedx-events==9.9.2 +openedx-events==9.14.1 # via -r requirements/test.txt -openedx-filters==1.8.1 +openedx-filters==1.10.0 # via -r requirements/test.txt -packaging==24.0 +packaging==24.1 # via # -r requirements/test.txt # pyproject-api @@ -311,11 +315,11 @@ path==13.1.0 # path-py path-py==12.5.0 # via -r requirements/test.txt -pbr==6.0.0 +pbr==6.1.0 # via # -r requirements/test.txt # stevedore -platformdirs==4.2.1 +platformdirs==4.3.6 # via # -r requirements/test.txt # tox @@ -329,11 +333,11 @@ polib==1.2.0 # via # -r requirements/test.txt # edx-i18n-tools -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.48 # via # -r requirements/test.txt # click-repl -psutil==5.9.8 +psutil==6.0.0 # via # -r requirements/test.txt # edx-django-utils @@ -341,13 +345,13 @@ pycparser==2.22 # via # -r requirements/test.txt # cffi -pygments==2.17.2 +pygments==2.18.0 # via # -r requirements/test.txt # rich -pyinstrument==4.6.2 +pyinstrument==4.7.3 # via -r requirements/test-acceptance.in -pymongo==3.13.0 +pymongo==4.9.1 # via # -r requirements/test.txt # edx-opaque-keys @@ -359,11 +363,11 @@ pypng==0.20220715.0 # via # -r requirements/test.txt # xblock-sdk -pyproject-api==1.6.1 +pyproject-api==1.8.0 # via # -r requirements/test.txt # tox -pytest==8.1.1 +pytest==8.3.3 # via # -r requirements/test-acceptance.in # -r requirements/test.txt @@ -371,7 +375,7 @@ pytest==8.1.1 # pytest-django pytest-cov==5.0.0 # via -r requirements/test.txt -pytest-django==4.8.0 +pytest-django==4.9.0 # via -r requirements/test.txt python-dateutil==2.9.0.post0 # via @@ -392,21 +396,22 @@ python-swiftclient==3.13.1 # via # -c requirements/constraints.txt # -r requirements/test.txt -pytz==2024.1 +pytz==2024.2 # via # -r requirements/test.txt # edx-submissions # fs # xblock -pyyaml==6.0.1 +pyyaml==6.0.2 # via # -r requirements/test.txt # code-annotations # cookiecutter + # edx-django-release-util # edx-i18n-tools # responses # xblock -requests==2.31.0 +requests==2.32.3 # via # -r requirements/test.txt # cookiecutter @@ -414,19 +419,19 @@ requests==2.31.0 # python-swiftclient # responses # xblock-sdk -responses==0.25.0 +responses==0.25.3 # via # -r requirements/test.txt # moto -rich==13.7.1 +rich==13.8.1 # via # -r requirements/test.txt # cookiecutter -s3transfer==0.10.1 +s3transfer==0.10.2 # via # -r requirements/test.txt # boto3 -simplejson==3.19.2 +simplejson==3.19.3 # via # -r requirements/test.txt # xblock @@ -435,55 +440,46 @@ six==1.16.0 # via # -r requirements/test.txt # bleach + # edx-ccx-keys + # edx-django-release-util # freezegun # fs # fs-s3fs # html5lib # python-dateutil # python-swiftclient -sqlparse==0.5.0 +sqlparse==0.5.1 # via # -r requirements/test.txt # django -stevedore==5.2.0 +stevedore==5.3.0 # via # -r requirements/test.txt # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==8.1.0 +testfixtures==8.3.0 # via -r requirements/test.txt text-unidecode==1.3 # via # -r requirements/test.txt # python-slugify -tomli==2.0.1 - # via - # -r requirements/test.txt - # coverage - # pyproject-api - # pytest - # tox -tox==4.14.2 +tox==4.20.0 # via -r requirements/test.txt -types-python-dateutil==2.9.0.20240316 +types-python-dateutil==2.9.0.20240906 # via # -r requirements/test.txt # arrow -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via # -r requirements/test.txt - # asgiref # edx-opaque-keys - # faker - # kombu - # rich -tzdata==2024.1 +tzdata==2024.2 # via # -r requirements/test.txt - # backports-zoneinfo # celery -urllib3==1.26.18 + # kombu +urllib3==2.2.3 # via # -r requirements/test.txt # botocore @@ -495,11 +491,11 @@ vine==5.1.0 # amqp # celery # kombu -virtualenv==20.26.0 +virtualenv==20.26.6 # via # -r requirements/test.txt # tox -voluptuous==0.14.2 +voluptuous==0.15.2 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -517,20 +513,20 @@ webencodings==0.5.1 # -r requirements/test.txt # bleach # html5lib -webob==1.8.7 +webob==1.8.8 # via # -r requirements/test.txt # xblock # xblock-sdk -werkzeug==3.0.2 +werkzeug==3.0.4 # via # -r requirements/test.txt # moto -xblock==4.0.1 +xblock==5.1.0 # via # -r requirements/test.txt # xblock-sdk -xblock-sdk==0.11.0 +xblock-sdk==0.12.0 # via -r requirements/test.txt xmltodict==0.13.0 # via diff --git a/requirements/test.txt b/requirements/test.txt index c265e367bf..06759580ea 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -16,44 +16,36 @@ asgiref==3.8.1 # via # -r requirements/base.txt # django -attrs==23.2.0 +attrs==24.2.0 # via # -r requirements/base.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/base.txt - # celery - # django - # djangorestframework - # kombu -billiard==4.2.0 +billiard==4.2.1 # via celery binaryornot==0.4.4 # via cookiecutter bleach==6.1.0 # via -r requirements/base.txt -boto3==1.34.91 +boto3==1.35.29 # via # -r requirements/base.txt # fs-s3fs # moto -botocore==1.34.91 +botocore==1.35.29 # via # -r requirements/base.txt # boto3 # moto # s3transfer -cachetools==5.3.3 +cachetools==5.5.0 # via tox celery==5.4.0 # via -r requirements/test.in -certifi==2024.2.2 +certifi==2024.8.30 # via # -r requirements/base.txt # requests -cffi==1.16.0 +cffi==1.17.1 # via # -r requirements/base.txt # cryptography @@ -90,11 +82,11 @@ colorama==0.4.6 # via tox cookiecutter==2.6.0 # via xblock-sdk -coverage[toml]==7.5.0 +coverage[toml]==7.6.1 # via # -r requirements/test.in # pytest-cov -cryptography==42.0.5 +cryptography==43.0.1 # via moto ddt==1.0.0 # via @@ -111,6 +103,7 @@ distlib==0.3.8 # django-model-utils # django-waffle # djangorestframework + # edx-django-release-util # edx-django-utils # edx-i18n-tools # edx-submissions @@ -124,7 +117,7 @@ django-crum==0.7.9 # -r requirements/base.txt # edx-django-utils # edx-toggles -django-model-utils==4.5.0 +django-model-utils==5.0.0 # via # -r requirements/base.txt # edx-submissions @@ -140,32 +133,43 @@ django-waffle==4.1.0 # via # -r requirements/base.txt # edx-submissions -edx-django-utils==5.12.0 +dnspython==2.6.1 + # via + # -r requirements/base.txt + # pymongo +edx-ccx-keys==1.3.0 + # via + # -r requirements/base.txt + # openedx-events +edx-django-release-util==1.4.0 + # via + # -r requirements/base.txt + # edx-submissions +edx-django-utils==5.15.0 # via # -r requirements/base.txt # edx-toggles # openedx-events -edx-i18n-tools==1.6.0 +edx-i18n-tools==1.6.3 # via -r requirements/base.txt -edx-opaque-keys[django]==2.8.0 +edx-opaque-keys[django]==2.11.0 # via # -r requirements/base.txt + # edx-ccx-keys # openedx-events -edx-submissions==3.7.0 +edx-submissions==3.8.0 # via -r requirements/base.txt edx-toggles==5.2.0 # via -r requirements/base.txt -exceptiongroup==1.2.1 - # via pytest -factory-boy==3.3.0 +factory-boy==3.3.1 # via -r requirements/test.in -faker==24.11.0 +faker==30.0.0 # via factory-boy -fastavro==1.9.4 +fastavro==1.9.7 # via # -r requirements/base.txt # openedx-events -filelock==3.13.4 +filelock==3.16.1 # via # tox # virtualenv @@ -192,7 +196,7 @@ idna==2.8 # requests iniconfig==2.0.0 # via pytest -jinja2==3.1.3 +jinja2==3.1.4 # via # -r requirements/base.txt # code-annotations @@ -207,7 +211,7 @@ jsonfield==3.1.0 # via # -r requirements/base.txt # edx-submissions -kombu==5.3.7 +kombu==5.4.2 # via celery lazy==1.6 # via -r requirements/base.txt @@ -215,16 +219,18 @@ loremipsum==1.0.5 # via # -c requirements/constraints.txt # -r requirements/base.txt -lxml[html-clean]==5.2.1 +lxml[html-clean]==5.3.0 # via # -r requirements/base.txt # edx-i18n-tools # lxml-html-clean # xblock # xblock-sdk -lxml-html-clean==0.1.1 - # via -r requirements/base.txt -mako==1.3.3 +lxml-html-clean==0.2.2 + # via + # -r requirements/base.txt + # lxml +mako==1.3.5 # via # -r requirements/base.txt # xblock @@ -241,21 +247,21 @@ mdurl==0.1.2 # via markdown-it-py mock==5.1.0 # via -r requirements/test.in -more-itertools==10.2.0 +more-itertools==10.5.0 # via -r requirements/test.in moto==4.2.14 # via # -c requirements/constraints.txt # -r requirements/test.in -newrelic==9.9.0 +newrelic==10.0.0 # via # -r requirements/base.txt # edx-django-utils -openedx-events==9.9.2 +openedx-events==9.14.1 # via -r requirements/base.txt -openedx-filters==1.8.1 +openedx-filters==1.10.0 # via -r requirements/base.txt -packaging==24.0 +packaging==24.1 # via # pyproject-api # pytest @@ -268,11 +274,11 @@ path==13.1.0 # path-py path-py==12.5.0 # via -r requirements/base.txt -pbr==6.0.0 +pbr==6.1.0 # via # -r requirements/base.txt # stevedore -platformdirs==4.2.1 +platformdirs==4.3.6 # via # tox # virtualenv @@ -284,9 +290,9 @@ polib==1.2.0 # via # -r requirements/base.txt # edx-i18n-tools -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.48 # via click-repl -psutil==5.9.8 +psutil==6.0.0 # via # -r requirements/base.txt # edx-django-utils @@ -294,9 +300,9 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pygments==2.17.2 +pygments==2.18.0 # via rich -pymongo==3.13.0 +pymongo==4.9.1 # via # -r requirements/base.txt # edx-opaque-keys @@ -306,16 +312,16 @@ pynacl==1.5.0 # edx-django-utils pypng==0.20220715.0 # via xblock-sdk -pyproject-api==1.6.1 +pyproject-api==1.8.0 # via tox -pytest==8.1.1 +pytest==8.3.3 # via # -r requirements/test.in # pytest-cov # pytest-django pytest-cov==5.0.0 # via -r requirements/test.in -pytest-django==4.8.0 +pytest-django==4.9.0 # via -r requirements/test.in python-dateutil==2.9.0.post0 # via @@ -336,21 +342,22 @@ python-swiftclient==3.13.1 # via # -c requirements/constraints.txt # -r requirements/base.txt -pytz==2024.1 +pytz==2024.2 # via # -r requirements/base.txt # edx-submissions # fs # xblock -pyyaml==6.0.1 +pyyaml==6.0.2 # via # -r requirements/base.txt # code-annotations # cookiecutter + # edx-django-release-util # edx-i18n-tools # responses # xblock -requests==2.31.0 +requests==2.32.3 # via # -r requirements/base.txt # cookiecutter @@ -358,15 +365,15 @@ requests==2.31.0 # python-swiftclient # responses # xblock-sdk -responses==0.25.0 +responses==0.25.3 # via moto -rich==13.7.1 +rich==13.8.1 # via cookiecutter -s3transfer==0.10.1 +s3transfer==0.10.2 # via # -r requirements/base.txt # boto3 -simplejson==3.19.2 +simplejson==3.19.3 # via # -r requirements/base.txt # xblock @@ -375,51 +382,43 @@ six==1.16.0 # via # -r requirements/base.txt # bleach + # edx-ccx-keys + # edx-django-release-util # freezegun # fs # fs-s3fs # html5lib # python-dateutil # python-swiftclient -sqlparse==0.5.0 +sqlparse==0.5.1 # via # -r requirements/base.txt # django -stevedore==5.2.0 +stevedore==5.3.0 # via # -r requirements/base.txt # code-annotations # edx-django-utils # edx-opaque-keys -testfixtures==8.1.0 +testfixtures==8.3.0 # via -r requirements/test.in text-unidecode==1.3 # via # -r requirements/base.txt # python-slugify -tomli==2.0.1 - # via - # coverage - # pyproject-api - # pytest - # tox -tox==4.14.2 +tox==4.20.0 # via -r requirements/test.in -types-python-dateutil==2.9.0.20240316 +types-python-dateutil==2.9.0.20240906 # via arrow -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via # -r requirements/base.txt - # asgiref # edx-opaque-keys - # faker - # kombu - # rich -tzdata==2024.1 +tzdata==2024.2 # via - # backports-zoneinfo # celery -urllib3==1.26.18 + # kombu +urllib3==2.2.3 # via # -r requirements/base.txt # botocore @@ -430,9 +429,9 @@ vine==5.1.0 # amqp # celery # kombu -virtualenv==20.26.0 +virtualenv==20.26.6 # via tox -voluptuous==0.14.2 +voluptuous==0.15.2 # via # -c requirements/constraints.txt # -r requirements/base.txt @@ -448,18 +447,18 @@ webencodings==0.5.1 # -r requirements/base.txt # bleach # html5lib -webob==1.8.7 +webob==1.8.8 # via # -r requirements/base.txt # xblock # xblock-sdk -werkzeug==3.0.2 +werkzeug==3.0.4 # via moto -xblock==4.0.1 +xblock==5.1.0 # via # -r requirements/base.txt # xblock-sdk -xblock-sdk==0.11.0 +xblock-sdk==0.12.0 # via -r requirements/test.in xmltodict==0.13.0 # via moto diff --git a/requirements/tox.txt b/requirements/tox.txt index b213aa76c1..2451026e84 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -cachetools==5.3.3 +cachetools==5.5.0 # via tox chardet==5.2.0 # via tox @@ -12,27 +12,23 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.4 +filelock==3.16.1 # via # tox # virtualenv -packaging==24.0 +packaging==24.1 # via # pyproject-api # tox -platformdirs==4.2.1 +platformdirs==4.3.6 # via # tox # virtualenv pluggy==1.5.0 # via tox -pyproject-api==1.6.1 +pyproject-api==1.8.0 # via tox -tomli==2.0.1 - # via - # pyproject-api - # tox -tox==4.14.2 +tox==4.20.0 # via -r requirements/tox.in -virtualenv==20.26.0 +virtualenv==20.26.6 # via tox diff --git a/setup.py b/setup.py index a6ccd76700..3d971c5a32 100644 --- a/setup.py +++ b/setup.py @@ -68,8 +68,8 @@ def get_version(*file_paths): 'License :: OSI Approved :: GNU Affero General Public License v3', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], packages=find_packages(include=['openassessment*'], exclude=['*.test', '*.tests']), include_package_data=True, diff --git a/tox.ini b/tox.ini index 05a0be162d..365ab2cc9a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38, 311}-django{42}, js, quality +envlist = py{311, 312}-django{42}, js, quality [testenv] deps = From b61e23cf892360bf639bdcaa4b15d28a1ba56012 Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Tue, 1 Oct 2024 14:18:23 +0500 Subject: [PATCH 3/9] chore: remove extra lines --- requirements/common_constraints.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 8e497092bf..fc5c765e73 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -1,8 +1,3 @@ - - - - - # A central location for most common version constraints # (across edx repos) for pip-installation. # From ad7695b5171e8d15f4a5b18b1bc19c0ea6961bcd Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Tue, 1 Oct 2024 14:21:55 +0500 Subject: [PATCH 4/9] refactor: publish one python version only --- .github/workflows/pypi-publish.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index f9e1cf0dcb..8887c10b9f 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -10,17 +10,13 @@ jobs: push: runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.11, 3.12] - steps: - name: Checkout uses: actions/checkout@v2 - name: setup python uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + python-version: 3.12 - name: Install pip run: pip install -r requirements/pip.txt From 1fc4c48afa795009be66f4bf5f48b4d837e3aeb5 Mon Sep 17 00:00:00 2001 From: "M. Tayyab Tahir Qureshi" <109274085+ttqureshi@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:01:05 +0500 Subject: [PATCH 5/9] chore: bump minor version --- openassessment/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openassessment/__init__.py b/openassessment/__init__.py index 5fb23d0abe..a47c086f88 100644 --- a/openassessment/__init__.py +++ b/openassessment/__init__.py @@ -2,4 +2,4 @@ Initialization Information for Open Assessment Module """ -__version__ = '7.0.0' +__version__ = '6.13.0' From 3593c0b4d154a7f8f0572dcfd0fc37ca22393f21 Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Fri, 1 Nov 2024 12:37:18 +0500 Subject: [PATCH 6/9] test: Add test case --- .../xblock/test/test_openassessment.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/openassessment/xblock/test/test_openassessment.py b/openassessment/xblock/test/test_openassessment.py index aacf70d0c2..6fe8184a0f 100644 --- a/openassessment/xblock/test/test_openassessment.py +++ b/openassessment/xblock/test/test_openassessment.py @@ -5,6 +5,7 @@ import datetime as dt from io import StringIO import json +import unittest from unittest import mock from unittest.mock import MagicMock, Mock, PropertyMock, patch from django.test.utils import override_settings @@ -1422,3 +1423,32 @@ def test_ora_indexibility_with_multiple_html_prompt(self, xblock): self.assertEqual(content["display_name"], "Open Response Assessment") self.assertEqual(content["prompt_0"], "What is computer? It is a machine") self.assertEqual(content["prompt_1"], "Is it a calculator? Or is it a microwave") + + + +class TestResourceLoaderImport(unittest.TestCase): + @patch('xblock.utils.resources') + def test_import_falls_back(self, mock_resources): + # Simulate a ModuleNotFoundError for the first import + mock_resources.ResourceLoader.side_effect = ModuleNotFoundError + + # Now try to import and check if the fallback works + try: + from openassessmentblock import ResourceLoader + except ImportError: + self.fail("Import should not raise ImportError") + + # Check if ResourceLoader is the one from xblockutils.resources + from xblockutils.resources import ResourceLoader as FallbackLoader + self.assertIs(ResourceLoader, FallbackLoader) + +class TestLoadFunction(unittest.TestCase): + @patch('openassessmentblock.resource_loader') # Patch the resource_loader variable directly + def test_load_calls_load_unicode(self, mock_resource_loader): + mock_resource_loader.load_unicode.return_value = "mocked resource content" + path = "some/path/to/resource" + + result = openassessmentblock.load(path) + + mock_resource_loader.load_unicode.assert_called_once_with(path) + self.assertEqual(result, "mocked resource content") From 7bbf57486cf711cc5f33c7f9e367e998784c4ac5 Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Tue, 5 Nov 2024 14:27:42 +0500 Subject: [PATCH 7/9] fix: fix tests --- openassessment/xblock/openassessmentblock.py | 5 +- .../xblock/test/test_openassessment.py | 55 +++++++++---------- 2 files changed, 27 insertions(+), 33 deletions(-) diff --git a/openassessment/xblock/openassessmentblock.py b/openassessment/xblock/openassessmentblock.py index 18d23e2f05..19f6b3e397 100644 --- a/openassessment/xblock/openassessmentblock.py +++ b/openassessment/xblock/openassessmentblock.py @@ -8,10 +8,7 @@ import re import pytz -try: - from xblock.utils.resources import ResourceLoader -except ModuleNotFoundError: - from xblockutils.resources import ResourceLoader +from xblock.utils.resources import ResourceLoader from django.conf import settings from django.contrib.auth import get_user_model diff --git a/openassessment/xblock/test/test_openassessment.py b/openassessment/xblock/test/test_openassessment.py index 6fe8184a0f..f1b0841a05 100644 --- a/openassessment/xblock/test/test_openassessment.py +++ b/openassessment/xblock/test/test_openassessment.py @@ -6,6 +6,7 @@ from io import StringIO import json import unittest +import importlib from unittest import mock from unittest.mock import MagicMock, Mock, PropertyMock, patch from django.test.utils import override_settings @@ -114,6 +115,31 @@ def test_load_student_view(self, xblock): self.assertIsNotNone(grade_response) self.assertIn("step--grade", grade_response.body.decode('utf-8')) + @scenario("data/basic_scenario.xml") + def test_load_author_view(self, xblock): + """OA XBlock returns some HTML to the author in Studio. + + View basic test for verifying we're returned some HTML about the + Open Assessment XBlock for authoring purposes. + """ + xblock.xmodule_runtime = self._create_mock_runtime( + xblock.scope_ids.usage_id, True, False, "Author" + ) + xblock.mfe_views_enabled = True + xblock_fragment = self.runtime.render(xblock, "author_view") + + # Validate that the author view renders and contains expected content. + self.assertIn("OpenAssessmentBlock", xblock_fragment.body_html()) + self.assertIn("IS_STUDIO", xblock_fragment.body_html()) + + # Test that calling update_workflow_status doesn't throw an error. + try: + xblock.update_workflow_status() + except AssessmentWorkflowError: + self.fail( + "update_workflow_status raised AssessmentWorkflowError unexpectedly!" + ) + def _staff_assessment_view_helper(self, xblock): """ Helper for "staff_assessment_view" tests @@ -1423,32 +1449,3 @@ def test_ora_indexibility_with_multiple_html_prompt(self, xblock): self.assertEqual(content["display_name"], "Open Response Assessment") self.assertEqual(content["prompt_0"], "What is computer? It is a machine") self.assertEqual(content["prompt_1"], "Is it a calculator? Or is it a microwave") - - - -class TestResourceLoaderImport(unittest.TestCase): - @patch('xblock.utils.resources') - def test_import_falls_back(self, mock_resources): - # Simulate a ModuleNotFoundError for the first import - mock_resources.ResourceLoader.side_effect = ModuleNotFoundError - - # Now try to import and check if the fallback works - try: - from openassessmentblock import ResourceLoader - except ImportError: - self.fail("Import should not raise ImportError") - - # Check if ResourceLoader is the one from xblockutils.resources - from xblockutils.resources import ResourceLoader as FallbackLoader - self.assertIs(ResourceLoader, FallbackLoader) - -class TestLoadFunction(unittest.TestCase): - @patch('openassessmentblock.resource_loader') # Patch the resource_loader variable directly - def test_load_calls_load_unicode(self, mock_resource_loader): - mock_resource_loader.load_unicode.return_value = "mocked resource content" - path = "some/path/to/resource" - - result = openassessmentblock.load(path) - - mock_resource_loader.load_unicode.assert_called_once_with(path) - self.assertEqual(result, "mocked resource content") From f6237b1e11a070129db86ca2b49c31a83d6916a5 Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Thu, 7 Nov 2024 14:49:43 +0500 Subject: [PATCH 8/9] fix: remove unnecessary imports --- openassessment/xblock/load_static.py | 5 +---- openassessment/xblock/test/test_openassessment.py | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/openassessment/xblock/load_static.py b/openassessment/xblock/load_static.py index 1bf39a26b6..b6abac2e04 100644 --- a/openassessment/xblock/load_static.py +++ b/openassessment/xblock/load_static.py @@ -6,10 +6,7 @@ from urllib.parse import urlparse from django.conf import settings -try: - from xblock.utils.resources import ResourceLoader -except ModuleNotFoundError: - from xblockutils.resources import ResourceLoader +from xblock.utils.resources import ResourceLoader logger = logging.getLogger(__name__) # pylint: disable=invalid-name diff --git a/openassessment/xblock/test/test_openassessment.py b/openassessment/xblock/test/test_openassessment.py index f1b0841a05..6fc7759444 100644 --- a/openassessment/xblock/test/test_openassessment.py +++ b/openassessment/xblock/test/test_openassessment.py @@ -5,8 +5,6 @@ import datetime as dt from io import StringIO import json -import unittest -import importlib from unittest import mock from unittest.mock import MagicMock, Mock, PropertyMock, patch from django.test.utils import override_settings From 8ea48d45b1a5ad37c46d0cb56c2b219d3e6df2da Mon Sep 17 00:00:00 2001 From: Muhammad Tayayb Tahir Qureshi Date: Fri, 8 Nov 2024 12:16:22 +0500 Subject: [PATCH 9/9] fix: fix coverage --- .../xblock/test/test_openassessment.py | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/openassessment/xblock/test/test_openassessment.py b/openassessment/xblock/test/test_openassessment.py index 6fc7759444..b9af7e50d8 100644 --- a/openassessment/xblock/test/test_openassessment.py +++ b/openassessment/xblock/test/test_openassessment.py @@ -5,6 +5,7 @@ import datetime as dt from io import StringIO import json +import unittest from unittest import mock from unittest.mock import MagicMock, Mock, PropertyMock, patch from django.test.utils import override_settings @@ -16,6 +17,7 @@ from lxml import etree from openassessment.workflow.errors import AssessmentWorkflowError from openassessment.xblock import openassessmentblock +from openassessment.xblock.openassessmentblock import load from openassessment.xblock.utils import defaults from openassessment.xblock.utils.resolve_dates import DateValidationError, DISTANT_FUTURE, DISTANT_PAST from openassessment.xblock.openassesment_template_mixin import UI_MODELS @@ -130,14 +132,6 @@ def test_load_author_view(self, xblock): self.assertIn("OpenAssessmentBlock", xblock_fragment.body_html()) self.assertIn("IS_STUDIO", xblock_fragment.body_html()) - # Test that calling update_workflow_status doesn't throw an error. - try: - xblock.update_workflow_status() - except AssessmentWorkflowError: - self.fail( - "update_workflow_status raised AssessmentWorkflowError unexpectedly!" - ) - def _staff_assessment_view_helper(self, xblock): """ Helper for "staff_assessment_view" tests @@ -1447,3 +1441,23 @@ def test_ora_indexibility_with_multiple_html_prompt(self, xblock): self.assertEqual(content["display_name"], "Open Response Assessment") self.assertEqual(content["prompt_0"], "What is computer? It is a machine") self.assertEqual(content["prompt_1"], "Is it a calculator? Or is it a microwave") + + +class TestLoadFunction(unittest.TestCase): + """Test case for the load function in openassessmentblock.py.""" + + @patch("openassessment.xblock.openassessmentblock.resource_loader.load_unicode") + def test_load_function(self, mock_load_unicode): + """ + Test that load calls resource_loader.load_unicode with the correct path. + """ + mock_load_unicode.return_value = "Sample content" + test_path = "sample/path/to/resource.html" + + result = load(test_path) + + # Check that resource_loader.load_unicode was called with the correct path + mock_load_unicode.assert_called_once_with(test_path) + + # Verify that load() returns the expected value + self.assertEqual(result, "Sample content")