isolate 0.13.9__py3-none-any.whl → 0.13.10__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.

@@ -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.9'
16
- __version_tuple__ = version_tuple = (0, 13, 9)
15
+ __version__ = version = '0.13.10'
16
+ __version_tuple__ = version_tuple = (0, 13, 10)
isolate/logger.py CHANGED
@@ -1,15 +1,29 @@
1
1
  import json
2
+ import os
2
3
 
3
4
 
4
5
  # NOTE: we probably should've created a proper `logging.getLogger` here,
5
6
  # but it handling `source` would be not trivial, so we are better off
6
7
  # just keeping it simple for now.
7
8
  class IsolateLogger:
9
+ def __init__(self):
10
+ self.log_labels = {}
11
+ raw = os.getenv("ISOLATE_LOG_LABELS")
12
+ if raw:
13
+ labels = json.loads(raw)
14
+ for key, value in labels.items():
15
+ if value.startswith("$"):
16
+ expanded = os.getenv(value[1:])
17
+ else:
18
+ expanded = value
19
+ self.log_labels[key] = expanded
20
+
8
21
  def log(self, level, message, source):
9
22
  record = {
10
23
  "isolate_source": source.name,
11
24
  "level": level.name,
12
25
  "message": message,
26
+ **self.log_labels,
13
27
  }
14
28
  print(json.dumps(record))
15
29
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isolate
3
- Version: 0.13.9
3
+ Version: 0.13.10
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,7 +1,7 @@
1
1
  isolate/__init__.py,sha256=uXOKnONs7sXgARNgElwr4_A1sKoA6ACHVEvs3IDiX1M,127
2
- isolate/_isolate_version.py,sha256=I63RKqTcPf9RTCjzPcwnvKN-SWCoNcNIRzHaQnVkYig,413
2
+ isolate/_isolate_version.py,sha256=B_BL6eQ9yadF9gaiiJ3EqZhMaaHCCNUTzs-755F92es,415
3
3
  isolate/_version.py,sha256=05pXvy-yr5t3I1m9JMn42Ilzpg7fa8IB2J8a3G7t1cU,274
4
- isolate/logger.py,sha256=SehnK6rPx-HDqQHJ3sKWqhDGmD3fTDGBIkjnNQYnFJU,453
4
+ isolate/logger.py,sha256=Pr-P1UVDIHJkel3ZA3pkAOwXgnGiGjTw-KsxTVc5Y6E,894
5
5
  isolate/logs.py,sha256=R_AHUVYD18z_PhtK_mDWi9Gch79CxmwHY09hUDShtwg,2079
6
6
  isolate/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  isolate/registry.py,sha256=hpzv4HI7iihG5I7i5r8Pb257ibhEKY18xQcG-w1-BgI,1590
@@ -53,9 +53,9 @@ isolate/server/health/health.proto,sha256=wE2_QD0OQAblKkEBG7sALLXEOj1mOLKG-FbC4t
53
53
  isolate/server/health/health_pb2.py,sha256=onOdP3M4Tpqhqs2PlGcyfoKe2VVKUEDx5ALeRcObb9A,1899
54
54
  isolate/server/health/health_pb2.pyi,sha256=CPyvxvDzra-1d-mBsukaJnscMUDBaqSACvo9LiXlFzo,2416
55
55
  isolate/server/health/health_pb2_grpc.py,sha256=XgsULrnRBmYIqvKr8eI7bqs6NIea5A0kkqdOOc2JHBY,5303
56
- isolate-0.13.9.dist-info/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
57
- isolate-0.13.9.dist-info/METADATA,sha256=nSnYPN5KxPVH23bG5jW0ffaaQZXCoTG-pCIHeOrViB4,3191
58
- isolate-0.13.9.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
59
- isolate-0.13.9.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
60
- isolate-0.13.9.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
61
- isolate-0.13.9.dist-info/RECORD,,
56
+ isolate-0.13.10.dist-info/LICENSE,sha256=427vuyirL5scgBLqA9UWcdnxKrtSGc0u_JfUupk6lAA,11359
57
+ isolate-0.13.10.dist-info/METADATA,sha256=EbD9rw4Ys3Z9DcN0pI5ak-aHndo9zGuqOgAjypuK-uw,3192
58
+ isolate-0.13.10.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
59
+ isolate-0.13.10.dist-info/entry_points.txt,sha256=s3prh2EERaVCbL8R45tfY5WFPZ1TsYOsz305YR7s-Pc,360
60
+ isolate-0.13.10.dist-info/top_level.txt,sha256=W9QJBHcq5WXRkbOXf25bvftzFsOZZN4n1DAatdroZrs,8
61
+ isolate-0.13.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5