modal 0.73.59__py3-none-any.whl → 0.73.61__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/_functions.py CHANGED
@@ -473,51 +473,41 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
473
473
 
474
474
  explicit_mounts = mounts
475
475
 
476
- if is_local():
477
- include_source_mode = get_include_source_mode(include_source)
478
- if include_source_mode != IncludeSourceMode.INCLUDE_NOTHING:
479
- entrypoint_mounts = info.get_entrypoint_mount()
480
- else:
481
- entrypoint_mounts = {}
482
-
483
- all_mounts = [
484
- _get_client_mount(),
485
- *explicit_mounts,
486
- *entrypoint_mounts.values(),
487
- ]
488
-
489
- if include_source_mode is IncludeSourceMode.INCLUDE_FIRST_PARTY:
490
- auto_mounts = get_sys_modules_mounts()
491
- # don't need to add entrypoint modules to automounts:
492
- for entrypoint_module in entrypoint_mounts:
493
- auto_mounts.pop(entrypoint_module, None)
494
-
495
- warn_missing_modules = set(auto_mounts.keys()) - image._added_python_source_set
496
-
497
- if warn_missing_modules:
498
- python_stringified_modules = ", ".join(f'"{mod}"' for mod in sorted(warn_missing_modules))
499
- deprecation_warning(
500
- (2025, 2, 3),
501
- (
502
- 'Modal will stop implicitly adding local Python modules to the Image ("automounting") in a '
503
- "future update. The following modules need to be explicitly added for future "
504
- "compatibility:\n"
505
- )
506
- + "\n".join(sorted([f"* {m}" for m in warn_missing_modules]))
507
- + "\n\n"
508
- + (
509
- "e.g.:\n"
510
- f"image_with_source = my_image.add_local_python_source({python_stringified_modules})\n\n"
511
- )
512
- + "For more information, see https://modal.com/docs/guide/modal-1-0-migration",
513
- )
514
- all_mounts += auto_mounts.values()
476
+ include_source_mode = get_include_source_mode(include_source)
477
+ if include_source_mode != IncludeSourceMode.INCLUDE_NOTHING:
478
+ entrypoint_mounts = info.get_entrypoint_mount()
515
479
  else:
516
- # skip any mount introspection/logic inside containers, since the function
517
- # should already be hydrated
518
- # TODO: maybe the entire from_args loader should be exited early if not local?
519
- # since it will be hydrated
520
- all_mounts = []
480
+ entrypoint_mounts = {}
481
+
482
+ all_mounts = [
483
+ _get_client_mount(),
484
+ *explicit_mounts,
485
+ *entrypoint_mounts.values(),
486
+ ]
487
+
488
+ if include_source_mode is IncludeSourceMode.INCLUDE_FIRST_PARTY and is_local():
489
+ auto_mounts = get_sys_modules_mounts()
490
+ # don't need to add entrypoint modules to automounts:
491
+ for entrypoint_module in entrypoint_mounts:
492
+ auto_mounts.pop(entrypoint_module, None)
493
+
494
+ warn_missing_modules = set(auto_mounts.keys()) - image._added_python_source_set
495
+
496
+ if warn_missing_modules:
497
+ python_stringified_modules = ", ".join(f'"{mod}"' for mod in sorted(warn_missing_modules))
498
+ deprecation_warning(
499
+ (2025, 2, 3),
500
+ (
501
+ 'Modal will stop implicitly adding local Python modules to the Image ("automounting") in a '
502
+ "future update. The following modules need to be explicitly added for future "
503
+ "compatibility:\n"
504
+ )
505
+ + "\n".join(sorted([f"* {m}" for m in warn_missing_modules]))
506
+ + "\n\n"
507
+ + (f"e.g.:\nimage_with_source = my_image.add_local_python_source({python_stringified_modules})\n\n")
508
+ + "For more information, see https://modal.com/docs/guide/modal-1-0-migration",
509
+ )
510
+ all_mounts += auto_mounts.values()
521
511
 
