modal 0.67.35__py3-none-any.whl → 0.67.37__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.
@@ -908,7 +908,7 @@ class _ContainerIOManager:
908
908
  if self.checkpoint_id:
909
909
  logger.debug(f"Checkpoint ID: {self.checkpoint_id} (Memory Snapshot ID)")
910
910
  else:
911
- logger.debug("No checkpoint ID provided (Memory Snapshot ID)")
911
+ raise ValueError("No checkpoint ID provided for memory snapshot")
912
912
 
913
913
  # Pause heartbeats since they keep the client connection open which causes the snapshotter to crash
914
914
  async with self.heartbeat_condition:
@@ -918,7 +918,7 @@ class _ContainerIOManager:
918
918
  self.heartbeat_condition.notify_all()
919
919
 
920
920
  await self._client.stub.ContainerCheckpoint(
921
- api_pb2.ContainerCheckpointRequest(checkpoint_id=self.checkpoint_id or "")
921
+ api_pb2.ContainerCheckpointRequest(checkpoint_id=self.checkpoint_id)
922
922
  )
923
923
 
924
924
  await self._client._close(prep_for_restore=True)
modal/cli/_traceback.py CHANGED
@@ -1,6 +1,7 @@
1
1
  # Copyright Modal Labs 2024
2
2
  """Helper functions related to displaying tracebacks in the CLI."""
3
3
  import functools
4
+ import re
4
5
  import warnings
5
6
  from typing import Optional
6
7
 
@@ -166,8 +167,12 @@ def highlight_modal_deprecation_warnings() -> None:
166
167
  def showwarning(warning, category, filename, lineno, file=None, line=None):
167
168
  if issubclass(category, (DeprecationError, PendingDeprecationError)):
168
169
  content = str(warning)
169
- date = content[:10]
170
- message = content[11:].strip()
170
+ if re.match(r"^\d{4}-\d{2}-\d{2}", content):
171
+ date = content[:10]
172
+ message = content[11:].strip()
173
+ else:
174
+ date = ""
175
+ message = content
171
176
  try:
172
177
  with open(filename, encoding="utf-8", errors="replace") as code_file:
173
178
  source = code_file.readlines()[lineno - 1].strip()
@@ -178,7 +183,7 @@ def highlight_modal_deprecation_warnings() -> None:
178
183
  panel = Panel(
179
184
  message,
180
185
  style="yellow",
181
- title=f"Modal Deprecation Warning ({date})",
186
+ title=f"Modal Deprecation Warning ({date})" if date else "Modal Deprecation Warning",
182
187
  title_align="left",
183
188
  )
184
189
  Console().print(panel)
