modal 1.0.3.dev17__py3-none-any.whl → 1.0.3.dev19__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
@@ -31,7 +31,7 @@ class _Client:
31
31
  server_url: str,
32
32
  client_type: int,
33
33
  credentials: typing.Optional[tuple[str, str]],
34
- version: str = "1.0.3.dev17",
34
+ version: str = "1.0.3.dev19",
35
35
  ): ...
36
36
  def is_closed(self) -> bool: ...
37
37
  @property
@@ -94,7 +94,7 @@ class Client:
94
94
  server_url: str,
95
95
  client_type: int,
96
96
  credentials: typing.Optional[tuple[str, str]],
97
- version: str = "1.0.3.dev17",
97
+ version: str = "1.0.3.dev19",
98
98
  ): ...
99
99
  def is_closed(self) -> bool: ...
100
100
  @property
modal/mount.py CHANGED
@@ -21,7 +21,7 @@ from modal_version import __version__
21
21
 
22
22
  from ._object import _get_environment_name, _Object
23
23
  from ._resolver import Resolver
24
- from ._utils.async_utils import aclosing, async_map, synchronize_api
24
+ from ._utils.async_utils import TaskContext, aclosing, async_map, synchronize_api
25
25
  from ._utils.blob_utils import FileUploadSpec, blob_upload_file, get_file_upload_spec_from_path
26
26
  from ._utils.deprecation import deprecation_warning
27
27
  from ._utils.grpc_utils import retry_transient_errors
@@ -115,7 +115,8 @@ class _MountFile(_MountEntry):
115
115
  def get_files_to_upload(self):
116
116
  local_file = self.local_file.resolve()
117
117
  if not local_file.exists():
118
- raise FileNotFoundError(local_file)
118
+ msg = f"local file {local_file} does not exist"
119
+ raise FileNotFoundError(msg)
119
120
 
120
121
  rel_filename = self.remote_path
121
122
  yield local_file, rel_filename
@@ -144,10 +145,12 @@ class _MountDir(_MountEntry):
144
145
  local_dir = self.local_dir.expanduser().absolute()
145
146
 
146
147
  if not local_dir.exists():
147
- raise FileNotFoundError(local_dir)
148
+ msg = f"local dir {local_dir} does not exist"
149
+ raise FileNotFoundError(msg)
148
150
 
149
151
  if not local_dir.is_dir():
150
- raise NotADirectoryError(local_dir)
152
+ msg = f"local dir {local_dir} is not a directory"
153
+ raise NotADirectoryError(msg)
151
154
 
152
155
  if self.recursive:
153
156
  gen = (os.path.join(root, name) for root, dirs, files in os.walk(local_dir) for name in files)
@@ -811,6 +814,7 @@ def _is_modal_path(remote_path: PurePosixPath):
811
814
  return True
812
815
  return False
813
816
 
817
+
814
818
  REMOTE_PACKAGES_PATH = "/__modal/deps"
815
819
  REMOTE_SITECUSTOMIZE_PATH = "/pkg/sitecustomize.py"
816
820
 
@@ -821,6 +825,7 @@ SITECUSTOMIZE_CONTENT = f"""
821
825
  import sys; sys.path.append('{REMOTE_PACKAGES_PATH}')
822
826
  """.strip()
823
827
 