522
512
  retry_policy = _parse_retries(
523
513
  retries, f"Function '{info.get_tag()}'" if info.raw_f else f"Class '{info.get_tag()}'"
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.59"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.61"
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.59"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.61"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
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
 
modal/image.py CHANGED
@@ -85,6 +85,8 @@ AUTO_DOCKERIGNORE = _AutoDockerIgnoreSentinel()
85
85
  COPY_DEPRECATION_MESSAGE_PATTERN = """modal.Image.copy_* methods will soon be deprecated.
86
86
 
87
87
  Use {replacement} instead, which is functionally and performance-wise equivalent.
88
+
89
+ See https://modal.com/docs/guide/modal-1-0-migration for more details.
88
90
  """
89
91
 
90
92
 
@@ -801,7 +803,7 @@ class _Image(_Object, type_prefix="im"):
801
803
  works in a `Dockerfile`.
802
804
  """
803
805
  deprecation_warning(
804
- (2024, 1, 13), COPY_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_file"), pending=True
806
+ (2025, 1, 13), COPY_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_file"), pending=True
805
807
  )
806
808
  basename = str(Path(local_path).name)
807
809
 
@@ -911,7 +913,7 @@ class _Image(_Object, type_prefix="im"):
911
913
  ```
912
914
  """
913
915
  deprecation_warning(
914
- (2024, 1, 13), COPY_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_dir"), pending=True
916
+ (2025, 1, 13), COPY_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_dir"), pending=True
915
917
  )
916
918
 
917
919
  def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec:
@@ -1418,7 +1420,7 @@ class _Image(_Object, type_prefix="im"):
1418
1420
  "`Image.conda` is deprecated."
1419
1421
  " Please use the faster and more reliable `Image.micromamba` constructor instead."
1420
1422
  )
1421
- deprecation_error((2024, 5, 2), message)
1423
+ deprecation_error((2025, 5, 2), message)
1422
1424
 
1423
1425
  def conda_install(
1424
1426
  self,
@@ -1433,7 +1435,7 @@ class _Image(_Object, type_prefix="im"):
1433
1435
  "`Image.conda_install` is deprecated."
1434
1436
  " Please use the faster and more reliable `Image.micromamba_install` instead."
1435
1437
  )
1436
- deprecation_error((2024, 5, 2), message)
1438
+ deprecation_error((2025, 5, 2), message)
1437
1439
 
1438
1440
  def conda_update_from_environment(
1439
1441
  self,
@@ -1448,7 +1450,7 @@ class _Image(_Object, type_prefix="im"):
1448
1450
  "Image.conda_update_from_environment` is deprecated."
1449
1451
  " Please use the `Image.micromamba_install` method (with the `spec_file` parameter) instead."
1450
1452
  )
1451
- deprecation_error((2024, 5, 2), message)
1453
+ deprecation_error((2025, 5, 2), message)
1452
1454
 
1453
1455
  @staticmethod
