From 5d5241d198e57dd72cf254727bb5e7f8c3780f87 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sun, 18 Feb 2024 20:23:58 +0330 Subject: [PATCH] fix: remove pkg_resources for compatibility with python 3.12 pkg_resources is a package that is unavailable in python 3.12, unless setuptools is explicitely installed. Turns out, there are replacement functions coming from importlib_resources, which can be obtained from the importlib-resources pypi package. This package will be installed with tutor starting from 17.0.2. --- CHANGELOG.md | 1 + docs/migrating-from-v0-plugins.rst | 11 ++++------- .../{{ cookiecutter.module_name }}/plugin.py | 16 ++++++---------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7161989..d0f841c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Please respect the following instructions: ## 2024-01-01 - [Improvement] Happy New Year! + - Fix compatibility issue with Python 3.12 by removing dependency on `pkg_resources`. - Cookiecutter hooks to check input data validation. - Various licenses support. - New documentation format. diff --git a/docs/migrating-from-v0-plugins.rst b/docs/migrating-from-v0-plugins.rst index 8054819..836e5e8 100644 --- a/docs/migrating-from-v0-plugins.rst +++ b/docs/migrating-from-v0-plugins.rst @@ -83,7 +83,7 @@ The plugin API was upgraded from ``v0`` to ``v1`` in `Tutor v13.2.0