828
+
824
829
  async def _create_single_mount(
825
830
  client: _Client,
826
831
  builder_version: str,
@@ -896,23 +901,32 @@ async def _create_single_mount(
896
901
 
897
902
 
898
903
  async def _create_client_dependency_mounts(client=None, check_if_exists=True):
904
+ coros = []
899
905
  for python_version in PYTHON_STANDALONE_VERSIONS:
900
906
  # glibc >= 2.17
901
- await _create_single_mount(
902
- client,
903
- "PREVIEW",
904
- python_version,
905
- "manylinux_2_17",
906
- "x86_64",
907
- check_if_exists=check_if_exists,
907
+ coros.append(
908
+ _create_single_mount(
909
+ client,
910
+ "PREVIEW",
911
+ python_version,
912
+ "manylinux_2_17",
913
+ "x86_64",
914
+ check_if_exists=check_if_exists,
915
+ )
908
916
  )
909
917
  # musl >= 1.2
910
- await _create_single_mount(
911
- client,
912
- "PREVIEW",
913
- python_version,
914
- "musllinux_1_2",
915
- "x86_64",
916
- uv_python_platform="x86_64-unknown-linux-musl",
917
- check_if_exists=check_if_exists,
918
+ coros.append(
919
+ _create_single_mount(
920
+ client,
921
+ "PREVIEW",
922
+ python_version,
923
+ "musllinux_1_2",
924
+ "x86_64",
925
+ uv_python_platform="x86_64-unknown-linux-musl",
926
+ check_if_exists=check_if_exists,
927
+ )
918
928
  )
929
+ await TaskContext.gather(*coros)
930
+
931
+
932
+ create_client_dependency_mounts = synchronize_api(_create_client_dependency_mounts)
modal/mount.pyi CHANGED
@@ -319,6 +319,12 @@ async def _create_single_mount(
319
319
  ): ...
320
320
  async def _create_client_dependency_mounts(client=None, check_if_exists=True): ...
321
321
 
322
+ class __create_client_dependency_mounts_spec(typing_extensions.Protocol):
323
+ def __call__(self, /, client=None, check_if_exists=True): ...
324
+ async def aio(self, /, client=None, check_if_exists=True): ...
325
+
326
+ create_client_dependency_mounts: __create_client_dependency_mounts_spec
327
+
322
328
  ROOT_DIR: pathlib.PurePosixPath
323
329
 
324
330
  PYTHON_STANDALONE_VERSIONS: dict[str, tuple[str, str]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.3.dev17
3
+ Version: 1.0.3.dev19
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=NZ_rJ9TuMfiNiLg8-gOFgufD5flGtXWPHOZI0gdD3hE,46585
22
22
  modal/app.pyi,sha256=4-b_vbe3lNAqQPcMRpQCEDsE1zsVkQRJGUql9B7HvbM,22659
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=OwISJvkgMb-rHm9Gc4i-7YcDgGiZgwJ7F_PzwZH7a6Q,16847
25
- modal/client.pyi,sha256=NB4eHSUXATNCpXxNSbegpf1F1tdAZq80Q58_7DvHwYw,8459
25
+ modal/client.pyi,sha256=7c31rha7UDrn-UTo0aTb3N4W3_4N1PjjKpQbtPTZYkc,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=dBbeARwOWftlKd1cwtM0cHFtQWSWkwVXwVmOV4w0SyI,37907
@@ -45,8 +45,8 @@ modal/image.py,sha256=yrI9DCw7GAck3d788GCHJom-_yU55zNu7reNapBhlgE,93284
45
45
  modal/image.pyi,sha256=2xjB6XOZDtm_chDdd90UoIj8pnDt5hCg6bOmu5fNaA4,25625
46
46
  modal/io_streams.py,sha256=YDZVQSDv05DeXg5TwcucC9Rj5hQBx2GXdluan9rIUpw,15467
47
47
  modal/io_streams.pyi,sha256=1UK6kWLREASQfq-wL9wSp5iqjLU0egRZPDn4LXs1PZY,5136
48
- modal/mount.py,sha256=09D3DZZ_kcvUHGflYZLhEza-216esnY0J_je8dG9Z9U,34136
49
- modal/mount.pyi,sha256=WXWU-qhOvHzX2sfoToO0l0RR3k3PtfQkk5at8tBbg1g,12839
48
+ modal/mount.py,sha256=_1FS9dZ-9zp-mhv4gANGpvvRGu35ARWzgdDFBZ2BhoQ,34570
49
+ modal/mount.pyi,sha256=BfbfM10CCscF_bM_m-qHJPChNM3pgYehwljAfCWQ6t4,13120
50
50
  modal/network_file_system.py,sha256=lgtmHYjzA5gDMx0tysH0-WJB2Ao9JD2W15NyYK2A7_w,14612
51
51
  modal/network_file_system.pyi,sha256=58DiUqHGlARmI3cz-Yo7IFObKKFIiGh5UIU5JxGNFfc,8333
52
52
  modal/object.py,sha256=bTeskuY8JFrESjU4_UL_nTwYlBQdOLmVaOX3X6EMxsg,164
@@ -147,7 +147,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
147
147
  modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
148
148
  modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
149
149
  modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
150
- modal-1.0.3.dev17.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
150
+ modal-1.0.3.dev19.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
151
151
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
152
152
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
153
153
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -170,10 +170,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
170
170
  modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
171
171
  modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
172
172
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
- modal_version/__init__.py,sha256=uPcPQdUgF0iuDk60GQ3Ihk2SeEuLJyqu0INnJzaoN6k,121
173
+ modal_version/__init__.py,sha256=l9qQyVEZqR4a5KYdXRTtxZbQcLEoNvlpttF7POj15uM,121
174
174
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
175
- modal-1.0.3.dev17.dist-info/METADATA,sha256=5hxxPNx4LxkOhRUL2pUREfldQuIvUZ_ZasE2GNPhHg4,2455
176
- modal-1.0.3.dev17.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
- modal-1.0.3.dev17.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
- modal-1.0.3.dev17.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
- modal-1.0.3.dev17.dist-info/RECORD,,
175
+ modal-1.0.3.dev19.dist-info/METADATA,sha256=wK_Owow0N0AyDDMplFGxwSMTSsIv_WgCw4cwC_g8xfk,2455
176
+ modal-1.0.3.dev19.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
+ modal-1.0.3.dev19.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
+ modal-1.0.3.dev19.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
+ modal-1.0.3.dev19.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.0.3.dev17"
4
+ __version__ = "1.0.3.dev19"