diff --git a/done/__init__.py b/done/__init__.py index f4aeb50..dc3da31 100644 --- a/done/__init__.py +++ b/done/__init__.py @@ -4,4 +4,4 @@ from .done import DoneXBlock -__version__ = '2.3.0' +__version__ = '2.4.0' diff --git a/done/done.py b/done/done.py index b311507..1441da2 100644 --- a/done/done.py +++ b/done/done.py @@ -5,7 +5,7 @@ import uuid -import pkg_resources +import importlib.resources from web_fragments.fragment import Fragment from xblock.core import XBlock from xblock.fields import Boolean, DateTime, Float, Scope, String @@ -26,8 +26,8 @@ def _(text): def resource_string(path): """Handy helper for getting resources from our kit.""" - data = pkg_resources.resource_string(__name__, path) - return data.decode("utf8") + data = importlib.resources.files(__package__).joinpath(path) + return data.read_text(encoding="utf8") @XBlock.needs('i18n')