diff --git a/plugins/tutor-contrib-learner-dashboard-mfe/setup.py b/plugins/tutor-contrib-learner-dashboard-mfe/setup.py index 3f9dcf7..692fc93 100644 --- a/plugins/tutor-contrib-learner-dashboard-mfe/setup.py +++ b/plugins/tutor-contrib-learner-dashboard-mfe/setup.py @@ -38,7 +38,7 @@ def load_about(): long_description=load_readme(), packages=find_packages(exclude=["tests*"]), include_package_data=True, - python_requires=">=3.8", + python_requires=">=3.11", install_requires=["tutor>=16.0.0,<17.0.0", "tutor-mfe>=16.0.0,<17.0.0"], extras_require={"dev": ["tutor[dev]>=16.0.0,<17.0.0"]}, entry_points={ @@ -52,9 +52,7 @@ def load_about(): "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], ) diff --git a/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/__about__.py b/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/__about__.py index 485f44a..d3ec452 100644 --- a/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/__about__.py +++ b/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/__about__.py @@ -1 +1 @@ -__version__ = "0.1.1" +__version__ = "0.2.0" diff --git a/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/plugin.py b/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/plugin.py index b678a5e..0be1901 100644 --- a/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/plugin.py +++ b/plugins/tutor-contrib-learner-dashboard-mfe/tutor_learner_dashboard_mfe/plugin.py @@ -4,7 +4,7 @@ import os.path from glob import glob -import pkg_resources +import importlib.resources from tutor import hooks from tutormfe.plugin import MFE_APPS @@ -47,10 +47,9 @@ def _add_my_mfe(mfes): # For each task added to MY_INIT_TASKS, we load the task template # and add it to the CLI_DO_INIT_TASKS filter, which tells Tutor to # run it as part of the `init` job. +file_path = importlib.resources.files("tutor_learner_dashboard_mfe") for service, template_path in MY_INIT_TASKS: - full_path: str = pkg_resources.resource_filename( - "tutor_learner_dashboard_mfe", os.path.join("templates", *template_path) - ) + full_path: str = file_path / os.path.join("templates", *template_path) with open(full_path, encoding="utf-8") as init_task_file: init_task: str = init_task_file.read() hooks.Filters.CLI_DO_INIT_TASKS.add_item((service, init_task)) @@ -78,7 +77,7 @@ def _add_my_mfe(mfes): # apply a patch based on the file's name and contents. for path in glob( os.path.join( - pkg_resources.resource_filename("tutor_learner_dashboard_mfe", "patches"), + importlib.resources.files("tutor_learner_dashboard_mfe") / "patches", "*", ) ):