modAL 1.2.7.dev5__py3-none-any.whl → 1.2.7.dev6__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
@@ -32,7 +32,7 @@ class _Client:
32
32
  server_url: str,
33
33
  client_type: int,
34
34
  credentials: typing.Optional[tuple[str, str]],
35
- version: str = "1.2.7.dev5",
35
+ version: str = "1.2.7.dev6",
36
36
  ):
37
37
  """mdmd:hidden
38
38
  The Modal client object is not intended to be instantiated directly by users.
@@ -163,7 +163,7 @@ class Client:
163
163
  server_url: str,
164
164
  client_type: int,
165
165
  credentials: typing.Optional[tuple[str, str]],
166
- version: str = "1.2.7.dev5",
166
+ version: str = "1.2.7.dev6",
167
167
  ):
168
168
  """mdmd:hidden
169
169
  The Modal client object is not intended to be instantiated directly by users.
modal/file_io.py CHANGED
@@ -17,9 +17,10 @@ from modal.exception import ClientClosed
17
17
  from modal_proto import api_pb2
18
18
 
19
19
  from ._utils.async_utils import synchronize_api
20
+ from ._utils.deprecation import deprecation_error
20
21
  from ._utils.grpc_utils import RETRYABLE_GRPC_STATUS_CODES
21
22
  from .client import _Client
22
- from .exception import FilesystemExecutionError, InvalidError
23
+ from .exception import FilesystemExecutionError
23
24
 
24
25
  WRITE_CHUNK_SIZE = 16 * 1024 * 1024 # 16 MiB
25
26
  WRITE_FILE_SIZE_LIMIT = 1024 * 1024 * 1024 # 1 GiB
@@ -46,55 +47,17 @@ T = TypeVar("T", str, bytes)
46
47
 
47
48
 
48
49
  async def _delete_bytes(file: "_FileIO", start: Optional[int] = None, end: Optional[int] = None) -> None:
49
- """Delete a range of bytes from the file.
50
-
51
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
52
- If either is None, the start or end of the file is used, respectively.
50
+ """mdmd:hidden
51
+ This method has been removed.
53
52
  """
54
- assert file._file_descriptor is not None
55
- file._check_closed()
56
- if start is not None and end is not None:
57
- if start >= end:
58
- raise ValueError("start must be less than end")
59
- resp = await file._client.stub.ContainerFilesystemExec(
60
- api_pb2.ContainerFilesystemExecRequest(
61
- file_delete_bytes_request=api_pb2.ContainerFileDeleteBytesRequest(
62
- file_descriptor=file._file_descriptor,
63
- start_inclusive=start,
64
- end_exclusive=end,
65
- ),
66
- task_id=file._task_id,
67
- ),
68
- )
69
- await file._wait(resp.exec_id)
53
+ deprecation_error((2025, 12, 3), "delete_bytes has been removed.")
70
54
 
71
55
 
72
56
  async def _replace_bytes(file: "_FileIO", data: bytes, start: Optional[int] = None, end: Optional[int] = None) -> None:
73
- """Replace a range of bytes in the file with new data. The length of the data does not
74
- have to be the same as the length of the range being replaced.
75
-
76
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
77
- If either is None, the start or end of the file is used, respectively.
57
+ """mdmd:hidden
58
+ This method has been removed.
78
59
  """
79
- assert file._file_descriptor is not None
80
- file._check_closed()
81
- if start is not None and end is not None:
82
- if start >= end:
83
- raise InvalidError("start must be less than end")
84
- if len(data) > WRITE_CHUNK_SIZE:
85
- raise InvalidError("Write request payload exceeds 16 MiB limit")
86
- resp = await file._client.stub.ContainerFilesystemExec(
87
- api_pb2.ContainerFilesystemExecRequest(
88
- file_write_replace_bytes_request=api_pb2.ContainerFileWriteReplaceBytesRequest(
89
- file_descriptor=file._file_descriptor,
90
- data=data,
91
- start_inclusive=start,
92
- end_exclusive=end,
93
- ),
94
- task_id=file._task_id,
95
- ),
96
- )
97
- await file._wait(resp.exec_id)
60
+ deprecation_error((2025, 12, 3), "replace_bytes has been removed.")
98
61
 
99
62
 
100
63
  class FileWatchEventType(enum.Enum):
modal/file_io.pyi CHANGED
@@ -7,21 +7,16 @@ import typing_extensions
7
7
  T = typing.TypeVar("T")
8
8
 
9
9
  async def _delete_bytes(file: _FileIO, start: typing.Optional[int] = None, end: typing.Optional[int] = None) -> None:
10
- """Delete a range of bytes from the file.
11
-
12
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
13
- If either is None, the start or end of the file is used, respectively.
10
+ """mdmd:hidden
11
+ This method has been removed.
14
12
  """
15
13
  ...
16
14
 
17
15
  async def _replace_bytes(
18
16
  file: _FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
19
17
  ) -> None:
20
- """Replace a range of bytes in the file with new data. The length of the data does not
21
- have to be the same as the length of the range being replaced.
22
-
23
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
24
- If either is None, the start or end of the file is used, respectively.
18
+ """mdmd:hidden
19
+ This method has been removed.
25
20
  """
