isolate 0.13.2__tar.gz → 0.13.4__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.

Files changed (85) hide show
  1. {isolate-0.13.2 → isolate-0.13.4}/PKG-INFO +1 -1
  2. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/_isolate_version.py +2 -2
  3. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/_local/_base.py +2 -0
  4. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/agent.py +7 -5
  5. {isolate-0.13.2 → isolate-0.13.4}/src/isolate.egg-info/PKG-INFO +1 -1
  6. {isolate-0.13.2 → isolate-0.13.4}/.github/workflows/release.yml +0 -0
  7. {isolate-0.13.2 → isolate-0.13.4}/.github/workflows/test.yml +0 -0
  8. {isolate-0.13.2 → isolate-0.13.4}/.gitignore +0 -0
  9. {isolate-0.13.2 → isolate-0.13.4}/.pre-commit-config.yaml +0 -0
  10. {isolate-0.13.2 → isolate-0.13.4}/LICENSE +0 -0
  11. {isolate-0.13.2 → isolate-0.13.4}/README.md +0 -0
  12. {isolate-0.13.2 → isolate-0.13.4}/pyproject.toml +0 -0
  13. {isolate-0.13.2 → isolate-0.13.4}/setup.cfg +0 -0
  14. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/__init__.py +0 -0
  15. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/_version.py +0 -0
  16. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/__init__.py +0 -0
  17. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/_base.py +0 -0
  18. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/common.py +0 -0
  19. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/conda.py +0 -0
  20. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/container.py +0 -0
  21. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/local.py +0 -0
  22. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/pyenv.py +0 -0
  23. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/remote.py +0 -0
  24. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/settings.py +0 -0
  25. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/backends/virtualenv.py +0 -0
  26. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/common/__init__.py +0 -0
  27. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/common/timestamp.py +0 -0
  28. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/__init__.py +0 -0
  29. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/_local/__init__.py +0 -0
  30. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/_local/agent_startup.py +0 -0
  31. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/common.py +0 -0
  32. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/__init__.py +0 -0
  33. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/_base.py +0 -0
  34. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/configuration.py +0 -0
  35. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/__init__.py +0 -0
  36. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/agent.proto +0 -0
  37. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/agent_pb2.py +0 -0
  38. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/agent_pb2.pyi +0 -0
  39. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/agent_pb2_grpc.py +0 -0
  40. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/common.proto +0 -0
  41. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/common_pb2.py +0 -0
  42. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/common_pb2.pyi +0 -0
  43. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/definitions/common_pb2_grpc.py +0 -0
  44. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/grpc/interface.py +0 -0
  45. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/ipc/__init__.py +0 -0
  46. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/ipc/_base.py +0 -0
  47. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/connections/ipc/agent.py +0 -0
  48. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/logger.py +0 -0
  49. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/logs.py +0 -0
  50. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/py.typed +0 -0
  51. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/registry.py +0 -0
  52. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/__init__.py +0 -0
  53. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/definitions/__init__.py +0 -0
  54. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/definitions/server.proto +0 -0
  55. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/definitions/server_pb2.py +0 -0
  56. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/definitions/server_pb2.pyi +0 -0
  57. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/definitions/server_pb2_grpc.py +0 -0
  58. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/health/__init__.py +0 -0
  59. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/health/health.proto +0 -0
  60. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/health/health_pb2.py +0 -0
  61. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/health/health_pb2.pyi +0 -0
  62. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/health/health_pb2_grpc.py +0 -0
  63. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/health_server.py +0 -0
  64. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/interface.py +0 -0
  65. {isolate-0.13.2 → isolate-0.13.4}/src/isolate/server/server.py +0 -0
  66. {isolate-0.13.2 → isolate-0.13.4}/src/isolate.egg-info/SOURCES.txt +0 -0
  67. {isolate-0.13.2 → isolate-0.13.4}/src/isolate.egg-info/dependency_links.txt +0 -0
  68. {isolate-0.13.2 → isolate-0.13.4}/src/isolate.egg-info/entry_points.txt +0 -0
  69. {isolate-0.13.2 → isolate-0.13.4}/src/isolate.egg-info/requires.txt +0 -0
  70. {isolate-0.13.2 → isolate-0.13.4}/src/isolate.egg-info/top_level.txt +0 -0
  71. {isolate-0.13.2 → isolate-0.13.4}/tests/__init__.py +0 -0
  72. {isolate-0.13.2 → isolate-0.13.4}/tests/conftest.py +0 -0
  73. {isolate-0.13.2 → isolate-0.13.4}/tests/test_backends.py +0 -0
  74. {isolate-0.13.2 → isolate-0.13.4}/tests/test_concurrency.py +0 -0
  75. {isolate-0.13.2 → isolate-0.13.4}/tests/test_connections.py +0 -0
  76. {isolate-0.13.2 → isolate-0.13.4}/tests/test_isolate.py +0 -0
  77. {isolate-0.13.2 → isolate-0.13.4}/tests/test_log.py +0 -0
  78. {isolate-0.13.2 → isolate-0.13.4}/tests/test_serialization.py +0 -0
  79. {isolate-0.13.2 → isolate-0.13.4}/tests/test_server.py +0 -0
  80. {isolate-0.13.2 → isolate-0.13.4}/tools/Dockerfile +0 -0
  81. {isolate-0.13.2 → isolate-0.13.4}/tools/agent_requirements.txt +0 -0
  82. {isolate-0.13.2 → isolate-0.13.4}/tools/protobuf-requirements.txt +0 -0
  83. {isolate-0.13.2 → isolate-0.13.4}/tools/regen_grpc.py +0 -0
  84. {isolate-0.13.2 → isolate-0.13.4}/tools/requirements.txt +0 -0
  85. {isolate-0.13.2 → isolate-0.13.4}/tools/test_agent_requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isolate
