robotcode-repl 2.9.0.dev68__py3-none-any.whl → 2.9.0.dev74__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.
- robotcode/repl/__version__.py +1 -1
- robotcode/repl/_debug/controller.py +17 -0
- robotcode/repl/_session.py +1119 -0
- robotcode/repl/cli.py +114 -38
- robotcode/repl/console_interpreter.py +22 -10
- robotcode/repl/hooks.py +2 -1
- robotcode/repl/session_cli.py +530 -0
- {robotcode_repl-2.9.0.dev68.dist-info → robotcode_repl-2.9.0.dev74.dist-info}/METADATA +2 -2
- {robotcode_repl-2.9.0.dev68.dist-info → robotcode_repl-2.9.0.dev74.dist-info}/RECORD +11 -9
- {robotcode_repl-2.9.0.dev68.dist-info → robotcode_repl-2.9.0.dev74.dist-info}/WHEEL +0 -0
- {robotcode_repl-2.9.0.dev68.dist-info → robotcode_repl-2.9.0.dev74.dist-info}/entry_points.txt +0 -0
robotcode/repl/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.9.0-dev.
|
|
1
|
+
__version__ = "2.9.0-dev.74"
|
|
@@ -9,6 +9,7 @@ Registered as an execution observer via ``BaseInterpreter.register_observer``.
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
import contextlib
|
|
12
|
+
import dataclasses
|
|
12
13
|
import re
|
|
13
14
|
import reprlib
|
|
14
15
|
import weakref
|
|
@@ -221,6 +222,22 @@ class DebugController:
|
|
|
221
222
|
self._breakpoints.remove(bp)
|
|
222
223
|
return True
|
|
223
224
|
|
|
225
|
+
def breakpoint_state(self) -> Dict[str, Any]:
|
|
226
|
+
"""The breakpoints and the exception breakpoints as they are, in plain values, for `restore_breakpoints` in
|
|
227
|
+
another process."""
|
|
228
|
+
return {
|
|
229
|
+
"breakpoints": [dataclasses.asdict(bp) for bp in self._breakpoints],
|
|
230
|
+
"next_id": self._next_bp_id,
|
|
231
|
+
"exception_filters": sorted(self._exception_filters),
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
def restore_breakpoints(self, state: Mapping[str, Any]) -> None:
|
|
235
|
+
"""Take over the breakpoints of `breakpoint_state`, in place of those set so far. Their hit counts start at 0,
|
|
236
|
+
as `.ignore` counts the hits of a run."""
|
|
237
|
+
self._breakpoints = [dataclasses.replace(Breakpoint(**fields), hits=0) for fields in state["breakpoints"]]
|
|
238
|
+
self._next_bp_id = state["next_id"]
|
|
239
|
+
self._exception_filters = set(state["exception_filters"])
|
|
240
|
+
|
|
224
241
|
def set_exception_breakpoints(self, filters: Iterable[str]) -> None:
|
|
225
242
|
"""Arm exception breakpoints. Recognised filters: ``failed_keyword``
|
|
226
243
|
(stop at every failing keyword) and ``uncaught_failed_keyword`` (only
|