modal 0.73.77__py3-none-any.whl → 0.73.79__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.
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.73.77"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.79"
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.73.77"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.79"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
modal/cls.py CHANGED
@@ -110,11 +110,14 @@ def _bind_instance_method(cls: "_Cls", service_function: _Function, method_name:
110
110
  hydrate_from_instance_service_function(fun)
111
111
 
112
112
  def _deps():
113
- if service_function.is_hydrated:
114
- # without this check, the common service_function will be reloaded by all methods
115
- # TODO(elias): Investigate if we can fix this multi-loader in the resolver - feels like a bug?
116
- return []
117
- return [service_function]
113
+ unhydrated_deps = []
114
+ # without this check, the common service_function will be reloaded by all methods
115
+ # TODO(elias): Investigate if we can fix this multi-loader in the resolver - feels like a bug?
116
+ if not cls.is_hydrated:
117
+ unhydrated_deps.append(cls)
118
+ if not service_function.is_hydrated:
119
+ unhydrated_deps.append(service_function)
120
+ return unhydrated_deps
118
121
 
119
122
  rep = f"Method({cls._name}.{method_name})"
120
123
 
@@ -368,7 +371,7 @@ class _Cls(_Object, type_prefix="cs"):
368
371
  """
369
372
 
370
373
  _class_service_function: Optional[_Function] # The _Function (read "service") serving *all* methods of the class
371
- _options: Optional[_ServiceOptions] # TODO: typed dict/dataclass?
374
+ _options: Optional[_ServiceOptions]
372
375
 
373
376
  _app: Optional["modal.app._App"] = None # not set for lookups
374
377
  _name: Optional[str]
@@ -609,7 +612,24 @@ class _Cls(_Object, type_prefix="cs"):
609
612
  else:
610
613
  resources = None
611
614
 
612
- cls = self.clone()
615
+ async def _load_from_base(new_cls, resolver, existing_object_id):
616
+ # this is a bit confusing, the cls will always have the same metadata
617
+ # since it has the same *class* service function (i.e. "template")
618
+ # But the (instance) service function for each Obj will be different
619
+ # since it will rebind to whatever `_options` have been assigned on
620
+ # the particular Cls parent
621
+ if not self.is_hydrated:
622
+ # this should only happen for Cls.from_name instances
623
+ # other classes should already be hydrated!
624
+ await resolver.load(self)
625
+
626
+ new_cls._initialize_from_other(self)
627
+
628
+ def _deps():
629
+ return []
630
+
631
+ cls = _Cls._from_loader(_load_from_base, rep=f"{self._name}.with_options(...)", is_another_app=True, deps=_deps)
632
+ cls._initialize_from_other(self)
613
633
  cls._options = _ServiceOptions(
614
634
  secrets=secrets,
615
635
  resources=resources,
modal/functions.pyi CHANGED
@@ -198,11 +198,11 @@ class Function(
198
198
 
199
199
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
200
200
 
201
- class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
201
+ class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
202
202
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
203
203
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
204
204
 
205
- remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
205
+ remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
206
206
 
207
207
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
208
208
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -217,19 +217,19 @@ class Function(
217
217
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
218
218
  ) -> modal._functions.OriginalReturnType: ...
219
219
 
220
- class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
220
+ class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
221
221
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
222
222
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
223
223
 
224
224
  _experimental_spawn: ___experimental_spawn_spec[
225
- modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
225
+ modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
226
226
  ]
227
227
 
228
- class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
228
+ class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
229
229
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
230
230
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
231
231
 
232
- spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
232
+ spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
233
233
 
234
234
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
235
235
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: modal
3
- Version: 0.73.77
3
+ Version: 0.73.79
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -22,10 +22,10 @@ modal/app.py,sha256=kF3frIt4eRKVYYCjusMMhKJpO_lDdm2z37HOXPwpjT8,45506
22
22
  modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
25
- modal/client.pyi,sha256=Pz702Nbzk12XDU_wdlGt1PTWzNgS5-BL6Rj-Lf5Z1bE,7593
25
+ modal/client.pyi,sha256=LUm176HWUYSV8dpusWMDUQ6vAEXOXOCaaZiVejf4Fqs,7593
26
26
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
27
27
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
28
- modal/cls.py,sha256=0LKIHboBFRY291VsG0ick_6KZk2ArK1RLus9mlTZtJ8,30726
28
+ modal/cls.py,sha256=5DjpSBP1IyROKZm5ItDiEGdbRnfTT6K1Ul0jEvEKw_Q,31695
29
29
  modal/cls.pyi,sha256=ZJUwtRaQBGlM6tphvnv49FHBVDSgttMdD_LnYyRSKJM,10302
30
30
  modal/config.py,sha256=Boz1bPzaG-k5Grjq6y6fAELH1N_gTuYDnpB6FODzCPo,11710
31
31
  modal/container_process.py,sha256=WTqLn01dJPVkPpwR_0w_JH96ceN5mV4TGtiu1ZR2RRA,6108
@@ -41,7 +41,7 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
41
41
  modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
42
42
  modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
43
43
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
44
- modal/functions.pyi,sha256=D-PDJfSbwqMDXdq7Bxu2ErZRENo-tRgu_zPoB-jl0OU,14377
44
+ modal/functions.pyi,sha256=ujc6eIYyNmMn__4dpxEy85-vZmAniZv56D2A4uBgs6U,14377
45
45
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
46
46
  modal/image.py,sha256=adMUpS7WrCu-M78BWslz2r6GPviy4qPvd5Dh-dBIrrk,90257
47
47
  modal/image.pyi,sha256=L7aZUOElSGtNHmFHz1RgKP1cG5paiXt_EzylrwBwzVk,25004
@@ -151,10 +151,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
151
151
  modal_docs/mdmd/mdmd.py,sha256=Irx49MCCTlBOP4FBdLR--JrpA3-WhsVeriq0LGgsRic,6232
152
152
  modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
153
153
  modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
154
- modal_proto/api.proto,sha256=WicbpbxFPsKF0nXbohw74idF_fR8PAf8T8Iy5vWdz4w,86963
154
+ modal_proto/api.proto,sha256=VLnKOpxizZu0gRV5b1r0IPASNjshgXVELcnNtVIQyp0,86984
155
155
  modal_proto/api_grpc.py,sha256=FYGqDegM_w_qxdtlxum8k31mDibKoMvmNxv_p9cKdKs,109056
156
- modal_proto/api_pb2.py,sha256=CN0OSy4lphR4jwBXKwosX435CBAAfyOvwJDxGnk4T_Y,312465
157
- modal_proto/api_pb2.pyi,sha256=Pl6qHcCHTgvnYOFcTs1WEZkj_6ToE96mEP9T58eAfb4,421206
156
+ modal_proto/api_pb2.py,sha256=AHwcwSSePDkUdgpniC70tQ31G2G8xZOjGbWgUzeOXJY,312504
157
+ modal_proto/api_pb2.pyi,sha256=US4UbIgi_FPOBJxgbFl7JFzrodOtF93nBCB8dnxSTbg,421326
158
158
  modal_proto/api_pb2_grpc.py,sha256=DNp0Et5i_Ey4dKx_1o1LRtYhyWYyT0NzTcAY4EcHn-c,235765
159
159
  modal_proto/api_pb2_grpc.pyi,sha256=RI6tWC3L8EIN4-izFSEGPPJl5Ta0lXPNuHUJaWAr35s,54892
160
160
  modal_proto/modal_api_grpc.py,sha256=UG8WJU81afrWPwItWB4Ag64E9EpyREMpBbAVGVEYJiM,14550
@@ -168,10 +168,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
168
168
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
169
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
170
170
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
171
- modal_version/_version_generated.py,sha256=3PMwQ2aqnXHX71h9sw3Oe5RJdzScfCrLIwFoBDCVDqc,149
172
- modal-0.73.77.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
173
- modal-0.73.77.dist-info/METADATA,sha256=Qw57v7B3T8x4RkVU1V0YxSGksoaZbwXDKtiE_IYMOwU,2452
174
- modal-0.73.77.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
175
- modal-0.73.77.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
176
- modal-0.73.77.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
177
- modal-0.73.77.dist-info/RECORD,,
171
+ modal_version/_version_generated.py,sha256=H6wtGYKaMHyfFOOwryDMwQlTAIlF-0u3tll9LNMiHho,149
172
+ modal-0.73.79.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
173
+ modal-0.73.79.dist-info/METADATA,sha256=ZLOd0aSIbtF4u_JfTwsUOS1dAWtWES5aJwP3EjnBDno,2452
174
+ modal-0.73.79.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
175
+ modal-0.73.79.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
176
+ modal-0.73.79.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
177
+ modal-0.73.79.dist-info/RECORD,,
modal_proto/api.proto CHANGED
@@ -2338,6 +2338,7 @@ message SandboxInfo {
2338
2338
  string id = 1;
2339
2339
  double created_at = 3;
2340
2340
  TaskInfo task_info = 4;
2341
+ string app_id = 5;
2341
2342
 
2342
2343
  reserved 2; // modal.client.Sandbox definition
2343
2344
  }