robotcode-jsonrpc2 0.99.0__tar.gz → 0.100.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robotcode-jsonrpc2
3
- Version: 0.99.0
3
+ Version: 0.100.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
@@ -24,7 +24,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
24
24
  Classifier: Topic :: Utilities
25
25
  Classifier: Typing :: Typed
26
26
  Requires-Python: >=3.8
27
- Requires-Dist: robotcode-core==0.99.0
27
+ Requires-Dist: robotcode-core==0.100.0
28
28
  Description-Content-Type: text/markdown
29
29
 
30
30
  # robotcode-jsonrpc2
@@ -25,7 +25,7 @@ classifiers = [
25
25
  "Framework :: Robot Framework",
26
26
  "Framework :: Robot Framework :: Tool",
27
27
  ]
28
- dependencies = ["robotcode-core==0.99.0"]
28
+ dependencies = ["robotcode-core==0.100.0"]
29
29
  dynamic = ["version"]
30
30
 
31
31
  [project.urls]
@@ -0,0 +1 @@
1
+ __version__ = "0.100.0"
@@ -40,24 +40,24 @@ from robotcode.core.utils.inspect import ensure_coroutine, iter_methods
40
40
  from robotcode.core.utils.logging import LoggingDescriptor
41
41
 
42
42
  __all__ = [
43
- "JsonRPCErrors",
44
- "JsonRPCMessage",
45
- "JsonRPCNotification",
46
- "JsonRPCRequest",
47
- "JsonRPCResponse",
43
+ "GenericJsonRPCProtocolPart",
44
+ "InvalidProtocolVersionError",
48
45
  "JsonRPCError",
46
+ "JsonRPCErrorException",
49
47
  "JsonRPCErrorObject",
50
- "JsonRPCProtocol",
48
+ "JsonRPCErrors",
51
49
  "JsonRPCException",
50
+ "JsonRPCMessage",
51
+ "JsonRPCNotification",
52
52
  "JsonRPCParseError",
53
- "InvalidProtocolVersionError",
54
- "rpc_method",
55
- "RpcRegistry",
53
+ "JsonRPCProtocol",
56
54
  "JsonRPCProtocolPart",
55
+ "JsonRPCRequest",
56
+ "JsonRPCResponse",
57
57
  "ProtocolPartDescriptor",
58
- "GenericJsonRPCProtocolPart",
58
+ "RpcRegistry",
59
59
  "TProtocol",
60
- "JsonRPCErrorException",
60
+ "rpc_method",
61
61
  ]
62
62
 
63
63
  _T = TypeVar("_T")
@@ -278,8 +278,7 @@ class RpcRegistry:
278
278
  iter_methods(
279
279
  obj,
280
280
  lambda m2: isinstance(m2, RpcMethod)
281
- or inspect.ismethod(m2)
282
- and isinstance(m2.__func__, RpcMethod),
281
+ or (inspect.ismethod(m2) and isinstance(m2.__func__, RpcMethod)),
283
282
  ),
284
283
  )
285
284
  }
@@ -85,7 +85,7 @@ class JsonRPCServer(Generic[TProtocol], abc.ABC):
85
85
  elif self.mode == ServerMode.TCP:
86
86
  self.loop.run_until_complete(self.start_tcp(self.tcp_params.host, self.tcp_params.port))
87
87
  elif self.mode == ServerMode.PIPE:
88
- self.start_pipe(self.pipe_name)
88
+ self.loop.run_until_complete(self.start_pipe(self.pipe_name))
89
89
  elif self.mode == ServerMode.PIPE_SERVER:
90
90
  self.loop.run_until_complete(self.start_pipe_server(self.pipe_name))
91
91
  elif self.mode == ServerMode.SOCKET:
@@ -212,7 +212,7 @@ class JsonRPCServer(Generic[TProtocol], abc.ABC):
212
212
  self._run_func = self.loop.run_forever
213
213
 
214
214
  @_logger.call
215
- def start_pipe(self, pipe_name: Optional[str]) -> None:
215
+ async def start_pipe(self, pipe_name: Optional[str]) -> None:
216
216
  from typing import TYPE_CHECKING
217
217
 
218
218
  if pipe_name is None:
@@ -227,15 +227,14 @@ class JsonRPCServer(Generic[TProtocol], abc.ABC):
227
227
  if TYPE_CHECKING:
228
228
  from asyncio.windows_events import ProactorEventLoop
229
229
 
230
- self.loop.run_until_complete(
231
- cast("ProactorEventLoop", self.loop).create_pipe_connection(
232
- lambda: cast(
233
- "asyncio.StreamReaderProtocol",
234
- self.create_protocol(),
235
- ),
236
- pipe_name,
237
- )
230
+ await cast("ProactorEventLoop", self.loop).create_pipe_connection(
231
+ lambda: cast(
232
+ "asyncio.StreamReaderProtocol",
233
+ self.create_protocol(),
234
+ ),
235
+ pipe_name,
238
236
  )
237
+
239
238
  else:
240
239
  self.loop.run_until_complete(self.loop.create_unix_connection(self.create_protocol, pipe_name))
241
240
  except NotImplementedError as e:
@@ -1 +0,0 @@
1
- __version__ = "0.99.0"