diff --git a/changelog.d/20240212_115536_regis_pkg_resources.md b/changelog.d/20240212_115536_regis_pkg_resources.md new file mode 100644 index 0000000..35b6d20 --- /dev/null +++ b/changelog.d/20240212_115536_regis_pkg_resources.md @@ -0,0 +1 @@ +- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb) diff --git a/tutorxqueue/plugin.py b/tutorxqueue/plugin.py index d5f143a..25ac8e3 100644 --- a/tutorxqueue/plugin.py +++ b/tutorxqueue/plugin.py @@ -6,10 +6,9 @@ from typing import Any, Literal, Optional, Union import click -import pkg_resources +import importlib_resources import requests # type: ignore from tutor import config as tutor_config -from tutor.__about__ import __version_suffix__ from tutor import exceptions from tutor import hooks as tutor_hooks from tutor.__about__ import __version_suffix__ @@ -39,22 +38,17 @@ } # Initialization hooks - -# To add a custom initialization task, create a bash script template under: -# tutorxqueue/templates/xqueue/tasks/ -# and then add it to the MY_INIT_TASKS list. Each task is in the format: -# ("", ("", "", "