commit: 85b6342060a136c6d54ddf6b8295229ad1454715 Author: David Roman <davidroman96 <AT> gmail <DOT> com> AuthorDate: Thu Apr 25 19:07:05 2024 +0000 Commit: Julien Roy <julien <AT> jroy <DOT> ca> CommitDate: Thu Apr 25 19:07:40 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=85b63420
dev-python/flask-restx: avoid importlib-resources dep Signed-off-by: David Roman <davidroman96 <AT> gmail.com> .../flask-restx-avoid-importlib_resources.patch | 22 ++++++++++++++++++++++ dev-python/flask-restx/flask-restx-1.3.0.ebuild | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dev-python/flask-restx/files/flask-restx-avoid-importlib_resources.patch b/dev-python/flask-restx/files/flask-restx-avoid-importlib_resources.patch new file mode 100644 index 0000000000..cda8a054f7 --- /dev/null +++ b/dev-python/flask-restx/files/flask-restx-avoid-importlib_resources.patch @@ -0,0 +1,22 @@ +diff --git a/flask_restx/schemas/__init__.py b/flask_restx/schemas/__init__.py +index 27b9866..4369737 100644 +--- a/flask_restx/schemas/__init__.py ++++ b/flask_restx/schemas/__init__.py +@@ -7,7 +7,7 @@ and allows to validate specs against them. + import io + import json + +-import importlib_resources ++import importlib.resources + + from collections.abc import Mapping + from jsonschema import Draft4Validator +@@ -57,7 +57,7 @@ class LazySchema(Mapping): + + def _load(self): + if not self._schema: +- ref = importlib_resources.files(__name__) / self.filename ++ ref = importlib.resources.files(__name__) / self.filename + + with io.open(ref) as infile: + self._schema = json.load(infile) diff --git a/dev-python/flask-restx/flask-restx-1.3.0.ebuild b/dev-python/flask-restx/flask-restx-1.3.0.ebuild index 51c5db5d93..3acfd76212 100644 --- a/dev-python/flask-restx/flask-restx-1.3.0.ebuild +++ b/dev-python/flask-restx/flask-restx-1.3.0.ebuild @@ -23,7 +23,6 @@ RDEPEND=" dev-python/pytz[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] dev-python/werkzeug[${PYTHON_USEDEP}] - dev-python/importlib-resources[${PYTHON_USEDEP}] " DEPEND="${RDEPEND} @@ -36,6 +35,8 @@ DEPEND="${RDEPEND} ) " +PATCHES=( "${FILESDIR}/${PN}-avoid-importlib_resources.patch" ) + distutils_enable_tests pytest python_test() {