26
21
  ...
27
22
 
@@ -174,18 +169,14 @@ class _FileIO(typing.Generic[T]):
174
169
 
175
170
  class __delete_bytes_spec(typing_extensions.Protocol):
176
171
  def __call__(self, /, file: FileIO, start: typing.Optional[int] = None, end: typing.Optional[int] = None) -> None:
177
- """Delete a range of bytes from the file.
178
-
179
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
180
- If either is None, the start or end of the file is used, respectively.
172
+ """mdmd:hidden
173
+ This method has been removed.
181
174
  """
182
175
  ...
183
176
 
184
177
  async def aio(self, /, file: FileIO, start: typing.Optional[int] = None, end: typing.Optional[int] = None) -> None:
185
- """Delete a range of bytes from the file.
186
-
187
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
188
- If either is None, the start or end of the file is used, respectively.
178
+ """mdmd:hidden
179
+ This method has been removed.
189
180
  """
190
181
  ...
191
182
 
@@ -195,22 +186,16 @@ class __replace_bytes_spec(typing_extensions.Protocol):
195
186
  def __call__(
196
187
  self, /, file: FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
197
188
  ) -> None:
198
- """Replace a range of bytes in the file with new data. The length of the data does not
199
- have to be the same as the length of the range being replaced.
200
-
201
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
202
- If either is None, the start or end of the file is used, respectively.
189
+ """mdmd:hidden
190
+ This method has been removed.
203
191
  """
204
192
  ...
205
193
 
206
194
  async def aio(
207
195
  self, /, file: FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
208
196
  ) -> None:
209
- """Replace a range of bytes in the file with new data. The length of the data does not
210
- have to be the same as the length of the range being replaced.
211
-
212
- `start` and `end` are byte offsets. `start` is inclusive, `end` is exclusive.
213
- If either is None, the start or end of the file is used, respectively.
197
+ """mdmd:hidden
198
+ This method has been removed.
214
199
  """
215
200
  ...
216
201
 
