modal 0.72.45__py3-none-any.whl → 0.72.47__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.
@@ -65,6 +65,8 @@ def run_jupyter(q: Queue):
65
65
  with forward(8888) as tunnel:
66
66
  url = tunnel.url + "/?token=" + token
67
67
  threading.Thread(target=wait_for_port, args=(url, q)).start()
68
+ print("\nJupyter on Modal, opening in browser...")
69
+ print(f" -> {url}\n")
68
70
  subprocess.run(
69
71
  [
70
72
  "jupyter",
@@ -89,7 +91,5 @@ def main():
89
91
  run_jupyter.spawn(q)
90
92
  url = q.get()
91
93
  time.sleep(1) # Give Jupyter a chance to start up
92
- print("\nJupyter on Modal, opening in browser...")
93
- print(f" -> {url}\n")
94
94
  webbrowser.open(url)
95
95
  assert q.get() == "done"
@@ -89,6 +89,9 @@ def run_vscode(q: Queue):
89
89
  token = secrets.token_urlsafe(13)
90
90
  with forward(8080) as tunnel:
91
91
  url = tunnel.url
92
+ print("\nVS Code on Modal, opening in browser...")
93
+ print(f" -> {url}")
94
+ print(f" -> password: {token}\n")
92
95
  threading.Thread(target=wait_for_port, args=((url, token), q)).start()
93
96
  subprocess.run(
94
97
  ["/code-server.sh", "--bind-addr", "0.0.0.0:8080", "."],
@@ -103,8 +106,5 @@ def main():
103
106
  run_vscode.spawn(q)
104
107
  url, token = q.get()
105
108
  time.sleep(1) # Give VS Code a chance to start up
106
- print("\nVS Code on Modal, opening in browser...")
107
- print(f" -> {url}")
108
- print(f" -> password: {token}\n")
109
109
  webbrowser.open(url)
110
110
  assert q.get() == "done"
modal/client.pyi CHANGED
@@ -27,7 +27,7 @@ class _Client:
27
27
  _snapshotted: bool
28
28
 
29
29
  def __init__(
30
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.45"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.47"
31
31
  ): ...
32
32
  def is_closed(self) -> bool: ...
33
33
  @property
@@ -85,7 +85,7 @@ class Client:
85
85
  _snapshotted: bool
86
86
 
87
87
  def __init__(
88
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.45"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.72.47"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
modal/functions.pyi CHANGED
@@ -465,11 +465,11 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
465
465
 
466
466
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
467
467
 
468
- class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
468
+ class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
469
469
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
470
470
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
471
471
 
472
- remote: __remote_spec[ReturnType, P, typing_extensions.Self]
472
+ remote: __remote_spec[P, ReturnType, typing_extensions.Self]
473
473
 
474
474
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
475
475
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -482,17 +482,17 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
482
482
  def _get_obj(self) -> typing.Optional[modal.cls.Obj]: ...
483
483
  def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
484
484
 
485
- class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
485
+ class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
486
486
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
487
487
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
488
488
 
489
- _experimental_spawn: ___experimental_spawn_spec[ReturnType, P, typing_extensions.Self]
489
+ _experimental_spawn: ___experimental_spawn_spec[P, ReturnType, typing_extensions.Self]
490
490
 
491
- class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
491
+ class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
492
492
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
493
493
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
494
494
 
495
- spawn: __spawn_spec[ReturnType, P, typing_extensions.Self]
495
+ spawn: __spawn_spec[P, ReturnType, typing_extensions.Self]
496
496
 
497
497
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
498
498
 
modal/sandbox.py CHANGED
@@ -19,7 +19,7 @@ from ._location import parse_cloud_provider
19
19
  from ._object import _get_environment_name, _Object
20
20
  from ._resolver import Resolver
21
21
  from ._resources import convert_fn_config_to_resources_config
22
- from ._utils.async_utils import synchronize_api
22
+ from ._utils.async_utils import TaskContext, synchronize_api
23
23
  from ._utils.deprecation import deprecation_error
24
24
  from ._utils.grpc_utils import retry_transient_errors
25
25
  from ._utils.mount_utils import validate_network_file_systems, validate_volumes
@@ -517,9 +517,8 @@ class _Sandbox(_Object, type_prefix="sb"):
517
517
  raise InvalidError(f"workdir must be an absolute path, got: {workdir}")
518
518
 
519
519
  # Force secret resolution so we can pass the secret IDs to the backend.
520
- # TODO should we parallelize this?
521
- for secret in secrets:
522
- await secret.hydrate(client=self._client)
520
+ secret_coros = [secret.hydrate(client=self._client) for secret in secrets]
521
+ await TaskContext.gather(*secret_coros)
523
522
 
524
523
  task_id = await self._get_task_id()
525
524
  req = api_pb2.ContainerExecRequest(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modal
3
- Version: 0.72.45
3
+ Version: 0.72.47
4
4
  Summary: Python client library for Modal
5
5
  Author: Modal Labs
6
6
  Author-email: support@modal.com
@@ -20,7 +20,7 @@ modal/app.py,sha256=mz-fmvaL4ND616rqGOi-ikAuQWCv2CKeR_HpviIurYc,45353
20
20
  modal/app.pyi,sha256=aZJkeqsnsv72R7OTLXcifom0c-NBU6xgVhRc9yEt9nE,25760
21
21
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
22
22
  modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
23
- modal/client.pyi,sha256=-Oqla5V-DnYOk6N9Jf-fIMxKEXsAtNhL3ePQ4vQuRQo,7593
23
+ modal/client.pyi,sha256=YBEKf_pdjZ3n-Re4jxkJOeXlsmfAZVPItV9zh7X4Y8M,7593
24
24
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
25
25
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
26
26
  modal/cls.py,sha256=xHgZZAmymplw0I2YZGAA8raBboixdNKKTrnsxQZI7G8,32159
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
39
39
  modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
40
40
  modal/file_pattern_matcher.py,sha256=dSo7BMQGZBAuoBFOX-e_72HxmF3FLzjQlEtnGtJiaD4,6506
41
41
  modal/functions.py,sha256=dUzTocLsL-Huw5dwqs8HCksiOqvGHSTiwnZJOlAluAA,68601
42
- modal/functions.pyi,sha256=X696JUlAbGTjxYIoHd0ga0V1_TsyIHxVvBUe-BQvzRo,26301
42
+ modal/functions.pyi,sha256=lX3zZwIzbHXpmJA5QFki6ozaK3bdrdP-AM91_NFBimg,26301
43
43
  modal/gpu.py,sha256=2qZMNnoMrjU-5Bu7fx68pANUAKTtZq0EWEEeBA9OUVQ,7426
44
44
  modal/image.py,sha256=leeY7fLfFjS0IqTi3D4cRxIDOb80BPtb3jsQfqvVJ8c,90912
45
45
  modal/image.pyi,sha256=QMKS6E3CsZr5DoyNqGpcJPBYJTJZSvtAQIsAhPVd_E4,26347
@@ -65,7 +65,7 @@ modal/retries.py,sha256=HKR2Q9aNPWkMjQ5nwobqYTuZaSuw0a8lI2zrtY5IW98,5230
65
65
  modal/runner.py,sha256=0SCMgKO8lZ9W1C7le1EcgViKERMXpi_-QBd6PF_MH0Q,24450
66
66
  modal/runner.pyi,sha256=YmP4EOCNjjkwSIPi2Gl6hF_ji_ytkxz9dw3iB9KXaOI,5275
67
67
  modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
68
- modal/sandbox.py,sha256=kxcYmCcxRBI1GIfThwWufdLXjusry9fXR6ee2czMtUI,28998
68
+ modal/sandbox.py,sha256=h5bgvt98iFmQs4aBu_d2aR6qP5UM5QVdP3wgm_P7RgE,29014
69
69
  modal/sandbox.pyi,sha256=XtiDHYa4HOooyuEPmKFwEqO58AJBJVTceO_1HQyDwII,21343
70
70
  modal/schedule.py,sha256=0ZFpKs1bOxeo5n3HZjoL7OE2ktsb-_oGtq-WJEPO4tY,2615
71
71
  modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
@@ -127,8 +127,8 @@ modal/cli/token.py,sha256=mxSgOWakXG6N71hQb1ko61XAR9ZGkTMZD-Txn7gmTac,1924
127
127
  modal/cli/utils.py,sha256=hZmjyzcPjDnQSkLvycZD2LhGdcsfdZshs_rOU78EpvI,3717
128
128
  modal/cli/volume.py,sha256=Jrm-1R9u92JbbUM62bkB9RzAM_jO8wi7T2-i6Cb2XG0,10568
129
129
  modal/cli/programs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
130
- modal/cli/programs/run_jupyter.py,sha256=KNaxG4LixbBJdLOzwKZB5IMA6tO1CSjHMKY6SpaIXd0,2685
131
- modal/cli/programs/vscode.py,sha256=0k65NdAvRL3WGtngEYt-3w_kn9x2y3PqzA-dqdaVHtw,3383
130
+ modal/cli/programs/run_jupyter.py,sha256=1X8eQ3gB_IqkJn11Q4dQ9KdIqFVwQQlwkrrSqlFWfPQ,2685
131
+ modal/cli/programs/vscode.py,sha256=c5jKk1ruuC03X1D-hNc2jtTQqofCBweEZH_qxHjkHGo,3383
132
132
  modal/extensions/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
133
133
  modal/extensions/ipython.py,sha256=Xvzy-A7cvwMSDa9p4c4CEMLOX2_Xsg9DkM1J9uyu7jc,983
134
134
  modal/requirements/2023.12.312.txt,sha256=zWWUVgVQ92GXBKNYYr2-5vn9rlnXcmkqlwlX5u1eTYw,400
@@ -167,10 +167,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
167
167
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
168
168
  modal_version/__init__.py,sha256=kGya2ZlItX2zB7oHORs-wvP4PG8lg_mtbi1QIK3G6SQ,470
169
169
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
170
- modal_version/_version_generated.py,sha256=w3FizzJf6S6yRuy7BrJwEDWOlFdTpxh2EDn2a0q_02U,149
171
- modal-0.72.45.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
172
- modal-0.72.45.dist-info/METADATA,sha256=W3ku7Hjc8BGZPz8E1Ck1hS8aqIbu_0grQWHIxTM5QZA,2329
173
- modal-0.72.45.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
174
- modal-0.72.45.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
175
- modal-0.72.45.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
176
- modal-0.72.45.dist-info/RECORD,,
170
+ modal_version/_version_generated.py,sha256=Ly3TRbYg5c7IaFzHo4g0dfndktKC5IRRiBahsmv8Cdw,149
171
+ modal-0.72.47.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
172
+ modal-0.72.47.dist-info/METADATA,sha256=oO7nH8zYiETU4PTFTP5BD8NIMQu5KzB3htHHFy3W5Dw,2329
173
+ modal-0.72.47.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
174
+ modal-0.72.47.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
175
+ modal-0.72.47.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
176
+ modal-0.72.47.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 45 # git: 37aa93f
4
+ build_number = 47 # git: c7200ca