1454
1456
  def micromamba(
modal/mount.py CHANGED
@@ -51,6 +51,8 @@ PYTHON_STANDALONE_VERSIONS: dict[str, tuple[str, str]] = {
51
51
  MOUNT_DEPRECATION_MESSAGE_PATTERN = """modal.Mount usage will soon be deprecated.
52
52
 
53
53
  Use {replacement} instead, which is functionally and performance-wise equivalent.
54
+
55
+ See https://modal.com/docs/guide/modal-1-0-migration for more details.
54
56
  """
55
57
 
56
58
 
@@ -408,7 +410,7 @@ class _Mount(_Object, type_prefix="mo"):
408
410
  ```
409
411
  """
410
412
  deprecation_warning(
411
- (2024, 1, 8), MOUNT_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_dir"), pending=True
413
+ (2025, 1, 8), MOUNT_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_dir"), pending=True
412
414
  )
413
415
  return _Mount._from_local_dir(local_path, remote_path=remote_path, condition=condition, recursive=recursive)
414
416
 
@@ -465,7 +467,7 @@ class _Mount(_Object, type_prefix="mo"):
465
467
  ```
466
468
  """
467
469
  deprecation_warning(
468
- (2024, 1, 8), MOUNT_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_file"), pending=True
470
+ (2025, 1, 8), MOUNT_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_file"), pending=True
469
471
  )
470
472
  return _Mount._from_local_file(local_path, remote_path)
471
473
 
@@ -636,7 +638,7 @@ class _Mount(_Object, type_prefix="mo"):
636
638
  ```
637
639
  """
638
640
  deprecation_warning(
639
- (2024, 1, 8),
641
+ (2025, 1, 8),
640
642
  MOUNT_DEPRECATION_MESSAGE_PATTERN.format(replacement="image.add_local_python_source"),
641
643
  pending=True,
642
644
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: modal
3
- Version: 0.73.59
3
+ Version: 0.73.61
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -3,7 +3,7 @@ modal/__main__.py,sha256=CgIjP8m1xJjjd4AXc-delmR6LdBCZclw2A_V38CFIio,2870
3
3
  modal/_clustered_functions.py,sha256=kTf-9YBXY88NutC1akI-gCbvf01RhMPCw-zoOI_YIUE,2700
4
4
  modal/_clustered_functions.pyi,sha256=vllkegc99A0jrUOWa8mdlSbdp6uz36TsHhGxysAOpaQ,771
5
5
  modal/_container_entrypoint.py,sha256=arhkIoF8nQNfa4iwYGSoqN3QMDg5M38QNAODXC8TlKc,29301
6
- modal/_functions.py,sha256=EuB4p-9-__OLovkVHOr4qN-RPtUv-ZgwZJ3XRcUnGhg,71203
6
+ modal/_functions.py,sha256=krX2JY_Ez_pInUcyjfSlkyG88B9ju0fxZ9uAQd6RkGY,70684
7
7
  modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
8
8
  modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
9
9
  modal/_object.py,sha256=ItQcsMNkz9Y3kdTsvfNarbW-paJ2qabDyQ7njaqY0XI,11359
@@ -22,7 +22,7 @@ modal/app.py,sha256=o5mHoHtn41nkvskX_ekJkyfG6MXwj5rqerRi_nnPd0w,44725
22
22
  modal/app.pyi,sha256=0MMCgskIL4r3eq8oBcfm2lLyeao2gXjS3iXaIfmaJ-o,25959
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
25
- modal/client.pyi,sha256=qe6s6tLt9L-5dSqdveiA-Z3Ca3Bsivfnc4DLpvAMM7k,7593
25
+ modal/client.pyi,sha256=1tmiNTBt14hiXWmV0rBishziTKrAXDTBQiizWnbLeTU,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
28
  modal/cls.py,sha256=wztMTYkhJyW9iUVqx4_Gga4bJJpUiPgGsS6iacUqy-A,30001
@@ -41,13 +41,13 @@ 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=24XrtwZ3yqfv68bWH8zXWUdu-q4NbekyX_4h515faLE,14247
44
+ modal/functions.pyi,sha256=p9H14D_n2lAjeVvymu74wDWsL_BnpBrT0BunbAlwviw,14247
45
45
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
46
- modal/image.py,sha256=EtYt7_Rjgi71gt_SutqF8KSjnzWgP5P1Z7XsV-eIoFw,91470
46
+ modal/image.py,sha256=W3SnV-DjUuaWwUWkk9keQko7jZ_p_pYERqdeMXNccSk,91542
47
47
  modal/image.pyi,sha256=Oc2ndYHSdQTcRpZKHSfTdj-m_2oQAsnc2EWTthbNn-s,26380
48
48
  modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
49
49
  modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
50
- modal/mount.py,sha256=hNoy7J-E2C-CkSmbKldfL_zg8db8nP8cVzRj_35Rsp0,32124
50
+ modal/mount.py,sha256=JII0zTS1fPCcCbZgO18okkOuTDqYCxY1DIVa6i1E9cI,32196
51
51
  modal/mount.pyi,sha256=CmHa7zKSxHA_7-vMQLnGfw_ZXvAvHlafvUEVJcQ1LQA,12535
52
52
  modal/network_file_system.py,sha256=WXdyL7du_fvjvuG6hSAREyJ83sSEP2xSLAIAhBsisdI,14869
53
53
  modal/network_file_system.pyi,sha256=4N3eqMbTSlqmS8VV_aJK-uvrgJC8xnf_YtW5FHfRfc8,8156
@@ -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=GnmZYVzCykG6ztk2M27Bl_SHX98dwKfarCikS5_ncgo,149
172
- modal-0.73.59.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
173
- modal-0.73.59.dist-info/METADATA,sha256=OGQPCB_SrgOWX6lK_AieBZZ5MUoeFtHyuMGus6_3xT0,2452
174
- modal-0.73.59.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
175
- modal-0.73.59.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
176
- modal-0.73.59.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
177
- modal-0.73.59.dist-info/RECORD,,
171
+ modal_version/_version_generated.py,sha256=m-kmH3hR9GQw2dfTtDW0jIJKJ_BOmscevyKDx0WGtwU,149
172
+ modal-0.73.61.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
173
+ modal-0.73.61.dist-info/METADATA,sha256=JLspZljtzlcxRU_kj4sM0MccAa6A9Bvpn_9opUlHwlo,2452
174
+ modal-0.73.61.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
175
+ modal-0.73.61.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
176
+ modal-0.73.61.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
177
+ modal-0.73.61.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 = 59 # git: 714b4c5
4
+ build_number = 61 # git: 48df650