robotcode-repl-server 0.102.0__py3-none-any.whl → 0.103.0__py3-none-any.whl

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 +1 @@
1
- __version__ = "0.102.0"
1
+ __version__ = "0.103.0"
@@ -108,11 +108,14 @@ class Interpreter(BaseInterpreter):
108
108
  self.files = files
109
109
  self.has_input = Event()
110
110
  self.executed = Event()
111
+ self.no_execution = Event()
112
+ self.no_execution.set()
111
113
  self._code: List[str] = []
112
114
  self._success: Optional[bool] = None
113
115
  self._result_data: Optional[ResultData] = None
114
116
  self._result_data_stack: List[ResultData] = []
115
117
  self.collect_messages: bool = False
118
+ self._interrupted = False
116
119
  self._has_shutdown = False
117
120
  self._cell_errors: List[str] = []
118
121
 
@@ -122,11 +125,17 @@ class Interpreter(BaseInterpreter):
122
125
  self.has_input.set()
123
126
 
124
127
  def execute(self, source: str) -> ExecutionResult:
128
+ self.no_execution.wait()
129
+
130
+ self.no_execution.clear()
131
+
125
132
  self._result_data_stack = []
126
133
 
127
134
  self._success = None
128
135
  try:
129
136
  self._cell_errors = []
137
+ self._interrupted = False
138
+
130
139
  self._result_data = RootResultData()
131
140
 
132
141
  self.executed.clear()
@@ -159,6 +168,8 @@ class Interpreter(BaseInterpreter):
159
168
  )
160
169
  except BaseException as e:
161
170
  return ExecutionResult(False, [ExecutionOutput("application/vnd.code.notebook.stderr", str(e))])
171
+ finally:
172
+ self.no_execution.set()
162
173
 
163
174
  def get_input(self) -> Iterator[Optional[Keyword]]:
164
175
  while self._code:
@@ -17,9 +17,13 @@ class ReplServerProtocol(JsonRPCProtocol):
17
17
  return "yeah initialized " + message
18
18
 
19
19
  @rpc_method(name="executeCell", threaded=True)
20
- def execute_cell(self, source: str) -> Optional[ExecutionResult]:
20
+ def execute_cell(self, source: str, language_id: str) -> Optional[ExecutionResult]:
21
21
  return self.interpreter.execute(source)
22
22
 
23
+ @rpc_method(name="interrupt", threaded=True)
24
+ def interrupt(self) -> None:
25
+ self.interpreter.interrupt()
26
+
23
27
  @rpc_method(name="shutdown", threaded=True)
24
28
  def shutdown(self) -> None:
25
29
  try:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: robotcode-repl-server
3
- Version: 0.102.0
3
+ Version: 0.103.0
4
4
  Summary: RobotCode REPL Server for Robot Framework
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -10,6 +10,7 @@ Project-URL: Issues, https://github.com/robotcodedev/robotcode/issues
10
10
  Project-URL: Source, https://github.com/robotcodedev/robotcode
11
11
  Author-email: Daniel Biehl <dbiehl@live.de>
12
12
  License: Apache-2.0
13
+ License-File: LICENSE.txt
13
14
  Classifier: Development Status :: 5 - Production/Stable
14
15
  Classifier: Framework :: Robot Framework
15
16
  Classifier: Framework :: Robot Framework :: Tool
@@ -24,8 +25,8 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
24
25
  Classifier: Topic :: Utilities
25
26
  Classifier: Typing :: Typed
26
27
  Requires-Python: >=3.8
27
- Requires-Dist: robotcode-jsonrpc2==0.102.0
28
- Requires-Dist: robotcode-runner==0.102.0
28
+ Requires-Dist: robotcode-jsonrpc2==0.103.0
29
+ Requires-Dist: robotcode-runner==0.103.0
29
30
  Description-Content-Type: text/markdown
30
31
 
31
32
  # robotcode-repl-server
@@ -0,0 +1,13 @@
1
+ robotcode/repl_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ robotcode/repl_server/__version__.py,sha256=h-xWp4VbA1iVBGYwns0h7os4-fjmzHQqnVsIwo7l-nY,24
3
+ robotcode/repl_server/cli.py,sha256=yxgD_4QFwRD-BSGxto3MeimKess5_KZWkUJldERBsSk,5970
4
+ robotcode/repl_server/hooks.py,sha256=4O9H8cefHc6T7erjPxzU941w3KWytTBB5gmvYb4bs_I,196
5
+ robotcode/repl_server/interpreter.py,sha256=tEHL26LdqJF7LT5VfCO-8Ap0GJJvP7u2nHqJ2m1380s,9316
6
+ robotcode/repl_server/protocol.py,sha256=SGCRyYdkcQPcD9zUBOQNvHVg6f5_AhNtmi85FR92rTc,1118
7
+ robotcode/repl_server/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
8
+ robotcode/repl_server/server.py,sha256=zzFsD6ds56d4GQJKXoysVZP-oiS08AtMKeyLKXH9Fss,746
9
+ robotcode_repl_server-0.103.0.dist-info/METADATA,sha256=uE5urtmXeDonq2NpCbXB9gPBidr2MfXRzQHQCCXbfV4,2138
10
+ robotcode_repl_server-0.103.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
11
+ robotcode_repl_server-0.103.0.dist-info/entry_points.txt,sha256=U_1iYu71VNyPq_epO0fXHki3B4BE4gR2mbZFAOWN1cg,54
12
+ robotcode_repl_server-0.103.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
13
+ robotcode_repl_server-0.103.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.3
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,13 +0,0 @@
1
- robotcode/repl_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- robotcode/repl_server/__version__.py,sha256=dAhddht6mwdAMkn6g8P3LDfctfQeCHgJCl-A7AxVyI4,24
3
- robotcode/repl_server/cli.py,sha256=yxgD_4QFwRD-BSGxto3MeimKess5_KZWkUJldERBsSk,5970
4
- robotcode/repl_server/hooks.py,sha256=4O9H8cefHc6T7erjPxzU941w3KWytTBB5gmvYb4bs_I,196
5
- robotcode/repl_server/interpreter.py,sha256=gzCwKiYfzVuOl4FHC_lpt5HLH8WdKwMz2CKmgbATFKk,9053
6
- robotcode/repl_server/protocol.py,sha256=4Eeoz45DfkKuzMZ7NJed8x0m0SWJdKkeFbnuO3e6DgQ,980
7
- robotcode/repl_server/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
8
- robotcode/repl_server/server.py,sha256=zzFsD6ds56d4GQJKXoysVZP-oiS08AtMKeyLKXH9Fss,746
9
- robotcode_repl_server-0.102.0.dist-info/METADATA,sha256=iZpKgO79_ploCJKodf-Mz98JTIBq3uGmbBe7T0wki0w,2112
10
- robotcode_repl_server-0.102.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
11
- robotcode_repl_server-0.102.0.dist-info/entry_points.txt,sha256=U_1iYu71VNyPq_epO0fXHki3B4BE4gR2mbZFAOWN1cg,54
12
- robotcode_repl_server-0.102.0.dist-info/licenses/LICENSE.txt,sha256=B05uMshqTA74s-0ltyHKI6yoPfJ3zYgQbvcXfDVGFf8,10280
13
- robotcode_repl_server-0.102.0.dist-info/RECORD,,