isolate 0.14.1__tar.gz → 0.14.2__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 (86) hide show
  1. {isolate-0.14.1 → isolate-0.14.2}/PKG-INFO +1 -1
  2. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/_isolate_version.py +2 -2
  3. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/common.py +1 -0
  4. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/logger.py +3 -0
  5. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/server.py +8 -4
  6. {isolate-0.14.1 → isolate-0.14.2}/src/isolate.egg-info/PKG-INFO +1 -1
  7. {isolate-0.14.1 → isolate-0.14.2}/.github/workflows/release.yml +0 -0
  8. {isolate-0.14.1 → isolate-0.14.2}/.github/workflows/test.yml +0 -0
  9. {isolate-0.14.1 → isolate-0.14.2}/.gitignore +0 -0
  10. {isolate-0.14.1 → isolate-0.14.2}/.pre-commit-config.yaml +0 -0
  11. {isolate-0.14.1 → isolate-0.14.2}/LICENSE +0 -0
  12. {isolate-0.14.1 → isolate-0.14.2}/README.md +0 -0
  13. {isolate-0.14.1 → isolate-0.14.2}/pyproject.toml +0 -0
  14. {isolate-0.14.1 → isolate-0.14.2}/setup.cfg +0 -0
  15. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/__init__.py +0 -0
  16. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/_version.py +0 -0
  17. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/__init__.py +0 -0
  18. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/_base.py +0 -0
  19. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/conda.py +0 -0
  20. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/container.py +0 -0
  21. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/local.py +0 -0
  22. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/pyenv.py +0 -0
  23. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/remote.py +0 -0
  24. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/settings.py +0 -0
  25. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/backends/virtualenv.py +0 -0
  26. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/common/__init__.py +0 -0
  27. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/common/timestamp.py +0 -0
  28. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/__init__.py +0 -0
  29. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/_local/__init__.py +0 -0
  30. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/_local/_base.py +0 -0
  31. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/_local/agent_startup.py +0 -0
  32. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/common.py +0 -0
  33. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/__init__.py +0 -0
  34. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/_base.py +0 -0
  35. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/agent.py +0 -0
  36. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/configuration.py +0 -0
  37. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/__init__.py +0 -0
  38. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/agent.proto +0 -0
  39. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/agent_pb2.py +0 -0
  40. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/agent_pb2.pyi +0 -0
  41. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/agent_pb2_grpc.py +0 -0
  42. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/common.proto +0 -0
  43. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/common_pb2.py +0 -0
  44. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/common_pb2.pyi +0 -0
  45. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/definitions/common_pb2_grpc.py +0 -0
  46. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/grpc/interface.py +0 -0
  47. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/ipc/__init__.py +0 -0
  48. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/ipc/_base.py +0 -0
  49. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/connections/ipc/agent.py +0 -0
  50. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/logs.py +0 -0
  51. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/py.typed +0 -0
  52. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/registry.py +0 -0
  53. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/__init__.py +0 -0
  54. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/definitions/__init__.py +0 -0
  55. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/definitions/server.proto +0 -0
  56. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/definitions/server_pb2.py +0 -0
  57. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/definitions/server_pb2.pyi +0 -0
  58. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/definitions/server_pb2_grpc.py +0 -0
  59. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/health/__init__.py +0 -0
  60. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/health/health.proto +0 -0
  61. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/health/health_pb2.py +0 -0
  62. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/health/health_pb2.pyi +0 -0
  63. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/health/health_pb2_grpc.py +0 -0
  64. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/health_server.py +0 -0
  65. {isolate-0.14.1 → isolate-0.14.2}/src/isolate/server/interface.py +0 -0
  66. {isolate-0.14.1 → isolate-0.14.2}/src/isolate.egg-info/SOURCES.txt +0 -0
  67. {isolate-0.14.1 → isolate-0.14.2}/src/isolate.egg-info/dependency_links.txt +0 -0
  68. {isolate-0.14.1 → isolate-0.14.2}/src/isolate.egg-info/entry_points.txt +0 -0
  69. {isolate-0.14.1 → isolate-0.14.2}/src/isolate.egg-info/requires.txt +0 -0
  70. {isolate-0.14.1 → isolate-0.14.2}/src/isolate.egg-info/top_level.txt +0 -0
  71. {isolate-0.14.1 → isolate-0.14.2}/tests/__init__.py +0 -0
  72. {isolate-0.14.1 → isolate-0.14.2}/tests/conftest.py +0 -0
  73. {isolate-0.14.1 → isolate-0.14.2}/tests/test_backends.py +0 -0
  74. {isolate-0.14.1 → isolate-0.14.2}/tests/test_concurrency.py +0 -0
  75. {isolate-0.14.1 → isolate-0.14.2}/tests/test_connections.py +0 -0
  76. {isolate-0.14.1 → isolate-0.14.2}/tests/test_isolate.py +0 -0
  77. {isolate-0.14.1 → isolate-0.14.2}/tests/test_log.py +0 -0
  78. {isolate-0.14.1 → isolate-0.14.2}/tests/test_logger.py +0 -0
  79. {isolate-0.14.1 → isolate-0.14.2}/tests/test_serialization.py +0 -0
  80. {isolate-0.14.1 → isolate-0.14.2}/tests/test_server.py +0 -0
  81. {isolate-0.14.1 → isolate-0.14.2}/tools/Dockerfile +0 -0
  82. {isolate-0.14.1 → isolate-0.14.2}/tools/agent_requirements.txt +0 -0
  83. {isolate-0.14.1 → isolate-0.14.2}/tools/protobuf-requirements.txt +0 -0
  84. {isolate-0.14.1 → isolate-0.14.2}/tools/regen_grpc.py +0 -0
  85. {isolate-0.14.1 → isolate-0.14.2}/tools/requirements.txt +0 -0
  86. {isolate-0.14.1 → isolate-0.14.2}/tools/test_agent_requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isolate
