isolate 0.19.2__py3-none-any.whl → 0.21.0__py3-none-any.whl

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.

@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.19.2'
32
- __version_tuple__ = version_tuple = (0, 19, 2)
31
+ __version__ = version = '0.21.0'
32
+ __version_tuple__ = version_tuple = (0, 21, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -41,23 +41,20 @@ class IsolateSettings:
41
41
 
42
42
  line = log.message.lower()
43
43
 
44
- if "[error]" in line:
44
+ if line.startswith("error") or "[error]" in line:
45
45
  return replace(log, level=LogLevel.ERROR)
46
- if "[warning]" in line:
46
+ if line.startswith("warning") or "[warning]" in line:
47
47
  return replace(log, level=LogLevel.WARNING)
48
- if "[warn]" in line:
48
+ if line.startswith("warn") or "[warn]" in line:
49
49
  return replace(log, level=LogLevel.WARNING)
50
- if "[info]" in line:
50
+ if line.startswith("info") or "[info]" in line:
51
51
  return replace(log, level=LogLevel.INFO)
52
- if "[debug]" in line:
52
+ if line.startswith("debug") or "[debug]" in line:
53
53
  return replace(log, level=LogLevel.DEBUG)
54
- if "[trace]" in line:
54
+ if line.startswith("trace") or "[trace]" in line:
55
55
  return replace(log, level=LogLevel.TRACE)
56
56
 
57
- if log.level == LogLevel.STDERR:
58
- return replace(log, level=LogLevel.ERROR)
59
-
60
- # Default to INFO level
57
+ # Default all to INFO level, even STDERR
61
58
  return replace(log, level=LogLevel.INFO)
62
59
 
63
60
  def _get_temp_base(self) -> Path:
@@ -16,7 +16,7 @@ from typing import (
16
16
  )
17
17
 
18
18
  from isolate import __version__ as isolate_version
19
- from isolate.backends.common import get_executable_path, logged_io
19
+ from isolate.backends.common import active_python, get_executable_path, logged_io
20
20
  from isolate.connections.common import AGENT_SIGNATURE
21
21
  from isolate.logs import LogLevel, LogSource
22
22
 
@@ -112,7 +112,16 @@ class PythonExecutionBase(Generic[ConnectionType]):
112
112
  """Start the agent process with the Python binary available inside the
113
113
  bound environment."""
114
114
 
115
- python_executable = get_executable_path(self.environment_path, "python")
115
+ python_version = getattr(self.environment, "python_version", active_python())
116
+ try:
117
+ # prefer the specific version if available.
118
+ python_executable = get_executable_path(
119
+ self.environment_path, f"python{python_version}"
120
+ )
121
+ except FileNotFoundError:
122
+ # fallback to the generic binary.
123
+ python_executable = get_executable_path(self.environment_path, "python")
124
+
116
125
  with logged_io(
117
126
  partial(
118
127
  self.handle_agent_log, source=LogSource.USER, level=LogLevel.STDOUT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isolate
3
- Version: 0.19.2
3
+ Version: 0.21.0
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
@@ -1,5 +1,5 @@
1
1
  isolate/__init__.py,sha256=uXOKnONs7sXgARNgElwr4_A1sKoA6ACHVEvs3IDiX1M,127
2
- isolate/_isolate_version.py,sha256=NqBy1rbYwVdMqYV9-0RCqsazuClgU1vC5AUpuTma8p0,706
2
+ isolate/_isolate_version.py,sha256=1jNZfFOI753oBgzdezhn3bNQqGrO2IvFnr4lHXE6EpI,706
3
3
  isolate/_version.py,sha256=05pXvy-yr5t3I1m9JMn42Ilzpg7fa8IB2J8a3G7t1cU,274
4
4
  isolate/logger.py,sha256=IXPebob_fV8bl8HAyKcheXcTJocfdWk-v-ujSl13oVA,1718
5
5
  isolate/logs.py,sha256=R_AHUVYD18z_PhtK_mDWi9Gch79CxmwHY09hUDShtwg,2079
@@ -13,14 +13,14 @@ isolate/backends/container.py,sha256=yGrPM1rp66o_zLw-YLSbEcUVeoIsFalhywot0Sc4B-A
13
13
  isolate/backends/local.py,sha256=woxe4dmXuEHxWKsGNndoRA1_sP6yG-dg6tlFZni0mZc,1360
14
14
  isolate/backends/pyenv.py,sha256=ZwTYoVPIWhS3Y4hN51x95aIOHi15GF7kEDdKTNhlMTE,5434
15
15
  isolate/backends/remote.py,sha256=z6QyBiCt8ltv4Zm8IYX3zyMkBH1k8lTowhnD92-Ed2M,4293
16
- isolate/backends/settings.py,sha256=LvYn4ox9pyFs7bO7WMpDdQHjGOrMn6bdDrHnpfOJyAQ,4443
16
+ isolate/backends/settings.py,sha256=w3sWyYkXhxPY-mJJ9mrjYBTjYULk022H3MWFc2xjyoM,4532
17
17
  isolate/backends/virtualenv.py,sha256=CdzDO4stxNCMbBsNnR1agwyu2FDBDx9UwJWI7bv010k,6992
18
18
  isolate/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  isolate/common/timestamp.py,sha256=seh7FrMRH4i1SCQavA8d-7z8qi0pP8lYYhd29gTPMwE,367
20
20
  isolate/connections/__init__.py,sha256=oa0PNo7ZQ0StPIDvKnJ02_CNVMyfOhxJ3M1C0VMvj9c,627
21
21
  isolate/connections/common.py,sha256=qR4_v4fccpGoUdFHA1Hx1arSe01J3IIom9uhSKE72uQ,3709
22
22
  isolate/connections/_local/__init__.py,sha256=6FtCKRSFBvTvjm5LNlNA-mieKEq3J7DZZRPcXVedERo,146
23
- isolate/connections/_local/_base.py,sha256=wx6WkP_zBZ7zHOq2mHqafVUAvGDMQGRELX64-o-uCdo,6676
23
+ isolate/connections/_local/_base.py,sha256=tZkCUSFMV7pgxRLnvhzBmQYw7ri_8QH1KqojoH4FXD0,7063
24
24
  isolate/connections/_local/agent_startup.py,sha256=F6f75vCy7KJiAoP7xAMO2XnkYpsi5TRCVWi4pmGkoU8,1844
25
25
  isolate/connections/grpc/__init__.py,sha256=tcesLxlC36P6wSg2lBcO2egsJWMbSKwc8zFXhWac3YU,85
26
26
  isolate/connections/grpc/_base.py,sha256=kUB-EDetcyb0fsYfH25E14DrxbVXe19bEH4u5b0-Gqw,5656
@@ -53,9 +53,9 @@ isolate/server/health/health.proto,sha256=wE2_QD0OQAblKkEBG7sALLXEOj1mOLKG-FbC4t
53
53
  isolate/server/health/health_pb2.py,sha256=-fd91wiaZOSJj_zeo55IqxMBsQGuGF-yjZS-Wc1RaS0,1897
54
54
  isolate/server/health/health_pb2.pyi,sha256=AK-DPCpJzoYhU6DydD856c0Ywx84x6k-Cs4m6HpNv5A,2459
55
55
  isolate/server/health/health_pb2_grpc.py,sha256=BrwuS8t4w6K-XVxIdrUQj5Rn0FAMXrYB2iFgUfeXGMM,3913
56
- isolate-0.19.2.dist-info/licenses/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
57
- isolate-0.19.2.dist-info/METADATA,sha256=eO3CGmeKtJmWUTpmUCjtlIg0mhOSCJgFNrfZbVpPkUY,3201
58
- isolate-0.19.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
59
- isolate-0.19.2.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
60
- isolate-0.19.2.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
61
- isolate-0.19.2.dist-info/RECORD,,
56
+ isolate-0.21.0.dist-info/licenses/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
57
+ isolate-0.21.0.dist-info/METADATA,sha256=0UW4MvIzZjpfpmfhjDx2o3r-ldR1STNG9Ic_8peB_sY,3201
58
+ isolate-0.21.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
59
+ isolate-0.21.0.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
60
+ isolate-0.21.0.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
61
+ isolate-0.21.0.dist-info/RECORD,,