modal 0.76.4__py3-none-any.whl → 0.76.4.dev1__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,11 @@ 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.76.4"
30
+ self,
31
+ server_url: str,
32
+ client_type: int,
33
+ credentials: typing.Optional[tuple[str, str]],
34
+ version: str = "0.76.4.dev1",
31
35
  ): ...
32
36
  def is_closed(self) -> bool: ...
33
37
  @property
@@ -86,7 +90,11 @@ class Client:
86
90
  _snapshotted: bool
87
91
 
88
92
  def __init__(
89
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.76.4"
93
+ self,
94
+ server_url: str,
95
+ client_type: int,
96
+ credentials: typing.Optional[tuple[str, str]],
97
+ version: str = "0.76.4.dev1",
90
98
  ): ...
91
99
  def is_closed(self) -> bool: ...
92
100
  @property
modal/functions.pyi CHANGED
@@ -234,11 +234,11 @@ class Function(
234
234
 
235
235
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
236
236
 
237
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
237
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
238
238
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
239
239
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
240
240
 
241
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
241
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
242
242
 
243
243
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
244
244
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -253,12 +253,12 @@ class Function(
253
253
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
254
254
  ) -> modal._functions.OriginalReturnType: ...
255
255
 
256
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
256
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
257
257
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
258
258
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
259
259
 
260
260
  _experimental_spawn: ___experimental_spawn_spec[
261
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
261
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
262
262
  ]
263
263
 
264
264
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
@@ -267,11 +267,11 @@ class Function(
267
267
 
268
268
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
269
269
 
270
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
270
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
271
271
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
272
272
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
273
273
 
274
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
274
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
275
275
 
276
276
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
277
277
 
modal/mount.py CHANGED
@@ -4,6 +4,7 @@ import asyncio
4
4
  import concurrent.futures
5
5
  import dataclasses
6
6
  import os
7
+ import re
7
8
  import site
8
9
  import sys
9
10
  import sysconfig
@@ -31,7 +32,7 @@ from ._utils.name_utils import check_object_name
31
32
  from ._utils.package_utils import get_module_mount_info
32
33
  from .client import _Client
33
34
  from .config import config, logger
34
- from .exception import InvalidError, ModuleNotMountable
35
+ from .exception import ExecutionError, InvalidError, ModuleNotMountable
35
36
  from .file_pattern_matcher import FilePatternMatcher
36
37
 
37
38
  ROOT_DIR: PurePosixPath = PurePosixPath("/root")
@@ -59,7 +60,12 @@ See https://modal.com/docs/guide/modal-1-0-migration for more details.
59
60
 
60
61
  def client_mount_name() -> str:
61
62
  """Get the deployed name of the client package mount."""
62
- return f"modal-client-mount-{__version__}"
63
+ # Strip any annotations (i.e. `+{git_hash}`) becuase the + is not valid in a mount name
64
+ if m := re.match(r"^([\d\.\w]+)", __version__):
65
+ version = m.group(1)
66
+ else:
67
+ raise ExecutionError(f"Modal client has improperly formatted version: {__version__!r}")
68
+ return f"modal-client-mount-{version}"
63
69
 
64
70
 
65
71
  def python_standalone_mount_name(version: str) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 0.76.4
3
+ Version: 0.76.4.dev1
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -22,7 +22,7 @@ modal/app.py,sha256=xojuGZv4LaQwZU5ntj7WbmMjeNuB9Gll8Mzqe2LyiEs,51323
22
22
  modal/app.pyi,sha256=zNwR1_2LpmQc9AhemuAeVdk90XNYDw9keOkXAwAATeA,28732
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=o-aQThHpvDHUzg_kUafyhWzACViUBhY2WLZ2EitnSHA,16787
25
- modal/client.pyi,sha256=r3nU3OnZUoj5JW9qEMmXoiTZZiCCXrpM5F6lDHh3BtY,8383
25
+ modal/client.pyi,sha256=G2XGJEthOUjm-mk0e5wePNkCNocobNmpQaL3oXmPXdc,8459
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=LZMQdFZ06LpbLDbsCJknniU-393Jb44E1lqveLVM8F8,38365
@@ -39,13 +39,13 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
39
39
  modal/file_io.pyi,sha256=oB7x-rKq7bmm8cA7Z7W9C9yeko7KK9m9i5GidFnkGK4,9569
40
40
  modal/file_pattern_matcher.py,sha256=wov-otB5M1oTdrYDtR2_VgacYin2srdtAP4McA1Cqzw,6516
41
41
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
42
- modal/functions.pyi,sha256=xc6igwNS77kYkyuVpWOlMPkanxriesIaKFTYlvmuXp0,16993
42
+ modal/functions.pyi,sha256=3kHFXeXV0YYg0w1hmBqSV4k7djmjU9qfrmUyURlp8lE,16993
43
43
  modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
44
44
  modal/image.py,sha256=lg3XxIWNYV8je88oEPbihzSEq_9gumc0NLbzZLAhm74,92807
45
45
  modal/image.pyi,sha256=MDq7tNJevElK78VxFYrZRe_00kz9gPdg98MN5c6fFoE,25644
46
46
  modal/io_streams.py,sha256=YDZVQSDv05DeXg5TwcucC9Rj5hQBx2GXdluan9rIUpw,15467
47
47
  modal/io_streams.pyi,sha256=1UK6kWLREASQfq-wL9wSp5iqjLU0egRZPDn4LXs1PZY,5136
48
- modal/mount.py,sha256=lGxbu6tTEA8EdePQWYs2uu0Z3f3H_PjiXwDXOmStwrM,32674
48
+ modal/mount.py,sha256=W6crHw7v-fSJ8WN3MjNwzuU1ZBapk2RA05M2x-eM3U0,32975
49
49
  modal/mount.pyi,sha256=PHs-N9LGSDfYWw70UrhvGZW_6uWwyx-1GAieROzCNNs,12583
50
50
  modal/network_file_system.py,sha256=9_4EFTM1tKSTdwk0f4beSlWCiat6gC6ZjbsOWje07TM,14779
51
51
  modal/network_file_system.pyi,sha256=58DiUqHGlARmI3cz-Yo7IFObKKFIiGh5UIU5JxGNFfc,8333
@@ -146,7 +146,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
146
146
  modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
147
147
  modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
148
148
  modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
149
- modal-0.76.4.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
149
+ modal-0.76.4.dev1.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
150
150
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
151
151
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
152
152
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -169,11 +169,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
169
169
  modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
170
170
  modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
171
171
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
- modal_version/__init__.py,sha256=u-X2s_2GMkprLryPgSYm4nwqxeDjYDm_2mJ3SGySns4,470
172
+ modal_version/__init__.py,sha256=M4Jy4WyiNR2EMFlSP864FaPkV-FZWBuqNCD8oSFMJXo,121
173
173
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
174
- modal_version/_version_generated.py,sha256=7iBCnOznnSgAM0IT8NXFVsQn9fAJbIohVT-badmMAis,148
175
- modal-0.76.4.dist-info/METADATA,sha256=fVcPU0QU4KLk1RX4hZOYdZHHBO0WfflaoLEZF2ywcTo,2450
176
- modal-0.76.4.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
- modal-0.76.4.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
- modal-0.76.4.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
- modal-0.76.4.dist-info/RECORD,,
174
+ modal-0.76.4.dev1.dist-info/METADATA,sha256=fLieFbaieXmYrkabN74mo7-gdLJiMF9eepcpMK_EEGk,2455
175
+ modal-0.76.4.dev1.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
176
+ modal-0.76.4.dev1.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
177
+ modal-0.76.4.dev1.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
178
+ modal-0.76.4.dev1.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,13 +1,4 @@
1
- # Copyright Modal Labs 2022
2
- """Specifies the `modal.__version__` number for the client package."""
1
+ # Copyright Modal Labs 2025
2
+ """Supplies the current version of the modal client library."""
3
3
 
4
- from ._version_generated import build_number
5
-
6
- # As long as we're on 0.*, all versions are published automatically
7
- major_number = 0
8
-
9
- # Bump this manually on breaking changes, then reset the number in _version_generated.py
10
- minor_number = 76
11
-
12
- # Right now, automatically increment the patch number in CI
13
- __version__ = f"{major_number}.{minor_number}.{max(build_number, 0)}"
4
+ __version__ = "0.76.4.dev1"
@@ -1,4 +0,0 @@
1
- # Copyright Modal Labs 2025
2
-
3
- # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 4 # git: 895899b