diff --git a/lti_consumer/__init__.py b/lti_consumer/__init__.py index 22663674..2b17d2b7 100644 --- a/lti_consumer/__init__.py +++ b/lti_consumer/__init__.py @@ -4,4 +4,4 @@ from .apps import LTIConsumerApp from .lti_xblock import LtiConsumerXBlock -__version__ = '9.7.0' +__version__ = '9.8.0' diff --git a/lti_consumer/lti_1p1/contrib/django.py b/lti_consumer/lti_1p1/contrib/django.py index 31072e82..ade40902 100644 --- a/lti_consumer/lti_1p1/contrib/django.py +++ b/lti_consumer/lti_1p1/contrib/django.py @@ -3,7 +3,10 @@ """ # See comment in docstring for explanation of the usage of ResourceLoader -from xblockutils.resources import ResourceLoader +try: + from xblock.utils.resources import ResourceLoader +except ModuleNotFoundError: # For backward compatibility with releases older than Quince. + from xblockutils.resources import ResourceLoader from lti_consumer.track import track_event @@ -44,7 +47,7 @@ def lti_embed( generate any response to encapsulate this content. The caller of this method must render the HTML on their own. - Note: This method uses xblockutils.resources.ResourceLoader to load the HTML + Note: This method uses xblock.utils.resources.ResourceLoader to load the HTML template used. The rationale for this is that ResourceLoader is agnostic to XBlock code and functionality. It is recommended that this remain in use until LTI1.3 support is merged, or a better means of loading the template is diff --git a/lti_consumer/lti_xblock.py b/lti_consumer/lti_xblock.py index 50ec65f7..237c59e3 100644 --- a/lti_consumer/lti_xblock.py +++ b/lti_consumer/lti_xblock.py @@ -66,8 +66,12 @@ from xblock.core import List, Scope, String, XBlock from xblock.fields import Boolean, Float, Integer from xblock.validation import ValidationMessage -from xblockutils.resources import ResourceLoader -from xblockutils.studio_editable import StudioEditableXBlockMixin +try: + from xblock.utils.resources import ResourceLoader + from xblock.utils.studio_editable import StudioEditableXBlockMixin +except ModuleNotFoundError: # For backward compatibility with releases older than Quince. + from xblockutils.resources import ResourceLoader + from xblockutils.studio_editable import StudioEditableXBlockMixin from .data import Lti1p3LaunchData from .exceptions import LtiError diff --git a/lti_consumer/outcomes.py b/lti_consumer/outcomes.py index 94112ec5..72bc759c 100644 --- a/lti_consumer/outcomes.py +++ b/lti_consumer/outcomes.py @@ -10,7 +10,10 @@ from urllib.parse import unquote from lxml import etree -from xblockutils.resources import ResourceLoader +try: + from xblock.utils.resources import ResourceLoader +except ModuleNotFoundError: # For backward compatibility with releases older than Quince. + from xblockutils.resources import ResourceLoader from .exceptions import LtiError from .lti_1p1.oauth import verify_oauth_body_signature diff --git a/requirements/base.in b/requirements/base.in index 119c77f4..491efaa0 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -9,7 +9,6 @@ oauthlib mako lazy XBlock -xblock-utils pycryptodomex pyjwkest edx-opaque-keys[django] diff --git a/requirements/base.txt b/requirements/base.txt index 45a4e0a1..6b103b7c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -12,9 +12,9 @@ attrs==23.1.0 # via -r requirements/base.in bleach==6.1.0 # via -r requirements/base.in -boto3==1.28.74 +boto3==1.28.78 # via fs-s3fs -botocore==1.31.74 +botocore==1.31.78 # via # boto3 # s3transfer @@ -22,11 +22,11 @@ certifi==2023.7.22 # via requests cffi==1.16.0 # via pynacl -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via requests click==8.1.7 # via edx-django-utils -django==3.2.22 +django==3.2.23 # via # -c requirements/common_constraints.txt # -r requirements/base.in @@ -57,7 +57,7 @@ djangorestframework==3.14.0 # via django-config-models edx-ccx-keys==1.2.1 # via -r requirements/base.in -edx-django-utils==5.7.0 +edx-django-utils==5.8.0 # via django-config-models edx-opaque-keys[django]==2.5.1 # via @@ -81,9 +81,7 @@ jmespath==1.0.1 jsonfield==3.1.0 # via -r requirements/base.in lazy==1.6 - # via - # -r requirements/base.in - # xblock + # via -r requirements/base.in lxml==4.9.3 # via # -r requirements/base.in @@ -92,7 +90,6 @@ mako==1.2.4 # via # -r requirements/base.in # xblock - # xblock-utils markupsafe==2.1.3 # via # mako @@ -102,9 +99,7 @@ newrelic==9.1.1 oauthlib==3.2.2 # via -r requirements/base.in openedx-django-pyfs==3.4.0 - # via - # -r requirements/base.in - # xblock + # via -r requirements/base.in openedx-filters==1.6.0 # via -r requirements/base.in pbr==5.11.1 @@ -139,9 +134,7 @@ requests==2.31.0 s3transfer==0.7.0 # via boto3 simplejson==3.19.2 - # via - # xblock - # xblock-utils + # via xblock six==1.16.0 # via # bleach @@ -166,18 +159,12 @@ urllib3==1.26.18 # botocore # requests web-fragments==2.1.0 - # via - # xblock - # xblock-utils + # via xblock webencodings==0.5.1 # via bleach webob==1.8.7 # via xblock -xblock[django]==1.8.1 - # via - # -r requirements/base.in - # xblock-utils -xblock-utils==4.0.0 +xblock==1.8.1 # 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 03f078b3..3154abe6 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -29,11 +29,11 @@ binaryornot==0.4.4 # cookiecutter bleach==6.1.0 # via -r requirements/test.txt -boto3==1.28.74 +boto3==1.28.78 # via # -r requirements/test.txt # fs-s3fs -botocore==1.31.74 +botocore==1.31.78 # via # -r requirements/test.txt # boto3 @@ -51,7 +51,7 @@ chardet==5.2.0 # via # -r requirements/test.txt # binaryornot -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via # -r requirements/test.txt # requests @@ -95,7 +95,7 @@ distlib==0.3.7 # via # -r requirements/tox.txt # virtualenv -django==3.2.22 +django==3.2.23 # via # -c requirements/common_constraints.txt # -r requirements/test.txt @@ -143,7 +143,7 @@ docutils==0.20.1 # readme-renderer edx-ccx-keys==1.2.1 # via -r requirements/test.txt -edx-django-utils==5.7.0 +edx-django-utils==5.8.0 # via # -r requirements/test.txt # django-config-models @@ -217,9 +217,7 @@ keyring==24.2.0 # -r requirements/test.txt # twine lazy==1.6 - # via - # -r requirements/test.txt - # xblock + # via -r requirements/test.txt lxml==4.9.3 # via # -r requirements/test.txt @@ -229,7 +227,6 @@ mako==1.2.4 # via # -r requirements/test.txt # xblock - # xblock-utils markdown-it-py==3.0.0 # via # -r requirements/test.txt @@ -265,9 +262,7 @@ nh3==0.2.14 oauthlib==3.2.2 # via -r requirements/test.txt openedx-django-pyfs==3.4.0 - # via - # -r requirements/test.txt - # xblock + # via -r requirements/test.txt openedx-filters==1.6.0 # via -r requirements/test.txt packaging==23.2 @@ -411,7 +406,6 @@ simplejson==3.19.2 # -r requirements/test.txt # xblock # xblock-sdk - # xblock-utils six==1.16.0 # via # -r requirements/test.txt @@ -444,7 +438,7 @@ tomli==2.0.1 # -r requirements/tox.txt # pylint # tox -tomlkit==0.12.1 +tomlkit==0.12.2 # via # -r requirements/test.txt # pylint @@ -482,7 +476,6 @@ web-fragments==2.1.0 # -r requirements/test.txt # xblock # xblock-sdk - # xblock-utils webencodings==0.5.1 # via # -r requirements/test.txt @@ -492,16 +485,12 @@ webob==1.8.7 # -r requirements/test.txt # xblock # xblock-sdk -xblock[django]==1.8.1 +xblock==1.8.1 # via # -r requirements/test.txt - # xblock # xblock-sdk - # xblock-utils xblock-sdk==0.7.0 # via -r requirements/test.txt -xblock-utils==4.0.0 - # via -r requirements/test.txt zipp==3.17.0 # via # -r requirements/test.txt diff --git a/requirements/dev.txt b/requirements/dev.txt index 7c54cdaf..eab5b05c 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -16,11 +16,11 @@ attrs==23.1.0 # via -r requirements/base.txt bleach==6.1.0 # via -r requirements/base.txt -boto3==1.28.74 +boto3==1.28.78 # via # -r requirements/base.txt # fs-s3fs -botocore==1.31.74 +botocore==1.31.78 # via # -r requirements/base.txt # boto3 @@ -33,7 +33,7 @@ cffi==1.16.0 # via # -r requirements/base.txt # pynacl -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via # -r requirements/base.txt # requests @@ -41,7 +41,7 @@ click==8.1.7 # via # -r requirements/base.txt # edx-django-utils -django==3.2.22 +django==3.2.23 # via # -r requirements/base.txt # django-appconf @@ -80,7 +80,7 @@ djangorestframework==3.14.0 # django-config-models edx-ccx-keys==1.2.1 # via -r requirements/base.txt -edx-django-utils==5.7.0 +edx-django-utils==5.8.0 # via # -r requirements/base.txt # django-config-models @@ -117,9 +117,7 @@ jmespath==1.0.1 jsonfield==3.1.0 # via -r requirements/base.txt lazy==1.6 - # via - # -r requirements/base.txt - # xblock + # via -r requirements/base.txt lxml==4.9.3 # via # -r requirements/base.txt @@ -129,7 +127,6 @@ mako==1.2.4 # via # -r requirements/base.txt # xblock - # xblock-utils markupsafe==2.1.3 # via # -r requirements/base.txt @@ -142,9 +139,7 @@ newrelic==9.1.1 oauthlib==3.2.2 # via -r requirements/base.txt openedx-django-pyfs==3.4.0 - # via - # -r requirements/base.txt - # xblock + # via -r requirements/base.txt openedx-filters==1.6.0 # via -r requirements/base.txt path==16.7.1 @@ -205,7 +200,6 @@ simplejson==3.19.2 # via # -r requirements/base.txt # xblock - # xblock-utils six==1.16.0 # via # -r requirements/base.txt @@ -238,7 +232,6 @@ web-fragments==2.1.0 # via # -r requirements/base.txt # xblock - # xblock-utils webencodings==0.5.1 # via # -r requirements/base.txt @@ -247,12 +240,7 @@ webob==1.8.7 # via # -r requirements/base.txt # xblock -xblock[django]==1.8.1 - # via - # -r requirements/base.txt - # xblock - # xblock-utils -xblock-utils==4.0.0 +xblock==1.8.1 # via -r requirements/base.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/django.txt b/requirements/django.txt index 5a28da34..d296127a 100644 --- a/requirements/django.txt +++ b/requirements/django.txt @@ -1 +1 @@ -django==3.2.22 +django==3.2.23 diff --git a/requirements/quality.txt b/requirements/quality.txt index 3a3dcbc8..71210123 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -24,11 +24,11 @@ binaryornot==0.4.4 # via cookiecutter bleach==6.1.0 # via -r requirements/base.txt -boto3==1.28.74 +boto3==1.28.78 # via # -r requirements/base.txt # fs-s3fs -botocore==1.31.74 +botocore==1.31.78 # via # -r requirements/base.txt # boto3 @@ -43,7 +43,7 @@ cffi==1.16.0 # pynacl chardet==5.2.0 # via binaryornot -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via # -r requirements/base.txt # requests @@ -65,7 +65,7 @@ ddt==1.6.0 # via -r requirements/quality.in dill==0.3.7 # via pylint -django==3.2.22 +django==3.2.23 # via # -c requirements/common_constraints.txt # -r requirements/base.txt @@ -105,7 +105,7 @@ djangorestframework==3.14.0 # django-config-models edx-ccx-keys==1.2.1 # via -r requirements/base.txt -edx-django-utils==5.7.0 +edx-django-utils==5.8.0 # via # -r requirements/base.txt # django-config-models @@ -149,9 +149,7 @@ jmespath==1.0.1 jsonfield==3.1.0 # via -r requirements/base.txt lazy==1.6 - # via - # -r requirements/base.txt - # xblock + # via -r requirements/base.txt lxml==4.9.3 # via # -r requirements/base.txt @@ -161,7 +159,6 @@ mako==1.2.4 # via # -r requirements/base.txt # xblock - # xblock-utils markdown-it-py==3.0.0 # via rich markupsafe==2.1.3 @@ -181,9 +178,7 @@ newrelic==9.1.1 oauthlib==3.2.2 # via -r requirements/base.txt openedx-django-pyfs==3.4.0 - # via - # -r requirements/base.txt - # xblock + # via -r requirements/base.txt openedx-filters==1.6.0 # via -r requirements/base.txt pbr==5.11.1 @@ -274,7 +269,6 @@ simplejson==3.19.2 # -r requirements/base.txt # xblock # xblock-sdk - # xblock-utils six==1.16.0 # via # -r requirements/base.txt @@ -299,7 +293,7 @@ text-unidecode==1.3 # via python-slugify tomli==2.0.1 # via pylint -tomlkit==0.12.1 +tomlkit==0.12.2 # via pylint types-python-dateutil==2.8.19.14 # via arrow @@ -322,7 +316,6 @@ web-fragments==2.1.0 # -r requirements/base.txt # xblock # xblock-sdk - # xblock-utils webencodings==0.5.1 # via # -r requirements/base.txt @@ -332,16 +325,12 @@ webob==1.8.7 # -r requirements/base.txt # xblock # xblock-sdk -xblock[django]==1.8.1 +xblock==1.8.1 # via # -r requirements/base.txt - # xblock # xblock-sdk - # xblock-utils xblock-sdk==0.7.0 # via -r requirements/quality.in -xblock-utils==4.0.0 - # via -r requirements/base.txt # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/test.txt b/requirements/test.txt index 02ab419b..92475f6f 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -24,11 +24,11 @@ binaryornot==0.4.4 # via cookiecutter bleach==6.1.0 # via -r requirements/base.txt -boto3==1.28.74 +boto3==1.28.78 # via # -r requirements/base.txt # fs-s3fs -botocore==1.31.74 +botocore==1.31.78 # via # -r requirements/base.txt # boto3 @@ -44,7 +44,7 @@ cffi==1.16.0 # pynacl chardet==5.2.0 # via binaryornot -charset-normalizer==3.3.1 +charset-normalizer==3.3.2 # via # -r requirements/base.txt # requests @@ -116,7 +116,7 @@ docutils==0.20.1 # via readme-renderer edx-ccx-keys==1.2.1 # via -r requirements/base.txt -edx-django-utils==5.7.0 +edx-django-utils==5.8.0 # via # -r requirements/base.txt # django-config-models @@ -174,9 +174,7 @@ jsonfield==3.1.0 keyring==24.2.0 # via twine lazy==1.6 - # via - # -r requirements/base.txt - # xblock + # via -r requirements/base.txt lxml==4.9.3 # via # -r requirements/base.txt @@ -186,7 +184,6 @@ mako==1.2.4 # via # -r requirements/base.txt # xblock - # xblock-utils markdown-it-py==3.0.0 # via rich markupsafe==2.1.3 @@ -212,9 +209,7 @@ nh3==0.2.14 oauthlib==3.2.2 # via -r requirements/base.txt openedx-django-pyfs==3.4.0 - # via - # -r requirements/base.txt - # xblock + # via -r requirements/base.txt openedx-filters==1.6.0 # via -r requirements/base.txt pbr==5.11.1 @@ -323,7 +318,6 @@ simplejson==3.19.2 # -r requirements/base.txt # xblock # xblock-sdk - # xblock-utils six==1.16.0 # via # -r requirements/base.txt @@ -348,7 +342,7 @@ text-unidecode==1.3 # via python-slugify tomli==2.0.1 # via pylint -tomlkit==0.12.1 +tomlkit==0.12.2 # via pylint twine==4.0.2 # via -r requirements/test.in @@ -374,7 +368,6 @@ web-fragments==2.1.0 # -r requirements/base.txt # xblock # xblock-sdk - # xblock-utils webencodings==0.5.1 # via # -r requirements/base.txt @@ -384,16 +377,12 @@ webob==1.8.7 # -r requirements/base.txt # xblock # xblock-sdk -xblock[django]==1.8.1 +xblock==1.8.1 # via # -r requirements/base.txt - # xblock # xblock-sdk - # xblock-utils xblock-sdk==0.7.0 # via -r requirements/test.in -xblock-utils==4.0.0 - # via -r requirements/base.txt zipp==3.17.0 # via # importlib-metadata