mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
dev-python/flask-restx: avoid importlib-resources dep
Signed-off-by: David Roman <davidroman96@gmail.com>
This commit is contained in:
@@ -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)
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user