From 6b6e8b76c2d17d6251ad7010f365f4e1617ee98c Mon Sep 17 00:00:00 2001 From: Abdullah Qureshi <111448185+arbimaq@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:54:57 +0500 Subject: [PATCH 1/2] feat: remove xblockutils in favor of xblock.utils --- recommender/recommender.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recommender/recommender.py b/recommender/recommender.py index 38f9157..6a81552 100644 --- a/recommender/recommender.py +++ b/recommender/recommender.py @@ -24,7 +24,7 @@ from xblock.fields import Scope, List, Dict, Boolean, String, JSONField from web_fragments.fragment import Fragment from xblock.reference.plugins import Filesystem -from xblockutils.resources import ResourceLoader +from xblock.utils.resources import ResourceLoader # TODO: Should be updated once XBlocks and tracking logs have finalized APIs # and documentation. From 9c4b4337ebc28c75d1a2bbd9d96e42ef55290194 Mon Sep 17 00:00:00 2001 From: Abdullah Qureshi <111448185+arbimaq@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:37:04 +0500 Subject: [PATCH 2/2] feat: add backward compatibility for xblockutils --- recommender/recommender.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recommender/recommender.py b/recommender/recommender.py index 6a81552..3ad6101 100644 --- a/recommender/recommender.py +++ b/recommender/recommender.py @@ -24,7 +24,10 @@ from xblock.fields import Scope, List, Dict, Boolean, String, JSONField from web_fragments.fragment import Fragment from xblock.reference.plugins import Filesystem -from xblock.utils.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 # TODO: Should be updated once XBlocks and tracking logs have finalized APIs # and documentation.