From 3aca95729e98e8c79f9b38e8c0cb927efd48148a Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Sat, 27 Apr 2024 00:26:04 +0500 Subject: [PATCH] fix: remove deprecated xblock.fragment import --- image_explorer/__init__.py | 2 +- image_explorer/image_explorer.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/image_explorer/__init__.py b/image_explorer/__init__.py index 467efa7..ed06a21 100644 --- a/image_explorer/__init__.py +++ b/image_explorer/__init__.py @@ -22,4 +22,4 @@ """ from .image_explorer import ImageExplorerBlock -__version__ = '2.2.1' +__version__ = '2.2.2' diff --git a/image_explorer/image_explorer.py b/image_explorer/image_explorer.py index a3075a2..668f1e5 100644 --- a/image_explorer/image_explorer.py +++ b/image_explorer/image_explorer.py @@ -37,7 +37,11 @@ from parsel import Selector from xblock.completable import XBlockCompletionMode from xblock.core import XBlock -from xblock.fragment import Fragment +try: + from web_fragments.fragment import Fragment +except: + # for backwards compatibility with quince and prior releases + from xblock.fragment import Fragment from xblock.fields import List, Scope, String, Boolean from .utils import loader, AttrDict, _