-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider merging request-schema.json into a .py file #166
Comments
Yes, good idea. Can’t see any reason not to do this. |
bcb
added a commit
that referenced
this issue
Jul 3, 2021
Stop using the global schema in pure functions. Also now properly allows custom schema validators. Next step for fixing schema validation is #166
Merged
bcb
added a commit
that referenced
this issue
Jul 3, 2021
* Fix schema validation Stop using the global schema in pure functions. Also now properly allows custom schema validators. Next step for fixing schema validation is #166 * Remove unused "validate" function
This would also avoid the warning that I get with python 3.12: .../lib/python3.12/site-packages/jsonrpcserver/__init__.py:19: in <module>
from .async_main import (
.../lib/python3.12/site-packages/jsonrpcserver/async_main.py:7: in <module>
from .main import default_validator, default_deserializer
.../lib/python3.12/site-packages/jsonrpcserver/main.py:29: in <module>
schema = json.loads(importlib.resources.read_text(__package__, "request-schema.json"))
/usr/lib/python3.12/importlib/resources/_legacy.py:25: in wrapper
return func(*args, **kwargs)
/usr/lib/python3.12/importlib/resources/_legacy.py:79: in read_text
with open_text(package, resource, encoding, errors) as fp:
/usr/lib/python3.12/importlib/resources/_legacy.py:18: in wrapper
warnings.warn(
E DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice. |
Fixed in the version 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I've hit a little issue when using
jsonrpcserver
with PyInstaller:I've submitted a simple hook for PyInstaller which fixes this but I've hit similar issues with python packaging and non-py files many times in the past and I suggest you consider moving the
.json
data into a.py
file unless there's a good reason not to - it can be a newrequest_schema.py
or any of existing files.This would prevent similar problems with python packaging in various tools without requiring additional effort.
Either way, thanks for the nice library ♥
The text was updated successfully, but these errors were encountered: