robotcode-jsonrpc2 1.3.0.dev6__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/PKG-INFO +2 -2
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/pyproject.toml +1 -1
- robotcode_jsonrpc2-1.5.0/src/robotcode/jsonrpc2/__version__.py +1 -0
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/src/robotcode/jsonrpc2/protocol.py +7 -4
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/src/robotcode/jsonrpc2/server.py +2 -1
- robotcode_jsonrpc2-1.3.0.dev6/src/robotcode/jsonrpc2/__version__.py +0 -1
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/.gitignore +0 -0
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/LICENSE.txt +0 -0
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/README.md +0 -0
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/src/robotcode/jsonrpc2/__init__.py +0 -0
- {robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/src/robotcode/jsonrpc2/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotcode-jsonrpc2
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: JSONRPC Server for RobotCode
|
|
5
5
|
Project-URL: Homepage, https://robotcode.io
|
|
6
6
|
Project-URL: Donate, https://opencollective.com/robotcode
|
|
@@ -25,7 +25,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
|
25
25
|
Classifier: Topic :: Utilities
|
|
26
26
|
Classifier: Typing :: Typed
|
|
27
27
|
Requires-Python: >=3.8
|
|
28
|
-
Requires-Dist: robotcode-core==1.
|
|
28
|
+
Requires-Dist: robotcode-core==1.5.0
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
31
31
|
# robotcode-jsonrpc2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.5.0"
|
{robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/src/robotcode/jsonrpc2/protocol.py
RENAMED
|
@@ -196,7 +196,7 @@ def rpc_method(
|
|
|
196
196
|
if isinstance(func, classmethod):
|
|
197
197
|
f = func.__func__ # type: ignore
|
|
198
198
|
elif isinstance(func, staticmethod):
|
|
199
|
-
f = func.__func__
|
|
199
|
+
f = func.__func__
|
|
200
200
|
else:
|
|
201
201
|
f = func
|
|
202
202
|
|
|
@@ -500,7 +500,7 @@ class JsonRPCProtocol(JsonRPCProtocolBase):
|
|
|
500
500
|
raise
|
|
501
501
|
except BaseException as e:
|
|
502
502
|
self.__logger.exception(e)
|
|
503
|
-
self.send_error(JsonRPCErrors.PARSE_ERROR, f"{
|
|
503
|
+
self.send_error(JsonRPCErrors.PARSE_ERROR, f"{e}")
|
|
504
504
|
|
|
505
505
|
def _handle_messages(self, iterator: Iterator[JsonRPCMessage]) -> None:
|
|
506
506
|
for m in iterator:
|
|
@@ -786,6 +786,9 @@ class JsonRPCProtocol(JsonRPCProtocolBase):
|
|
|
786
786
|
ex = t.exception()
|
|
787
787
|
if ex is not None:
|
|
788
788
|
self.__logger.exception(ex, exc_info=ex)
|
|
789
|
+
if isinstance(ex, JsonRPCErrorException):
|
|
790
|
+
raise ex
|
|
791
|
+
|
|
789
792
|
raise JsonRPCErrorException(
|
|
790
793
|
JsonRPCErrors.INTERNAL_ERROR,
|
|
791
794
|
f"{type(ex).__name__}: {ex}",
|
|
@@ -804,7 +807,7 @@ class JsonRPCProtocol(JsonRPCProtocolBase):
|
|
|
804
807
|
except JsonRPCErrorException as e:
|
|
805
808
|
self.send_error(
|
|
806
809
|
e.code,
|
|
807
|
-
e.message or f"{
|
|
810
|
+
e.message or f"{e}",
|
|
808
811
|
id=message.id,
|
|
809
812
|
data=e.data,
|
|
810
813
|
)
|
|
@@ -812,7 +815,7 @@ class JsonRPCProtocol(JsonRPCProtocolBase):
|
|
|
812
815
|
self.__logger.exception(e)
|
|
813
816
|
self.send_error(
|
|
814
817
|
JsonRPCErrors.INTERNAL_ERROR,
|
|
815
|
-
f"{
|
|
818
|
+
f"{e}",
|
|
816
819
|
id=message.id,
|
|
817
820
|
)
|
|
818
821
|
|
|
@@ -6,6 +6,7 @@ import threading
|
|
|
6
6
|
from concurrent.futures import ThreadPoolExecutor
|
|
7
7
|
from types import TracebackType
|
|
8
8
|
from typing import (
|
|
9
|
+
Any,
|
|
9
10
|
BinaryIO,
|
|
10
11
|
Callable,
|
|
11
12
|
Coroutine,
|
|
@@ -44,7 +45,7 @@ class StdOutTransportAdapter(asyncio.Transport):
|
|
|
44
45
|
self.rfile.close()
|
|
45
46
|
self.wfile.close()
|
|
46
47
|
|
|
47
|
-
def write(self, data: bytes) -> None:
|
|
48
|
+
def write(self, data: "bytes | bytearray | memoryview[Any]") -> None:
|
|
48
49
|
self.wfile.write(data)
|
|
49
50
|
self.wfile.flush()
|
|
50
51
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.3.0-dev.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robotcode_jsonrpc2-1.3.0.dev6 → robotcode_jsonrpc2-1.5.0}/src/robotcode/jsonrpc2/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|