modal/cli/app.py CHANGED
@@ -115,7 +115,7 @@ def logs(
115
115
  ```
116
116
 
117
117
  """
118
- app_identifier = warn_on_name_option("stop", app_identifier, name)
118
+ app_identifier = warn_on_name_option("logs", app_identifier, name)
119
119
  app_id = get_app_id(app_identifier, env)
120
120
  stream_app_logs(app_id)
121
121
 
modal/client.py CHANGED
@@ -147,7 +147,7 @@ class _Client:
147
147
  )
148
148
  if resp.warning:
149
149
  ALARM_EMOJI = chr(0x1F6A8)
150
- warnings.warn(f"{ALARM_EMOJI} {resp.warning} {ALARM_EMOJI}", DeprecationError)
150
+ warnings.warn_explicit(f"{ALARM_EMOJI} {resp.warning} {ALARM_EMOJI}", DeprecationError, "<unknown>", 0)
151
151
  except GRPCError as exc:
152
152
  if exc.status == Status.FAILED_PRECONDITION:
153
153
  raise VersionError(
modal/client.pyi CHANGED
@@ -26,7 +26,7 @@ class _Client:
26
26
  _stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
27
27
 
28
28
  def __init__(
29
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.67.35"
29
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.67.37"
30
30
  ): ...
31
31
  def is_closed(self) -> bool: ...
32
32
  @property
@@ -81,7 +81,7 @@ class Client:
81
81
  _stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
82
82
 
83
83
  def __init__(
84
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.67.35"
84
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.67.37"
85
85
  ): ...
86
86
  def is_closed(self) -> bool: ...
87
87
  @property
modal/functions.pyi CHANGED
@@ -455,11 +455,11 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
455
455
 
456
456
  _call_generator_nowait: ___call_generator_nowait_spec
457
457
 
458
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
458
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
459
459
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
460
460
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
461
461
 
462
- remote: __remote_spec[P, ReturnType]
462
+ remote: __remote_spec[ReturnType, P]
463
463
 
464
464
  class __remote_gen_spec(typing_extensions.Protocol):
465
465
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -471,17 +471,17 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
471
471
  def _get_obj(self) -> typing.Optional[modal.cls.Obj]: ...
472
472
  def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
473
473
 
474
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
474
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
475
475
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
476
476
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
477
477
 
478
- _experimental_spawn: ___experimental_spawn_spec[P, ReturnType]
478
+ _experimental_spawn: ___experimental_spawn_spec[ReturnType, P]
479
479
 
480
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
480
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
481
481
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
482
482
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
483
483
 
484
- spawn: __spawn_spec[P, ReturnType]
484
+ spawn: __spawn_spec[ReturnType, P]
485
485
 
486
486
  def get_raw_f(self) -> typing.Callable[..., typing.Any]: ...
487
487
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modal
3
- Version: 0.67.35
3
+ Version: 0.67.37
4
4
  Summary: Python client library for Modal
5
5
  Author: Modal Labs
6
6
  Author-email: support@modal.com
@@ -18,8 +18,8 @@ modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
18
18
  modal/app.py,sha256=EJ7FUN6rWnSwLJoYJh8nmKg_t-8hdN8_rt0OrkP7JvQ,46084
19
19
  modal/app.pyi,sha256=BE5SlR5tRECuc6-e2lUuOknDdov3zxgZ4N0AsLb5ZVQ,25270
20
20
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
21
- modal/client.py,sha256=VMg_aIuo_LOEe2ttxBHEND3PLhTp5lo-onH4wELhIyY,16375
22
- modal/client.pyi,sha256=jvOfiy-GKM6tGPJM_Wt-IV5OJrDPt9Cppmbi85466lo,7354
21
+ modal/client.py,sha256=cmylZhU35txmrx4nltNYuuqXRgeoMtm0ow1J9wJkEYQ,16400
22
+ modal/client.pyi,sha256=PQliOg8QgQZBQyaPNhZq5kxq9VhJsNw14tDw8koItxQ,7354
23
23
  modal/cloud_bucket_mount.py,sha256=G7T7jWLD0QkmrfKR75mSTwdUZ2xNfj7pkVqb4ipmxmI,5735
24
24
  modal/cloud_bucket_mount.pyi,sha256=CEi7vrH3kDUF4LAy4qP6tfImy2UJuFRcRbsgRNM1wo8,1403
25
25
  modal/cls.py,sha256=OJqzj_V-n1g48BY_4Jg_BOTQdftEEl4kTWN0X4FOOdg,27378
@@ -34,7 +34,7 @@ modal/environments.pyi,sha256=XalNpiPkAtHWAvOU2Cotq0ozmtl-Jv0FDsR8h9mr27Q,3521
34
34
  modal/exception.py,sha256=EBkdWVved2XEPsXaoPRu56xfxFFHL9iuqvUsdj42WDA,6392
35
35
  modal/experimental.py,sha256=jFuNbwrNHos47viMB9q-cHJSvf2RDxDdoEcss9plaZE,2302
36
36
  modal/functions.py,sha256=Lteg8dMa8ly72-RM1ozxeGQ500pdeFyJgtflVwp3U7Q,66629
37
- modal/functions.pyi,sha256=3Jupx4QKaqQ9p9XQSG4zDjB3W-87EYkFg55w2QuSQ8M,24892
37
+ modal/functions.pyi,sha256=DXodybnhZ4kD0CAFmQXRTv6FhcsHIgZ5TT_rInG3xDo,24892
38
38
  modal/gpu.py,sha256=r4rL6uH3UJIQthzYvfWauXNyh01WqCPtKZCmmSX1fd4,6881
39
39
  modal/image.py,sha256=cQ6WP1xHXZT_nY8z3aEFiGwKzrTV0yxi3Ab8JzF91eo,79653
40
40
  modal/image.pyi,sha256=PIKH6JBA4L5TfdJrQu3pm2ykyIITmiP920TpP8cdyQA,24585
@@ -75,7 +75,7 @@ modal/volume.py,sha256=IISuMeXq9MoSkhXg8Q6JG0F-2n9NTkWk0xGuJB8l3d8,29159
75
75
  modal/volume.pyi,sha256=St0mDiaojfep6Bs4sBbkRJmeacYHF6lh6FKOWGmheHA,11182
76
76
  modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
77
77
  modal/_runtime/asgi.py,sha256=GvuxZqWnIHMIR-Bx5f7toCQlkERaJO8CHjTPNM9IFIw,21537
78
- modal/_runtime/container_io_manager.py,sha256=yVKSBBybfciDaady7NxOPVU5cm9qL690OgdZ4dZN1bs,44134
78
+ modal/_runtime/container_io_manager.py,sha256=8NyX5uuwmHEJgxMwdoY9PpEO-IHA8LGdYdbdHLIafK8,44131
79
79
  modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
80
80
  modal/_runtime/telemetry.py,sha256=T1RoAGyjBDr1swiM6pPsGRSITm7LI5FDK18oNXxY08U,5163
81
81
  modal/_runtime/user_code_imports.py,sha256=q_3JOYqCPDcVFZWCHEjyEqj8yzdFsQ49HzeqYmFDLbk,14521
@@ -101,8 +101,8 @@ modal/_vendor/cloudpickle.py,sha256=Loq12qo7PBNbE4LFVEW6BdMMwY10MG94EOW1SCpcnQ0,
101
101
  modal/_vendor/tblib.py,sha256=g1O7QUDd3sDoLd8YPFltkXkih7r_fyZOjgmGuligv3s,9722
102
102
  modal/cli/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
103
103
  modal/cli/_download.py,sha256=t6BXZwjTd9MgznDvbsV8rp0FZWggdzC-lUAGZU4xx1g,3984
104
- modal/cli/_traceback.py,sha256=WRs24CaEY1VW2tx8d4JZLipeTXe9YprQiPX8OmCAAP8,6936
105
- modal/cli/app.py,sha256=RtiZhHjg-9lAQV2goKqALnK44xuBbUkapnBBaoQdZ04,7717
104
+ modal/cli/_traceback.py,sha256=Tm0g4V_fr4XAlmuh_4MNgZKtjJly9wsWtnKKvOJFM7Q,7130
105
+ modal/cli/app.py,sha256=KOU3tKdcw50612rmN2LmO-N8cT1M1-UgLs7tw68Kgds,7717
106
106
  modal/cli/config.py,sha256=pXPLmX0bIoV57rQNqIPK7V-yllj-GPRY4jiBO_EklGg,1667
107
107
  modal/cli/container.py,sha256=lRSrxnl7bTLLW9T6hzkqOxqFzzV9qHyXPOuOHY8zkc4,3194
108
108
  modal/cli/dict.py,sha256=gwX4ZBsrr0dpWf_B5_5GN_ealcVzpcGyvY24dEY4y3Y,4455
@@ -159,10 +159,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
159
159
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
160
160
  modal_version/__init__.py,sha256=3IY-AWLH55r35_mQXIaut0jrJvoPuf1NZJBQQfSbPuo,470
161
161
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
162
- modal_version/_version_generated.py,sha256=TB2aU4j9kfcxSShaiYFWGAnrJHHvs4rebXvTjhJE--A,149
163
- modal-0.67.35.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
164
- modal-0.67.35.dist-info/METADATA,sha256=zsKsNwurhlj1Bame_jPz_NF0SAKiILTnnXmIIwk-c8I,2329
165
- modal-0.67.35.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
166
- modal-0.67.35.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
167
- modal-0.67.35.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
168
- modal-0.67.35.dist-info/RECORD,,
162
+ modal_version/_version_generated.py,sha256=0ZVUTUMyQmX9WMAzUW4ERsGyr3A3X6IRS1mWW5OAjJI,149
163
+ modal-0.67.37.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
164
+ modal-0.67.37.dist-info/METADATA,sha256=80QihddjVsEJ_-OEYTZr20zRzyJMAqAUKX8EywLmnPo,2329
165
+ modal-0.67.37.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
166
+ modal-0.67.37.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
167
+ modal-0.67.37.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
168
+ modal-0.67.37.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2024
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 35 # git: d815540
4
+ build_number = 37 # git: d4f4dcc