3
- Version: 0.14.1
3
+ Version: 0.14.2
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.14.1'
16
- __version_tuple__ = version_tuple = (0, 14, 1)
15
+ __version__ = version = '0.14.2'
16
+ __version_tuple__ = version_tuple = (0, 14, 2)
@@ -117,6 +117,7 @@ def _io_observer(
117
117
  return # Nothing to read
118
118
 
119
119
  for line in raw_data.splitlines():
120
+ # TODO: parse the lines to include `extra={...}` added by the logger?
120
121
  hook(line)
121
122
 
122
123
  def _reader():
@@ -9,6 +9,8 @@ from isolate.logs import LogLevel, LogSource
9
9
  # but it handling `source` would be not trivial, so we are better off
10
10
  # just keeping it simple for now.
11
11
  class IsolateLogger:
12
+ extra_labels: Dict[str, str] = {}
13
+
12
14
  def __init__(self, log_labels: Dict[str, str]):
13
15
  self.log_labels = log_labels
14
16
 
@@ -18,6 +20,7 @@ class IsolateLogger:
18
20
  "level": level.name,
19
21
  "message": message,
20
22
  **self.log_labels,
23
+ **self.extra_labels,
21
24
  }
22
25
  print(json.dumps(record))
23
26
 
@@ -367,9 +367,7 @@ class IsolateServicer(definitions.IsolateServicer):
367
367
 
368
368
  task = self.background_tasks[request.task_id]
369
369
 
370
- task.logger = IsolateLogger.with_env_expanded(
371
- dict(request.metadata.logger_labels)
372
- )
370
+ task.logger.extra_labels = dict(request.metadata.logger_labels)
373
371
 
374
372
  return definitions.SetMetadataResponse()
375
373
 
@@ -379,13 +377,19 @@ class IsolateServicer(definitions.IsolateServicer):
379
377
  context: ServicerContext,
380
378
  ) -> Iterator[definitions.PartialRunResult]:
381
379
  try:
382
- yield from self._run_task(RunTask(request=request))
380
+ # HACK: we can support only one task at a time for Run
381
+ # TODO: move away from this when we use submit for env-aware tasks
382
+ task = RunTask(request=request)
383
+ self.background_tasks["RUN"] = task
384
+ yield from self._run_task(task)
383
385
  except GRPCException as exc:
384
386
  return self.abort_with_msg(
385
387
  exc.message,
386
388
  context,
387
389
  code=exc.code,
388
390
  )
391
+ finally:
392
+ self.background_tasks.pop("RUN", None)
389
393
 
390
394
  def List(
391
395
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isolate
3
- Version: 0.14.1
3
+ Version: 0.14.2
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