isolate 0.12.11__tar.gz → 0.12.12__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.
Potentially problematic release.
This version of isolate might be problematic. Click here for more details.
- {isolate-0.12.11 → isolate-0.12.12}/PKG-INFO +1 -1
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/_isolate_version.py +2 -2
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/common.py +26 -17
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate.egg-info/PKG-INFO +1 -1
- {isolate-0.12.11 → isolate-0.12.12}/.github/workflows/release.yml +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/.github/workflows/test.yml +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/.gitignore +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/.pre-commit-config.yaml +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/LICENSE +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/README.md +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/pyproject.toml +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/setup.cfg +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/_version.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/_base.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/common.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/conda.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/local.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/pyenv.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/remote.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/settings.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/backends/virtualenv.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/common/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/common/timestamp.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/_local/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/_local/_base.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/_local/agent_startup.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/_base.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/agent.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/configuration.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent.proto +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2.pyi +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2_grpc.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common.proto +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2.pyi +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2_grpc.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/interface.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/ipc/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/ipc/_base.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/ipc/agent.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/exceptions.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/logs.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/py.typed +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/registry.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/definitions/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/definitions/server.proto +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/definitions/server_pb2.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/definitions/server_pb2.pyi +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/definitions/server_pb2_grpc.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/health/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/health/health.proto +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/health/health_pb2.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/health/health_pb2.pyi +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/health/health_pb2_grpc.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/health_server.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/interface.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate/server/server.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate.egg-info/SOURCES.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate.egg-info/dependency_links.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate.egg-info/entry_points.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate.egg-info/requires.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/src/isolate.egg-info/top_level.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/__init__.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/conftest.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_backends.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_concurrency.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_connections.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_isolate.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_log.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_serialization.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tests/test_server.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tools/Dockerfile +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tools/agent_requirements.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tools/protobuf-requirements.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tools/regen_grpc.py +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tools/requirements.txt +0 -0
- {isolate-0.12.11 → isolate-0.12.12}/tools/test_agent_requirements.txt +0 -0
|
@@ -2,9 +2,8 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import importlib
|
|
4
4
|
import os
|
|
5
|
-
from contextlib import contextmanager
|
|
6
5
|
from dataclasses import dataclass
|
|
7
|
-
from typing import TYPE_CHECKING, Any,
|
|
6
|
+
from typing import TYPE_CHECKING, Any, cast
|
|
8
7
|
|
|
9
8
|
from tblib import Traceback, TracebackParseError
|
|
10
9
|
|
|
@@ -23,23 +22,18 @@ AGENT_SIGNATURE = "IS_ISOLATE_AGENT"
|
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
@dataclass
|
|
26
|
-
class
|
|
25
|
+
class BaseSerializationError(IsolateException):
|
|
27
26
|
"""An error that happened during the serialization process."""
|
|
28
27
|
|
|
29
28
|
message: str
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"""A context manager to capture every expression
|
|
35
|
-
underneath it and if any of them fails for any reason
|
|
36
|
-
then it will raise a SerializationError with the
|
|
37
|
-
given message."""
|
|
31
|
+
class SerializationError(BaseSerializationError):
|
|
32
|
+
pass
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
raise SerializationError("Error while " + message) from exception
|
|
34
|
+
|
|
35
|
+
class DeserializationError(BaseSerializationError):
|
|
36
|
+
pass
|
|
43
37
|
|
|
44
38
|
|
|
45
39
|
def as_serialization_method(backend: Any) -> SerializationBackend:
|
|
@@ -68,13 +62,22 @@ def load_serialized_object(
|
|
|
68
62
|
flag is set to true, then the given object will be raised as an exception (instead
|
|
69
63
|
of being returned)."""
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
try:
|
|
72
66
|
serialization_backend = as_serialization_method(
|
|
73
67
|
importlib.import_module(serialization_method)
|
|
74
68
|
)
|
|
69
|
+
except BaseException as exc:
|
|
70
|
+
raise DeserializationError(
|
|
71
|
+
"Error while preparing the serialization backend "
|
|
72
|
+
f"({serialization_method})"
|
|
73
|
+
) from exc
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
try:
|
|
77
76
|
result = serialization_backend.loads(raw_object)
|
|
77
|
+
except BaseException as exc:
|
|
78
|
+
raise DeserializationError(
|
|
79
|
+
"Error while deserializing the given object"
|
|
80
|
+
) from exc
|
|
78
81
|
|
|
79
82
|
if was_it_raised:
|
|
80
83
|
raise prepare_exc(result, stringized_traceback=stringized_traceback)
|
|
@@ -86,13 +89,19 @@ def serialize_object(serialization_method: str, object: Any) -> bytes:
|
|
|
86
89
|
"""Serialize the given object using the given serialization method. If
|
|
87
90
|
anything fails, then a SerializationError will be raised."""
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
try:
|
|
90
93
|
serialization_backend = as_serialization_method(
|
|
91
94
|
importlib.import_module(serialization_method)
|
|
92
95
|
)
|
|
96
|
+
except BaseException as exc:
|
|
97
|
+
raise SerializationError(
|
|
98
|
+
f"Error while preparing the serialization backend ({serialization_method})"
|
|
99
|
+
) from exc
|
|
93
100
|
|
|
94
|
-
|
|
101
|
+
try:
|
|
95
102
|
return serialization_backend.dumps(object)
|
|
103
|
+
except BaseException as exc:
|
|
104
|
+
raise SerializationError("Error while serializing the given object") from exc
|
|
96
105
|
|
|
97
106
|
|
|
98
107
|
def is_agent() -> bool:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2_grpc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{isolate-0.12.11 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2_grpc.py
RENAMED
|
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
|
|
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
|