modAL 1.4.3.dev17__py3-none-any.whl → 1.4.3.dev18__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.
@@ -717,7 +717,14 @@ def use_md5(url: str) -> bool:
717
717
  host = urlparse(url).netloc.split(":")[0]
718
718
  if host.endswith(".amazonaws.com") or host.endswith(".r2.cloudflarestorage.com"):
719
719
  return True
720
- elif host in ["127.0.0.1", "localhost", "172.20.0.1", "172.21.0.1"]:
720
+ if host == "localhost":
721
721
  return False
722
- else:
723
- raise Exception(f"Unknown S3 host: {host}")
722
+ try:
723
+ import ipaddress
724
+
725
+ addr = ipaddress.ip_address(host)
726
+ if addr.is_private or addr.is_loopback:
727
+ return False
728
+ except ValueError:
729
+ pass
730
+ raise Exception(f"Unknown S3 host: {host}")
modal/client.pyi CHANGED
@@ -35,7 +35,7 @@ class _Client:
35
35
  server_url: str,
36
36
  client_type: int,
37
37
  credentials: typing.Optional[tuple[str, str]],
38
- version: str = "1.4.3.dev17",
38
+ version: str = "1.4.3.dev18",
39
39
  ):
40
40
  """mdmd:hidden
41
41
  The Modal client object is not intended to be instantiated directly by users.
@@ -175,7 +175,7 @@ class Client:
175
175
  server_url: str,
176
176
  client_type: int,
177
177
  credentials: typing.Optional[tuple[str, str]],
178
- version: str = "1.4.3.dev17",
178
+ version: str = "1.4.3.dev18",
179
179
  ):
180
180
  """mdmd:hidden
181
181
  The Modal client object is not intended to be instantiated directly by users.
modal/file_io.py CHANGED
@@ -248,7 +248,6 @@ class _FileIO(Generic[T]):
248
248
  "`FileIO.read()` is deprecated."
249
249
  " Use `Sandbox.filesystem.read_text()`, `Sandbox.filesystem.read_bytes()`,"
250
250
  " or `Sandbox.filesystem.copy_to_local()` instead.",
251
- pending=True,
252
251
  )
253
252
  self._check_closed()
254
253
  self._check_readable()
@@ -266,7 +265,6 @@ class _FileIO(Generic[T]):
266
265
  "`FileIO.readline()` is deprecated."
267
266
  " Use `Sandbox.filesystem.read_text()`, `Sandbox.filesystem.read_bytes()`,"
268
267
  " or `Sandbox.filesystem.copy_to_local()` instead.",
269
- pending=True,
270
268
  )
271
269
  self._check_closed()
272
270
  self._check_readable()
@@ -288,7 +286,6 @@ class _FileIO(Generic[T]):
288
286
  "`FileIO.readlines()` is deprecated."
289
287
  " Use `Sandbox.filesystem.read_text()`, `Sandbox.filesystem.read_bytes()`,"
290
288
  " or `Sandbox.filesystem.copy_to_local()` instead.",
291
- pending=True,
292
289
  )
293
290
  self._check_closed()
294
291
  self._check_readable()
@@ -314,7 +311,6 @@ class _FileIO(Generic[T]):
314
311
  "`FileIO.write()` is deprecated."
315
312
  " Use `Sandbox.filesystem.write_text()`, `Sandbox.filesystem.write_bytes()`,"
316
313
  " or `Sandbox.filesystem.copy_from_local()` instead.",
317
- pending=True,
318
314
  )
319
315
  self._check_closed()
320
316
  self._check_writable()
@@ -343,7 +339,6 @@ class _FileIO(Generic[T]):
343
339
  "`FileIO.flush()` is deprecated."
344
340
  " Use `Sandbox.filesystem.write_text()`, `Sandbox.filesystem.write_bytes()`,"
345
341
  " or `Sandbox.filesystem.copy_from_local()` instead.",
346
- pending=True,
347
342
  )
348
343
  self._check_closed()
349
344
  self._check_writable()
@@ -407,7 +402,6 @@ class _FileIO(Generic[T]):
407
402
  deprecation_warning(
408
403
  (2026, 3, 9),
409
404
  "`FileIO.mkdir()` is deprecated. Use `Sandbox.filesystem.make_directory()` instead.",
410
- pending=True,
411
405
  )
412
406
  await mkdir(path, client, task_id, parents)