3
- Version: 0.13.2
3
+ Version: 0.13.4
4
4
  Summary: Managed isolated environments for Python
5
5
  Author-email: Features & Labels <hello@fal.ai>
6
6
  Project-URL: Issues, https://github.com/fal-ai/isolate/issues
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.13.2'
16
- __version_tuple__ = version_tuple = (0, 13, 2)
15
+ __version__ = version = '0.13.4'
16
+ __version_tuple__ = version_tuple = (0, 13, 4)
@@ -15,6 +15,7 @@ from typing import (
15
15
  TypeVar,
16
16
  )
17
17
 
18
+ from isolate import __version__ as isolate_version
18
19
  from isolate.backends.common import get_executable_path, logged_io
19
20
  from isolate.connections.common import AGENT_SIGNATURE
20
21
  from isolate.logs import LogLevel, LogSource
@@ -138,6 +139,7 @@ class PythonExecutionBase(Generic[ConnectionType]):
138
139
  immediately (so that we can seamlessly transfer logs)."""
139
140
 
140
141
  custom_vars = {}
142
+ custom_vars["ISOLATE_SERVER_VERSION"] = isolate_version
141
143
  custom_vars[AGENT_SIGNATURE] = "1"
142
144
  custom_vars["PYTHONUNBUFFERED"] = "1"
143
145
 
@@ -17,13 +17,12 @@ from typing import (
17
17
  import grpc
18
18
  from grpc import ServicerContext, StatusCode
19
19
 
20
+ from isolate import __version__ as agent_version
20
21
  from isolate.backends.common import sha256_digest_of
21
22
  from isolate.connections.common import SerializationError, serialize_object
22
23
  from isolate.connections.grpc import definitions
23
24
  from isolate.connections.grpc.configuration import get_default_options
24
25
  from isolate.connections.grpc.interface import from_grpc
25
- from isolate.logger import logger
26
- from isolate.logs import LogLevel, LogSource
27
26
 
28
27
 
29
28
  @dataclass
@@ -44,6 +43,8 @@ class AgentServicer(definitions.AgentServicer):
44
43
  context: ServicerContext,
45
44
  ) -> Iterator[definitions.PartialRunResult]:
46
45
  self.log(f"A connection has been established: {context.peer()}!")
46
+ server_version = os.getenv("ISOLATE_SERVER_VERSION") or "unknown"
47
+ self.log(f"Isolate info: server {server_version}, agent {agent_version}")
47
48
 
48
49
  extra_args = []
49
50
  if request.HasField("setup_func"):
@@ -114,7 +115,7 @@ class AgentServicer(definitions.AgentServicer):
114
115
  # depickling is basically involves code execution from the *user*.
115
116
  function = from_grpc(function)
116
117
  except SerializationError:
117
- self.log(traceback.format_exc())
118
+ traceback.print_exc()
118
119
  raise AbortException(
119
120
  f"The {function_kind} function could not be deserialized."
120
121
  )
@@ -151,7 +152,8 @@ class AgentServicer(definitions.AgentServicer):
151
152
  definition = serialize_object(serialization_method, result)
152
153
  except SerializationError:
153
154
  if stringized_tb:
154
- logger.log(LogLevel.ERROR, stringized_tb, LogSource.BRIDGE)
155
+ print(stringized_tb, file=sys.stderr)
156
+ self.log(traceback.format_exc())
155
157
  raise AbortException(
156
158
  "Error while serializing the execution result "
157
159
  f"(object of type {type(result)})."
@@ -176,7 +178,7 @@ class AgentServicer(definitions.AgentServicer):
176
178
  )
177
179
 
178
180
  def log(self, message: str) -> None:
179
- self._log.write(message)
181
+ self._log.write(message + "\n")
180
182
  self._log.flush()
181
183
 
182
184
  def abort_with_msg(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isolate
3
- Version: 0.13.2
3
+ Version: 0.13.4
4
4
  Summary: Managed isolated environments for Python
5
5
  Author-email: Features & Labels <hello@fal.ai>
6
6
  Project-URL: Issues, https://github.com/fal-ai/isolate/issues
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