summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.8.bb (renamed from meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.7.bb)2
-rw-r--r--recipes-devtools/python/python3-jsonrpcserver/0001-Use-importlib.resources-instead-of-pkg_resources.patch44
-rw-r--r--recipes-devtools/python/python3-jsonrpcserver_%.bbappend5
3 files changed, 1 insertions, 50 deletions
diff --git a/meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.7.bb b/meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.8.bb
index 12e9003798..6dff9b85bf 100644
--- a/meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.7.bb
+++ b/meta-python/recipes-devtools/python/python3-jsonrpcserver_5.0.8.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/explodinglabs/jsonrpcserver"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=61b63ea9d36f6fb63ddaaaac8265304f" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=61b63ea9d36f6fb63ddaaaac8265304f"
5 5
6SRC_URI[sha256sum] = "b15d3fd043ad0c40b2ff17f7df2ddaec2e880bb923b40d133939a107c97fde5c" 6SRC_URI[sha256sum] = "5150071e4abc9a93f086aa0fd0004dfe0410de66adfaaf513613baa2c2fc00d7"
7 7
8inherit pypi setuptools3 8inherit pypi setuptools3
9 9
diff --git a/recipes-devtools/python/python3-jsonrpcserver/0001-Use-importlib.resources-instead-of-pkg_resources.patch b/recipes-devtools/python/python3-jsonrpcserver/0001-Use-importlib.resources-instead-of-pkg_resources.patch
deleted file mode 100644
index 2d1a8c97c9..0000000000
--- a/recipes-devtools/python/python3-jsonrpcserver/0001-Use-importlib.resources-instead-of-pkg_resources.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 4220c6a02bc03ff8c6cc4b3bee168a1351a3ce39 Mon Sep 17 00:00:00 2001
2From: Sam Van Den Berge <sam.van.den.berge@gmail.com>
3Date: Fri, 29 Jul 2022 15:53:37 +0200
4Subject: [PATCH] Use importlib.resources instead of pkg_resources
5
6From the setuptools website [1]:
7
8Use of pkg_resources is discouraged in favor of importlib.resources,
9importlib.metadata, and their backports (importlib_resources,
10importlib_metadata). Please consider using those libraries instead of
11pkg_resources.
12
13[1]: https://setuptools.pypa.io/en/latest/pkg_resources.html
14
15Signed-off-by: Sam Van Den Berge <sam.van.den.berge@gmail.com>
16---
17 jsonrpcserver/main.py | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/jsonrpcserver/main.py b/jsonrpcserver/main.py
21index 0397a58..ac1855f 100644
22--- a/jsonrpcserver/main.py
23+++ b/jsonrpcserver/main.py
24@@ -13,7 +13,7 @@ from typing import Any, Callable, Dict, List, Optional, Union, cast
25 import json
26
27 from jsonschema.validators import validator_for # type: ignore
28-from pkg_resources import resource_string
29+import importlib.resources
30
31 from .dispatcher import dispatch_to_response_pure, Deserialized
32 from .methods import Methods, global_methods
33@@ -26,7 +26,7 @@ default_deserializer = json.loads
34
35 # Prepare the jsonschema validator. This is global so it loads only once, not every
36 # time dispatch is called.
37-schema = json.loads(resource_string(__name__, "request-schema.json"))
38+schema = json.loads(importlib.resources.read_text(__package__, "request-schema.json"))
39 klass = validator_for(schema)
40 klass.check_schema(schema)
41 default_validator = klass(schema).validate
42--
432.34.1
44
diff --git a/recipes-devtools/python/python3-jsonrpcserver_%.bbappend b/recipes-devtools/python/python3-jsonrpcserver_%.bbappend
deleted file mode 100644
index 23cdf070bd..0000000000
--- a/recipes-devtools/python/python3-jsonrpcserver_%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2
3SRC_URI = "\
4 file://0001-Use-importlib.resources-instead-of-pkg_resources.patch \
5"