robotcode-core 0.80.0__tar.gz → 0.82.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_core-0.80.0 → robotcode_core-0.82.0}/PKG-INFO +2 -2
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/pyproject.toml +1 -1
- robotcode_core-0.82.0/src/robotcode/core/__version__.py +1 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/concurrent.py +21 -1
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/debugpy.py +16 -2
- robotcode_core-0.80.0/src/robotcode/core/__version__.py +0 -1
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/.gitignore +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/LICENSE.txt +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/README.md +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/__init__.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/async_tools.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/documents_manager.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/event.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/filewatcher.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/language.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/lsp/__init__.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/lsp/types.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/py.typed +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/text_document.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/types.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/uri.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/__init__.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/caching.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/cli.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/dataclasses.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/glob_path.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/inspect.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/logging.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/net.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/path.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/process.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/safe_eval.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/utils/version.py +0 -0
- {robotcode_core-0.80.0 → robotcode_core-0.82.0}/src/robotcode/core/workspace.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: robotcode-core
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.82.0
|
|
4
4
|
Summary: Some core classes for RobotCode
|
|
5
5
|
Project-URL: Homepage, https://robotcode.io
|
|
6
|
-
Project-URL: Donate, https://
|
|
6
|
+
Project-URL: Donate, https://opencollective.com/robotcode
|
|
7
7
|
Project-URL: Documentation, https://github.com/robotcodedev/robotcode#readme
|
|
8
8
|
Project-URL: Changelog, https://github.com/robotcodedev/robotcode/blob/main/CHANGELOG.md
|
|
9
9
|
Project-URL: Issues, https://github.com/robotcodedev/robotcode/issues
|
|
@@ -30,7 +30,7 @@ dynamic = ["version"]
|
|
|
30
30
|
|
|
31
31
|
[project.urls]
|
|
32
32
|
Homepage = "https://robotcode.io"
|
|
33
|
-
Donate = "https://
|
|
33
|
+
Donate = "https://opencollective.com/robotcode"
|
|
34
34
|
Documentation = "https://github.com/robotcodedev/robotcode#readme"
|
|
35
35
|
Changelog = "https://github.com/robotcodedev/robotcode/blob/main/CHANGELOG.md"
|
|
36
36
|
Issues = "https://github.com/robotcodedev/robotcode/issues"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.82.0"
|
|
@@ -217,7 +217,9 @@ def _remove_future_from_running_tasks(future: Task[Any]) -> None:
|
|
|
217
217
|
_P = ParamSpec("_P")
|
|
218
218
|
|
|
219
219
|
|
|
220
|
-
def
|
|
220
|
+
def _create_task_in_thread(
|
|
221
|
+
callable: Callable[_P, _TResult], *args: _P.args, **kwargs: _P.kwargs
|
|
222
|
+
) -> Tuple[Task[_TResult], threading.Thread]:
|
|
221
223
|
future: Task[_TResult] = Task()
|
|
222
224
|
with _running_tasks_lock:
|
|
223
225
|
thread = threading.Thread(
|
|
@@ -227,8 +229,26 @@ def run_as_task(callable: Callable[_P, _TResult], *args: _P.args, **kwargs: _P.k
|
|
|
227
229
|
)
|
|
228
230
|
_running_tasks[future] = thread
|
|
229
231
|
future.add_done_callback(_remove_future_from_running_tasks)
|
|
232
|
+
|
|
230
233
|
# TODO: don't set daemon=True because it can be deprecated in future pyhton versions
|
|
231
234
|
thread.daemon = True
|
|
235
|
+
return future, thread
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def run_as_task(callable: Callable[_P, _TResult], *args: _P.args, **kwargs: _P.kwargs) -> Task[_TResult]:
|
|
239
|
+
future, thread = _create_task_in_thread(callable, *args, **kwargs)
|
|
240
|
+
|
|
241
|
+
thread.start()
|
|
242
|
+
|
|
243
|
+
return future
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def run_as_debugpy_hidden_task(callable: Callable[_P, _TResult], *args: _P.args, **kwargs: _P.kwargs) -> Task[_TResult]:
|
|
247
|
+
future, thread = _create_task_in_thread(callable, *args, **kwargs)
|
|
248
|
+
|
|
249
|
+
thread.pydev_do_not_trace = True # type: ignore[attr-defined]
|
|
250
|
+
thread.is_pydev_daemon_thread = True # type: ignore[attr-defined]
|
|
251
|
+
|
|
232
252
|
thread.start()
|
|
233
253
|
|
|
234
254
|
return future
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import threading
|
|
1
2
|
from typing import Optional, Sequence, Tuple, Union
|
|
2
3
|
|
|
4
|
+
from robotcode.core.concurrent import run_as_debugpy_hidden_task
|
|
5
|
+
|
|
3
6
|
from .logging import LoggingDescriptor
|
|
4
7
|
from .net import find_free_port
|
|
5
8
|
|
|
@@ -15,14 +18,25 @@ def is_debugpy_installed() -> bool:
|
|
|
15
18
|
return True
|
|
16
19
|
|
|
17
20
|
|
|
18
|
-
def wait_for_debugpy_connected() -> bool:
|
|
21
|
+
def wait_for_debugpy_connected(timeout: float = 30) -> bool:
|
|
19
22
|
if is_debugpy_installed():
|
|
20
23
|
import debugpy # noqa: T100
|
|
21
24
|
|
|
25
|
+
connected = threading.Event()
|
|
22
26
|
_logger.info("wait for debugpy client")
|
|
27
|
+
|
|
28
|
+
def _wait_for_client() -> bool:
|
|
29
|
+
if not connected.wait(timeout=timeout):
|
|
30
|
+
debugpy.wait_for_client.cancel()
|
|
31
|
+
return False
|
|
32
|
+
|
|
33
|
+
return True
|
|
34
|
+
|
|
35
|
+
wait_task = run_as_debugpy_hidden_task(_wait_for_client)
|
|
23
36
|
debugpy.wait_for_client() # noqa: T100
|
|
37
|
+
connected.set()
|
|
38
|
+
return wait_task.result()
|
|
24
39
|
|
|
25
|
-
return True
|
|
26
40
|
return False
|
|
27
41
|
|
|
28
42
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.80.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|