413
407
 
@@ -417,7 +411,6 @@ class _FileIO(Generic[T]):
417
411
  deprecation_warning(
418
412
  (2026, 3, 9),
419
413
  "`FileIO.rm()` is deprecated. Use `Sandbox.filesystem.remove()` instead.",
420
- pending=True,
421
414
  )
422
415
  await rm(path, client, task_id, recursive)
423
416
 
modal/functions.pyi CHANGED
@@ -347,7 +347,7 @@ class Function(
347
347
 
348
348
  _call_generator: ___call_generator_spec
349
349
 
350
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
350
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
351
351
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
352
352
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
353
353
  ...
@@ -356,7 +356,7 @@ class Function(
356
356
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
357
357
  ...
358
358
 
359
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType]
359
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P]
360
360
 
361
361
  class __remote_gen_spec(typing_extensions.Protocol):
362
362
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
@@ -383,7 +383,7 @@ class Function(
383
383
  """
384
384
  ...
385
385
 
386
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
386
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
387
387
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
388
388
  """[Experimental] Calls the function with the given arguments, without waiting for the results.
389
389
 
@@ -406,7 +406,7 @@ class Function(
406
406
  """
407
407
  ...
408
408
 
409
- _experimental_spawn: ___experimental_spawn_spec[modal._functions.P, modal._functions.ReturnType]
409
+ _experimental_spawn: ___experimental_spawn_spec[modal._functions.ReturnType, modal._functions.P]
410
410
 
411
411
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER]):
412
412
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
@@ -414,7 +414,7 @@ class Function(
414
414
 
415
415
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P]
416
416
 
417
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
417
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
418
418
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
419
419
  """Calls the function with the given arguments, without waiting for the results.
420
420
 
@@ -435,7 +435,7 @@ class Function(
435
435
  """
436
436
  ...
437
437
 
438
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType]
438
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P]
439
439
 
440
440
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
441
441
  """Return the inner Python object wrapped by this Modal Function."""
modal/sandbox.py CHANGED
@@ -1635,7 +1635,6 @@ class _Sandbox(_Object, type_prefix="sb"):
1635
1635
  deprecation_warning(
1636
1636
  (2026, 3, 9),
1637
1637
  "`Sandbox.open()` is deprecated. Use the `Sandbox.filesystem` APIs instead.",
1638
- pending=True,
1639
1638
  )
1640
1639
  task_id = await self._get_task_id()
1641
1640
  return await _FileIO.create(path, mode, self._client, task_id)
@@ -1664,7 +1663,6 @@ class _Sandbox(_Object, type_prefix="sb"):
1664
1663
  deprecation_warning(
1665
1664
  (2026, 4, 15),
1666
1665
  "`Sandbox.mkdir()` is deprecated. Use `Sandbox.filesystem.make_directory()` instead.",
1667
- pending=True,
1668
1666
  )
1669
1667
  task_id = await self._get_task_id()
1670
1668
  return await mkdir(path, self._client, task_id, parents)
@@ -1679,7 +1677,6 @@ class _Sandbox(_Object, type_prefix="sb"):
1679
1677
  deprecation_warning(
1680
1678
  (2026, 4, 15),
1681
1679
  "`Sandbox.rm()` is deprecated. Use `Sandbox.filesystem.remove()` instead.",
1682
- pending=True,
1683
1680
  )
1684
1681
  task_id = await self._get_task_id()
1685
1682
  return await rm(path, self._client, task_id, recursive)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.4.3.dev17
3
+ Version: 1.4.3.dev18
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License-Expression: Apache-2.0
@@ -27,7 +27,7 @@ modal/app.pyi,sha256=-9667eLtUgoinLTRrJ-Z3SOgMR0S89Qw_vpwEZfp2Pk,53910
27
27
  modal/billing.py,sha256=B2zXa7KeMnpqi2AQINycEk-KSXVYaLTTTAQTtuf2Gfs,257
28
28
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
29
29
  modal/client.py,sha256=jjT4eLFHGcvIF6Xw4kPptIx-VmExtphRN8XJ1JA7fWI,15502
30
- modal/client.pyi,sha256=FwrxFqKLh9uI6yqXrpFWC6S4PVZPTnynSWipYcdBQeM,15703
30
+ modal/client.pyi,sha256=-37G7VbnmVb7XU4IaQfpq9DpcjcRDf1JslBcyHUCyPM,15703
31
31
  modal/cloud_bucket_mount.py,sha256=KkaJVy5vpO_u2NtDYtv1JM-M3y4J0UtWBapTDKpQRcA,6034
32
32
  modal/cloud_bucket_mount.pyi,sha256=mGDeEd1XvxGpCE6O5jRBSfIvMXvZ5AtIybea5k-0w9w,7560
33
33
  modal/cls.py,sha256=Yrl5b_tQhZMhc5avInM-i5UlGuqeog6Gs4rX2d9lLjI,40390
@@ -40,11 +40,11 @@ modal/dict.pyi,sha256=3FgUEzuUDdIw16MlTKpE9GG8CoeBmZ1jnFiIFZunSaU,33803
40
40
  modal/environments.py,sha256=MDFoTT301n6-1B_JKwk7z0WpSFF8kG2P59uykVOwRsI,1358
41
41
  modal/environments.pyi,sha256=ea_mMChagwzh7DXEKAYspkIBR7DGQPKr4vWolnajXbQ,11621
42
42
  modal/exception.py,sha256=_XWfRFZX1VGdrLUEQGZ1SEh7Pxf4M6VjOHwzdndr4ic,11784
43
- modal/file_io.py,sha256=45gO6ScEPKrE-KTQ619RwejaqoHUregwMgKcVktfoAk,22275
43
+ modal/file_io.py,sha256=-W7b8qMOLAXpMMMPMtn1lgHM-9d7Gj18DuJv6mowp_Q,22093
44
44
  modal/file_io.pyi,sha256=DPaq0BhySaiCX3g56QHhyIMdU1izbfWsjpSp30JoJUU,15745
45
45
  modal/file_pattern_matcher.py,sha256=A_Kdkej6q7YQyhM_2-BvpFmPqJ0oHb54B6yf9VqvPVE,8116
46
46
  modal/functions.py,sha256=EZRcHFfnoYbvawUJnAHF5nIvoo9GX2Djy7mUmOCXmXc,258
47
- modal/functions.pyi,sha256=m2uNU9DMi9LWprk9PJykCM1Zs_oEG2-Vl2FaJMGSNpY,34255
47
+ modal/functions.pyi,sha256=_sZ27MFClkElRg0iyVXmn9pGXwm9F-r49sHjrYhH4Sg,34255
48
48
  modal/image.py,sha256=Gsj05uwX84bY2xkTWuv2Wbfz_6iGySezvlAEJzVIZx4,112580
49
49
  modal/image.pyi,sha256=zYiJsc5tEhGev_rT9R3cGpyQJf-Hm08OJl37sV4E_fk,79377
50
50
  modal/io_streams.py,sha256=JcYbvvjMZFugv53yHc9Id0N4nIvDMwV63ZtnN1bPmZc,30940
@@ -69,7 +69,7 @@ modal/retries.py,sha256=vPWWKP-FRolJwTBuLPXdWqHV7aJfSQFgEW7vhlBBXRQ,5067
69
69
  modal/runner.py,sha256=GLx_JwZ2hpA5yuHMY2b2Gt8Ri-KxJZHF2Zp1N_qVLD4,30144
70
70
  modal/runner.pyi,sha256=7QHbZawq1P5N9DiSrrEYtXtBCDAWlRibNonBO0q6MdM,9570
71
71
  modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
72
- modal/sandbox.py,sha256=byesQYe1QWRNB6yA3eTpr8TUIlb398U9kSoSm77X9P0,83622
72
+ modal/sandbox.py,sha256=QXNf01Xa2tBtch1LZ_kpva5s9zT6cR3iV6-TIIzfaD4,83544
73
73
  modal/sandbox.pyi,sha256=fDUIw3NsJPBRZ198lEo_Bw9WfESsqmUWcFLRnow8F-0,86546
74
74
  modal/sandbox_fs.py,sha256=R-uYmsPkUWua5dWzh8DhCdCIa6FvHNJFYtXbffnONa0,21891
75
75
  modal/sandbox_fs.pyi,sha256=zsSDGNSTkjo_gJYQH3J7if8Y6J8_Uy4f9u0CypCo5uc,34946
@@ -107,7 +107,7 @@ modal/_utils/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
107
107
  modal/_utils/app_utils.py,sha256=88BT4TPLWfYAQwKTHcyzNQRHg8n9B-QE2UyJs96iV-0,108
108
108
  modal/_utils/async_utils.py,sha256=Bj-HA8R68TP6ofSrUv6ZNKhgL7tL985af7sH5uAeXRk,45958
109
109
  modal/_utils/auth_token_manager.py,sha256=QsDokl1c1dN9m6Z9N-Se-8cY3laphByjJtNdRXUTieI,5151
110
- modal/_utils/blob_utils.py,sha256=PstED-uo3mY3S8RAId9wHO-a2ch5BditxWa-APgS6Xo,25651
110
+ modal/_utils/blob_utils.py,sha256=d9ZBhSt-BXNJy-xpOjyZDD050-b_ORnGSUVhJCpXq08,25778
111
111
  modal/_utils/browser_utils.py,sha256=Yqq0qU4Id6oaDOdeT1JEmbCN7vj4baNJJraJhRWU8ZI,1085
112
112
  modal/_utils/bytes_io_segment_payload.py,sha256=vaXPq8b52-x6G2hwE7SrjS58pg_aRm7gV3bn3yjmTzQ,4261
113
113
  modal/_utils/deprecation.py,sha256=LxbNo74EV29xziSybDwIdIOQ44x7UutDLXkgvlCnhoA,4670
@@ -177,7 +177,7 @@ modal/experimental/__init__.py,sha256=Wb1YoAKAnNxH_0c2wA0T12I7bSu9PSO2nS_LuLska7
177
177
  modal/experimental/flash.py,sha256=ATGhVO8AleJ-TOe2PGolI5T7zfCEtj0kl_ivMPp7Rqg,33362
178
178
  modal/experimental/flash.pyi,sha256=R4h2nQl7-oiwqq_twCp0YqID_LnPjPGqxywXvxbiLIk,17011
179
179
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
180
- modal-1.4.3.dev17.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
180
+ modal-1.4.3.dev18.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
181
181
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
182
182
  modal_docs/gen_cli_docs.py,sha256=bfUSLscHfoQoKkKjIqJvQMe3fURzqcQK7gF1h9WQLtM,3742
183
183
  modal_docs/gen_cli_docs_main.py,sha256=UPGr7O1DYTIRLwfINe2rbdh89J3cPVTU1OWL-SjxnOQ,198
@@ -199,10 +199,10 @@ modal_proto/task_command_router_pb2.py,sha256=6TY5umHeqYdFNuRaOoZP2YfUbtCxRHqyi2
199
199
  modal_proto/task_command_router_pb2.pyi,sha256=PYljoZVw16_d4Hn-9cD6SDssmYsvVqx_HOgEEUGYBLk,31452
200
200
  modal_proto/task_command_router_pb2_grpc.py,sha256=XVmcdxLnK_IY3trlF6nLmzFhqSG-bbYNABC7xIs6fT8,28732
201
201
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=og_J8CxYeAV0ikpHXZMvr_uC15UD3I3fgyyAO2pGm1E,8981
202
- modal_version/__init__.py,sha256=_xjp0gR60C7a0caEzxUZLTBH7h2IxJQXEZoq4shOidM,121
202
+ modal_version/__init__.py,sha256=dyCslMlIwJ4qTig3R9j1lOQUyLIC2_gzBs_v2iVLYXk,121
203
203
  modal_version/__main__.py,sha256=nLUbubxKx7GXNzJIkTB7M7_u8080LyLM0IS0rzFkC_c,119
204
- modal-1.4.3.dev17.dist-info/METADATA,sha256=sIyVb1AnCXpStbvbEOMzfjwRh0qSkABZ0-yXsjP1XdY,2339
205
- modal-1.4.3.dev17.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
206
- modal-1.4.3.dev17.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
207
- modal-1.4.3.dev17.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
208
- modal-1.4.3.dev17.dist-info/RECORD,,
204
+ modal-1.4.3.dev18.dist-info/METADATA,sha256=Ejzg8993N1wEQ_vUPrvQVUh-Cudw8JxmNc-g7FgnFLc,2339
205
+ modal-1.4.3.dev18.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
206
+ modal-1.4.3.dev18.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
207
+ modal-1.4.3.dev18.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
208
+ modal-1.4.3.dev18.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2026
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.4.3.dev17"
4
+ __version__ = "1.4.3.dev18"