modal/functions.pyi CHANGED
@@ -409,7 +409,7 @@ class Function(
409
409
 
410
410
  _call_generator: ___call_generator_spec[typing_extensions.Self]
411
411
 
412
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
412
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
413
413
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
414
414
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
415
415
  ...
@@ -418,7 +418,7 @@ class Function(
418
418
  """Calls the function remotely, executing it with the given arguments and returning the execution's result."""
419
419
  ...
420
420
 
421
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
421
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
422
422
 
423
423
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
424
424
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
@@ -445,7 +445,7 @@ class Function(
445
445
  """
446
446
  ...
447
447
 
448
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
448
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
449
449
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
450
450
  """[Experimental] Calls the function with the given arguments, without waiting for the results.
451
451
 
@@ -469,7 +469,7 @@ class Function(
469
469
  ...
470
470
 
471
471
  _experimental_spawn: ___experimental_spawn_spec[
472
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
472
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
473
473
  ]
474
474
 
475
475
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
@@ -478,7 +478,7 @@ class Function(
478
478
 
479
479
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
480
480
 
481
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
481
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
482
482
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
483
483
  """Calls the function with the given arguments, without waiting for the results.
484
484
 
@@ -499,7 +499,7 @@ class Function(
499
499
  """
500
500
  ...
501
501
 
502
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
502
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
503
503
 
504
504
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
505
505
  """Return the inner Python object wrapped by this Modal Function."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.7.dev5
3
+ Version: 1.2.7.dev6
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -26,7 +26,7 @@ modal/app.pyi,sha256=nI_Tibj-rI5I7dJFJnczbHvcmVzCvvCih0tMzoQlr_Y,50835
26
26
  modal/billing.py,sha256=zmQ3bcCJlwa4KD1IA_QgdWpm1pn13c-7qfy79iEauYI,195
27
27
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
28
28
  modal/client.py,sha256=k1CqQ_0t4-vHylkqYZgYCnClg-FT0QrTPAKivL01A_k,14354
29
- modal/client.pyi,sha256=Cqqt7JnZ9pbLQl0498L08aiVIqe9AbcuT15Nw4oHpj0,13146
29
+ modal/client.pyi,sha256=vEGk00yRCoY8LzgrWmvJkOW7XUuP0AYSQEVdVg37bWA,13146
30
30
  modal/cloud_bucket_mount.py,sha256=cvVj5Rt4nDHoQbTneoJPTaAcnl_Ab_mrsjnnzd0v9OI,6013
31
31
  modal/cloud_bucket_mount.pyi,sha256=vXusGMOUk9HjCs4lhxteuCK4xLQclPfugGWKo7LECEA,7539
32
32
  modal/cls.py,sha256=PIGe4ED28jcxC2HeKtMD3odMIb4qNmlRt3tj1dZstRo,41738
@@ -39,11 +39,11 @@ modal/dict.pyi,sha256=yQHHZe98M6gB2ahzrmqlq8KUXvqFy6vamsijI2H0RdE,32002
39
39
  modal/environments.py,sha256=wMiMNpPkvIl_BdxRb81CY9Djzhczp_y4GEYKWp0JyBc,6135
40
40
  modal/environments.pyi,sha256=bMIxvwahckgaolGD3-hP2iovRHDXewvgbVs_nx4ze0o,3808
41
41
  modal/exception.py,sha256=8QeIE6XcuAc1moa1hSgQTxFFjfEyIdiuKiAyCS3RS4M,10210
42
- modal/file_io.py,sha256=Whs3QSl3pQbSoLzSRIIWfK4XyP-kwgyZmWgx3bhJ9u0,20933
43
- modal/file_io.pyi,sha256=xtO6Glf_BFwDE7QiQQo24QqcMf_Vv-iz7WojcGVlLBU,15932
42
+ modal/file_io.py,sha256=lfcQAWeuujQol_e1mYlm331Uesh__yWsv-u19gQV7wc,19308
43
+ modal/file_io.pyi,sha256=MpO5-EA6KuBbOQV0zXV_nPDD5Aw5dfYVa8q9SGBsAVM,14666
44
44
  modal/file_pattern_matcher.py,sha256=A_Kdkej6q7YQyhM_2-BvpFmPqJ0oHb54B6yf9VqvPVE,8116
45
45
  modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
46
- modal/functions.pyi,sha256=iaFyXiAZEdzd2e7vwB5sLzoLB1kSWCQrIiqmTaczFgQ,38111
46
+ modal/functions.pyi,sha256=Gyb8fhedU4BlEXIlgSBdDpQKNL-QIYvRxuf50WrN04k,38111
47
47
  modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
48
48
  modal/image.py,sha256=Pm26DwuD7RqfrxscAHxhoA9LGJYTt_k0wcsHRqbwnzE,107945
49
49
  modal/image.pyi,sha256=grkqK9BfyKDXmJYNme-lGa0O3u7pOU5GifyLOAhG3sc,78202
@@ -158,7 +158,7 @@ modal/experimental/__init__.py,sha256=GOuo3t4-Le0ZVddiHIOw0MQxkdTJge-bVbhDvgnblm
158
158
  modal/experimental/flash.py,sha256=GJZwSr-4OHlP6gCIZdcbsSb8D8WX9xJwMphjwcfsRoU,31262
159
159
  modal/experimental/flash.pyi,sha256=q4a3mdgL0jzATPL2tS7LpuyulYzF1vUSE453S9xc8n8,16965
160
160
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
161
- modal-1.2.7.dev5.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
161
+ modal-1.2.7.dev6.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
162
162
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
163
163
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
164
164
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -180,10 +180,10 @@ modal_proto/task_command_router_pb2.py,sha256=2Y8wRvnq4_7RiQ-5ZAPIgXaxrHv_MXzgS5
180
180
  modal_proto/task_command_router_pb2.pyi,sha256=yI4tFteErLlonFA2HyaWtONfhY_VGSe7KCWFIspvmkE,16323
181
181
  modal_proto/task_command_router_pb2_grpc.py,sha256=q2VWfK2-4uDcPaPLhAqPZkgxhuQRYnWmwUcnEbPbGuk,13895
182
182
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=e1MM10VGUgDkm041v53QeTglGQPzTpA0FUsFtezjp74,4536
183
- modal_version/__init__.py,sha256=eejT6q26GwrO-XbwpZzWi-7anHyeKObpaD8NgCMfI4A,120
183
+ modal_version/__init__.py,sha256=FwTeazkANh8hfTrQNSwBYfVxE4ftKxDfOyO3YKhXrKY,120
184
184
  modal_version/__main__.py,sha256=nLUbubxKx7GXNzJIkTB7M7_u8080LyLM0IS0rzFkC_c,119
185
- modal-1.2.7.dev5.dist-info/METADATA,sha256=SsX4aTmEf3fgF70rHIWpje1J7EYZyx0ERd1G_AdO238,2491
186
- modal-1.2.7.dev5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
187
- modal-1.2.7.dev5.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
188
- modal-1.2.7.dev5.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
189
- modal-1.2.7.dev5.dist-info/RECORD,,
185
+ modal-1.2.7.dev6.dist-info/METADATA,sha256=h9P8cAsr3n2u-XCUg6dfncACZHNMObnhk1Vx45TYvx8,2491
186
+ modal-1.2.7.dev6.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
187
+ modal-1.2.7.dev6.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
188
+ modal-1.2.7.dev6.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
189
+ modal-1.2.7.dev6.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.2.7.dev5"
4
+ __version__ = "1.2.7.dev6"