isolate 0.12.10__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.10 → isolate-0.12.12}/PKG-INFO +1 -1
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/_isolate_version.py +2 -2
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/_base.py +2 -1
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/common.py +28 -17
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/_base.py +2 -1
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/agent.py +2 -1
- isolate-0.12.12/src/isolate/exceptions.py +2 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate.egg-info/PKG-INFO +1 -1
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate.egg-info/SOURCES.txt +1 -1
- isolate-0.12.10/cliff.toml +0 -53
- {isolate-0.12.10 → isolate-0.12.12}/.github/workflows/release.yml +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/.github/workflows/test.yml +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/.gitignore +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/.pre-commit-config.yaml +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/LICENSE +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/README.md +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/pyproject.toml +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/setup.cfg +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/_version.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/common.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/conda.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/local.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/pyenv.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/remote.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/settings.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/backends/virtualenv.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/common/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/common/timestamp.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/_local/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/_local/_base.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/_local/agent_startup.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/configuration.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent.proto +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2.pyi +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/agent_pb2_grpc.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common.proto +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2.pyi +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/definitions/common_pb2_grpc.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/grpc/interface.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/ipc/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/ipc/_base.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/connections/ipc/agent.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/logs.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/py.typed +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/registry.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/definitions/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/definitions/server.proto +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/definitions/server_pb2.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/definitions/server_pb2.pyi +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/definitions/server_pb2_grpc.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/health/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/health/health.proto +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/health/health_pb2.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/health/health_pb2.pyi +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/health/health_pb2_grpc.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/health_server.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/interface.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate/server/server.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate.egg-info/dependency_links.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate.egg-info/entry_points.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate.egg-info/requires.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/src/isolate.egg-info/top_level.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/__init__.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/conftest.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_backends.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_concurrency.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_connections.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_isolate.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_log.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_serialization.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tests/test_server.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tools/Dockerfile +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tools/agent_requirements.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tools/protobuf-requirements.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tools/regen_grpc.py +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tools/requirements.txt +0 -0
- {isolate-0.12.10 → isolate-0.12.12}/tools/test_agent_requirements.txt +0 -0
|
@@ -12,6 +12,7 @@ from typing import (
|
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
from isolate.backends.settings import DEFAULT_SETTINGS, IsolateSettings
|
|
15
|
+
from isolate.exceptions import IsolateException
|
|
15
16
|
from isolate.logs import Log, LogLevel, LogSource
|
|
16
17
|
|
|
17
18
|
__all__ = [
|
|
@@ -27,7 +28,7 @@ CallResultType = TypeVar("CallResultType")
|
|
|
27
28
|
BasicCallable = Callable[[], CallResultType]
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
class EnvironmentCreationError(
|
|
31
|
+
class EnvironmentCreationError(IsolateException):
|
|
31
32
|
"""Raised when the environment cannot be created."""
|
|
32
33
|
|
|
33
34
|
|
|
@@ -2,12 +2,13 @@ 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
|
|
|
10
|
+
from isolate.exceptions import IsolateException
|
|
11
|
+
|
|
11
12
|
if TYPE_CHECKING:
|
|
12
13
|
from typing import Protocol
|
|
13
14
|
|
|
@@ -21,23 +22,18 @@ AGENT_SIGNATURE = "IS_ISOLATE_AGENT"
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
@dataclass
|
|
24
|
-
class
|
|
25
|
+
class BaseSerializationError(IsolateException):
|
|
25
26
|
"""An error that happened during the serialization process."""
|
|
26
27
|
|
|
27
28
|
message: str
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"""A context manager to capture every expression
|
|
33
|
-
underneath it and if any of them fails for any reason
|
|
34
|
-
then it will raise a SerializationError with the
|
|
35
|
-
given message."""
|
|
31
|
+
class SerializationError(BaseSerializationError):
|
|
32
|
+
pass
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
raise SerializationError("Error while " + message) from exception
|
|
34
|
+
|
|
35
|
+
class DeserializationError(BaseSerializationError):
|
|
36
|
+
pass
|
|
41
37
|
|
|
42
38
|
|
|
43
39
|
def as_serialization_method(backend: Any) -> SerializationBackend:
|
|
@@ -66,13 +62,22 @@ def load_serialized_object(
|
|
|
66
62
|
flag is set to true, then the given object will be raised as an exception (instead
|
|
67
63
|
of being returned)."""
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
try:
|
|
70
66
|
serialization_backend = as_serialization_method(
|
|
71
67
|
importlib.import_module(serialization_method)
|
|
72
68
|
)
|
|
69
|
+
except BaseException as exc:
|
|
70
|
+
raise DeserializationError(
|
|
71
|
+
"Error while preparing the serialization backend "
|
|
72
|
+
f"({serialization_method})"
|
|
73
|
+
) from exc
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
try:
|
|
75
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
|
|
76
81
|
|
|
77
82
|
if was_it_raised:
|
|
78
83
|
raise prepare_exc(result, stringized_traceback=stringized_traceback)
|
|
@@ -84,13 +89,19 @@ def serialize_object(serialization_method: str, object: Any) -> bytes:
|
|
|
84
89
|
"""Serialize the given object using the given serialization method. If
|
|
85
90
|
anything fails, then a SerializationError will be raised."""
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
try:
|
|
88
93
|
serialization_backend = as_serialization_method(
|
|
89
94
|
importlib.import_module(serialization_method)
|
|
90
95
|
)
|
|
96
|
+
except BaseException as exc:
|
|
97
|
+
raise SerializationError(
|
|
98
|
+
f"Error while preparing the serialization backend ({serialization_method})"
|
|
99
|
+
) from exc
|
|
91
100
|
|
|
92
|
-
|
|
101
|
+
try:
|
|
93
102
|
return serialization_backend.dumps(object)
|
|
103
|
+
except BaseException as exc:
|
|
104
|
+
raise SerializationError("Error while serializing the given object") from exc
|
|
94
105
|
|
|
95
106
|
|
|
96
107
|
def is_agent() -> bool:
|
|
@@ -16,10 +16,11 @@ from isolate.connections.common import serialize_object
|
|
|
16
16
|
from isolate.connections.grpc import agent, definitions
|
|
17
17
|
from isolate.connections.grpc.configuration import get_default_options
|
|
18
18
|
from isolate.connections.grpc.interface import from_grpc
|
|
19
|
+
from isolate.exceptions import IsolateException
|
|
19
20
|
from isolate.logs import LogLevel, LogSource
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
class AgentError(
|
|
23
|
+
class AgentError(IsolateException):
|
|
23
24
|
"""An internal problem caused by (most probably) the agent."""
|
|
24
25
|
|
|
25
26
|
|
|
@@ -22,11 +22,12 @@ from isolate.connections.common import SerializationError, serialize_object
|
|
|
22
22
|
from isolate.connections.grpc import definitions
|
|
23
23
|
from isolate.connections.grpc.configuration import get_default_options
|
|
24
24
|
from isolate.connections.grpc.interface import from_grpc, to_grpc
|
|
25
|
+
from isolate.exceptions import IsolateException
|
|
25
26
|
from isolate.logs import Log, LogLevel, LogSource
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
@dataclass
|
|
29
|
-
class AbortException(
|
|
30
|
+
class AbortException(IsolateException):
|
|
30
31
|
message: str
|
|
31
32
|
|
|
32
33
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
.pre-commit-config.yaml
|
|
3
3
|
LICENSE
|
|
4
4
|
README.md
|
|
5
|
-
cliff.toml
|
|
6
5
|
pyproject.toml
|
|
7
6
|
.github/workflows/release.yml
|
|
8
7
|
.github/workflows/test.yml
|
|
9
8
|
src/isolate/__init__.py
|
|
10
9
|
src/isolate/_isolate_version.py
|
|
11
10
|
src/isolate/_version.py
|
|
11
|
+
src/isolate/exceptions.py
|
|
12
12
|
src/isolate/logs.py
|
|
13
13
|
src/isolate/py.typed
|
|
14
14
|
src/isolate/registry.py
|
isolate-0.12.10/cliff.toml
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# configuration file for git-cliff (0.1.0)
|
|
2
|
-
|
|
3
|
-
[changelog]
|
|
4
|
-
body = """
|
|
5
|
-
{% if version %}\
|
|
6
|
-
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
|
7
|
-
{% else %}\
|
|
8
|
-
## [new changes]
|
|
9
|
-
{% endif %}\
|
|
10
|
-
{% for group, commits in commits | group_by(attribute="group") %}
|
|
11
|
-
### {{ group | upper_first }}
|
|
12
|
-
{% for commit in commits %}
|
|
13
|
-
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
|
|
14
|
-
{% endfor %}
|
|
15
|
-
{% endfor %}\n
|
|
16
|
-
"""
|
|
17
|
-
# remove the leading and trailing whitespace from the template
|
|
18
|
-
trim = true
|
|
19
|
-
|
|
20
|
-
[git]
|
|
21
|
-
# parse the commits based on https://www.conventionalcommits.org
|
|
22
|
-
conventional_commits = true
|
|
23
|
-
# filter out the commits that are not conventional
|
|
24
|
-
filter_unconventional = true
|
|
25
|
-
# regex for preprocessing the commit messages
|
|
26
|
-
commit_preprocessors = [
|
|
27
|
-
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/fal-ai/isolate/pull/${2}))"},
|
|
28
|
-
]
|
|
29
|
-
# regex for parsing and grouping commits
|
|
30
|
-
commit_parsers = [
|
|
31
|
-
{ message = "^feat", group = "Features"},
|
|
32
|
-
{ message = "^fix", group = "Bug Fixes"},
|
|
33
|
-
{ message = "^doc", group = "Documentation"},
|
|
34
|
-
{ message = "^perf", group = "Performance"},
|
|
35
|
-
{ message = "^refactor", group = "Refactor"},
|
|
36
|
-
{ message = "^style", group = "Styling"},
|
|
37
|
-
{ message = "^test", group = "Testing"},
|
|
38
|
-
{ message = "^chore\\(release\\): prepare for", skip = true},
|
|
39
|
-
{ message = "^chore", group = "Miscellaneous Tasks"},
|
|
40
|
-
{ body = ".*security", group = "Security"},
|
|
41
|
-
]
|
|
42
|
-
# filter out the commits that are not matched by commit parsers
|
|
43
|
-
filter_commits = true
|
|
44
|
-
# glob pattern for matching git tags
|
|
45
|
-
tag_pattern = "v[0-9]*"
|
|
46
|
-
# regex for skipping tags
|
|
47
|
-
skip_tags = "v0.1.0-beta.1"
|
|
48
|
-
# regex for ignoring tags
|
|
49
|
-
ignore_tags = ""
|
|
50
|
-
# sort the tags chronologically
|
|
51
|
-
date_order = false
|
|
52
|
-
# sort the commits inside sections by oldest/newest order
|
|
53
|
-
sort_commits = "oldest"
|
|
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.10 → 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.10 → 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
|