Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jsonrpcserver/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import json

from jsonschema.validators import validator_for # type: ignore
from pkg_resources import resource_string
import importlib.resources

from .dispatcher import dispatch_to_response_pure, Deserialized
from .methods import Methods, global_methods
Expand All @@ -26,7 +26,7 @@

# Prepare the jsonschema validator. This is global so it loads only once, not every
# time dispatch is called.
schema = json.loads(resource_string(__name__, "request-schema.json"))
schema = json.loads(importlib.resources.read_text(__package__, "request-schema.json"))
klass = validator_for(schema)
klass.check_schema(schema)
default_validator = klass(schema).validate
Expand Down