modal 0.74.56__py3-none-any.whl → 0.74.58__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/_clustered_functions.pyi +2 -2
- modal/_functions.py +3 -2
- modal/_partial_function.py +3 -2
- modal/_resources.py +2 -0
- modal/_runtime/container_io_manager.pyi +46 -40
- modal/_runtime/execution_context.pyi +2 -2
- modal/_tunnel.pyi +2 -2
- modal/app.py +3 -0
- modal/app.pyi +12 -4
- modal/client.pyi +16 -16
- modal/cls.pyi +10 -6
- modal/container_process.pyi +6 -6
- modal/dict.pyi +32 -28
- modal/environments.pyi +10 -8
- modal/file_io.pyi +36 -32
- modal/functions.pyi +67 -51
- modal/image.pyi +4 -4
- modal/io_streams.pyi +12 -12
- modal/mount.pyi +6 -4
- modal/network_file_system.pyi +20 -8
- modal/object.pyi +6 -4
- modal/parallel_map.pyi +6 -6
- modal/queue.pyi +36 -14
- modal/runner.pyi +8 -4
- modal/sandbox.pyi +40 -30
- modal/secret.pyi +4 -0
- modal/serving.pyi +2 -0
- modal/snapshot.pyi +2 -2
- modal/token_flow.pyi +4 -4
- modal/volume.py +22 -5
- modal/volume.pyi +38 -30
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/METADATA +1 -1
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/RECORD +38 -38
- modal_version/_version_generated.py +1 -1
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/WHEEL +0 -0
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/entry_points.txt +0 -0
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.56.dist-info → modal-0.74.58.dist-info}/top_level.txt +0 -0
modal/dict.pyi
CHANGED
@@ -83,6 +83,7 @@ class Dict(modal.object.Object):
|
|
83
83
|
class __lookup_spec(typing_extensions.Protocol):
|
84
84
|
def __call__(
|
85
85
|
self,
|
86
|
+
/,
|
86
87
|
name: str,
|
87
88
|
data: typing.Optional[dict] = None,
|
88
89
|
namespace=1,
|
@@ -92,6 +93,7 @@ class Dict(modal.object.Object):
|
|
92
93
|
) -> Dict: ...
|
93
94
|
async def aio(
|
94
95
|
self,
|
96
|
+
/,
|
95
97
|
name: str,
|
96
98
|
data: typing.Optional[dict] = None,
|
97
99
|
namespace=1,
|
@@ -105,6 +107,7 @@ class Dict(modal.object.Object):
|
|
105
107
|
class __delete_spec(typing_extensions.Protocol):
|
106
108
|
def __call__(
|
107
109
|
self,
|
110
|
+
/,
|
108
111
|
name: str,
|
109
112
|
*,
|
110
113
|
client: typing.Optional[modal.client.Client] = None,
|
@@ -112,6 +115,7 @@ class Dict(modal.object.Object):
|
|
112
115
|
): ...
|
113
116
|
async def aio(
|
114
117
|
self,
|
118
|
+
/,
|
115
119
|
name: str,
|
116
120
|
*,
|
117
121
|
client: typing.Optional[modal.client.Client] = None,
|
@@ -121,85 +125,85 @@ class Dict(modal.object.Object):
|
|
121
125
|
delete: __delete_spec
|
122
126
|
|
123
127
|
class __clear_spec(typing_extensions.Protocol[SUPERSELF]):
|
124
|
-
def __call__(self) -> None: ...
|
125
|
-
async def aio(self) -> None: ...
|
128
|
+
def __call__(self, /) -> None: ...
|
129
|
+
async def aio(self, /) -> None: ...
|
126
130
|
|
127
131
|
clear: __clear_spec[typing_extensions.Self]
|
128
132
|
|
129
133
|
class __get_spec(typing_extensions.Protocol[SUPERSELF]):
|
130
|
-
def __call__(self, key: typing.Any, default: typing.Optional[typing.Any] = None) -> typing.Any: ...
|
131
|
-
async def aio(self, key: typing.Any, default: typing.Optional[typing.Any] = None) -> typing.Any: ...
|
134
|
+
def __call__(self, /, key: typing.Any, default: typing.Optional[typing.Any] = None) -> typing.Any: ...
|
135
|
+
async def aio(self, /, key: typing.Any, default: typing.Optional[typing.Any] = None) -> typing.Any: ...
|
132
136
|
|
133
137
|
get: __get_spec[typing_extensions.Self]
|
134
138
|
|
135
139
|
class __contains_spec(typing_extensions.Protocol[SUPERSELF]):
|
136
|
-
def __call__(self, key: typing.Any) -> bool: ...
|
137
|
-
async def aio(self, key: typing.Any) -> bool: ...
|
140
|
+
def __call__(self, /, key: typing.Any) -> bool: ...
|
141
|
+
async def aio(self, /, key: typing.Any) -> bool: ...
|
138
142
|
|
139
143
|
contains: __contains_spec[typing_extensions.Self]
|
140
144
|
|
141
145
|
class __len_spec(typing_extensions.Protocol[SUPERSELF]):
|
142
|
-
def __call__(self) -> int: ...
|
143
|
-
async def aio(self) -> int: ...
|
146
|
+
def __call__(self, /) -> int: ...
|
147
|
+
async def aio(self, /) -> int: ...
|
144
148
|
|
145
149
|
len: __len_spec[typing_extensions.Self]
|
146
150
|
|
147
151
|
class ____getitem___spec(typing_extensions.Protocol[SUPERSELF]):
|
148
|
-
def __call__(self, key: typing.Any) -> typing.Any: ...
|
149
|
-
async def aio(self, key: typing.Any) -> typing.Any: ...
|
152
|
+
def __call__(self, /, key: typing.Any) -> typing.Any: ...
|
153
|
+
async def aio(self, /, key: typing.Any) -> typing.Any: ...
|
150
154
|
|
151
155
|
__getitem__: ____getitem___spec[typing_extensions.Self]
|
152
156
|
|
153
157
|
class __update_spec(typing_extensions.Protocol[SUPERSELF]):
|
154
|
-
def __call__(self, **kwargs) -> None: ...
|
155
|
-
async def aio(self, **kwargs) -> None: ...
|
158
|
+
def __call__(self, /, **kwargs) -> None: ...
|
159
|
+
async def aio(self, /, **kwargs) -> None: ...
|
156
160
|
|
157
161
|
update: __update_spec[typing_extensions.Self]
|
158
162
|
|
159
163
|
class __put_spec(typing_extensions.Protocol[SUPERSELF]):
|
160
|
-
def __call__(self, key: typing.Any, value: typing.Any) -> None: ...
|
161
|
-
async def aio(self, key: typing.Any, value: typing.Any) -> None: ...
|
164
|
+
def __call__(self, /, key: typing.Any, value: typing.Any) -> None: ...
|
165
|
+
async def aio(self, /, key: typing.Any, value: typing.Any) -> None: ...
|
162
166
|
|
163
167
|
put: __put_spec[typing_extensions.Self]
|
164
168
|
|
165
169
|
class ____setitem___spec(typing_extensions.Protocol[SUPERSELF]):
|
166
|
-
def __call__(self, key: typing.Any, value: typing.Any) -> None: ...
|
167
|
-
async def aio(self, key: typing.Any, value: typing.Any) -> None: ...
|
170
|
+
def __call__(self, /, key: typing.Any, value: typing.Any) -> None: ...
|
171
|
+
async def aio(self, /, key: typing.Any, value: typing.Any) -> None: ...
|
168
172
|
|
169
173
|
__setitem__: ____setitem___spec[typing_extensions.Self]
|
170
174
|
|
171
175
|
class __pop_spec(typing_extensions.Protocol[SUPERSELF]):
|
172
|
-
def __call__(self, key: typing.Any) -> typing.Any: ...
|
173
|
-
async def aio(self, key: typing.Any) -> typing.Any: ...
|
176
|
+
def __call__(self, /, key: typing.Any) -> typing.Any: ...
|
177
|
+
async def aio(self, /, key: typing.Any) -> typing.Any: ...
|
174
178
|
|
175
179
|
pop: __pop_spec[typing_extensions.Self]
|
176
180
|
|
177
181
|
class ____delitem___spec(typing_extensions.Protocol[SUPERSELF]):
|
178
|
-
def __call__(self, key: typing.Any) -> typing.Any: ...
|
179
|
-
async def aio(self, key: typing.Any) -> typing.Any: ...
|
182
|
+
def __call__(self, /, key: typing.Any) -> typing.Any: ...
|
183
|
+
async def aio(self, /, key: typing.Any) -> typing.Any: ...
|
180
184
|
|
181
185
|
__delitem__: ____delitem___spec[typing_extensions.Self]
|
182
186
|
|
183
187
|
class ____contains___spec(typing_extensions.Protocol[SUPERSELF]):
|
184
|
-
def __call__(self, key: typing.Any) -> bool: ...
|
185
|
-
async def aio(self, key: typing.Any) -> bool: ...
|
188
|
+
def __call__(self, /, key: typing.Any) -> bool: ...
|
189
|
+
async def aio(self, /, key: typing.Any) -> bool: ...
|
186
190
|
|
187
191
|
__contains__: ____contains___spec[typing_extensions.Self]
|
188
192
|
|
189
193
|
class __keys_spec(typing_extensions.Protocol[SUPERSELF]):
|
190
|
-
def __call__(self) -> typing.Iterator[typing.Any]: ...
|
191
|
-
def aio(self) -> collections.abc.AsyncIterator[typing.Any]: ...
|
194
|
+
def __call__(self, /) -> typing.Iterator[typing.Any]: ...
|
195
|
+
def aio(self, /) -> collections.abc.AsyncIterator[typing.Any]: ...
|
192
196
|
|
193
197
|
keys: __keys_spec[typing_extensions.Self]
|
194
198
|
|
195
199
|
class __values_spec(typing_extensions.Protocol[SUPERSELF]):
|
196
|
-
def __call__(self) -> typing.Iterator[typing.Any]: ...
|
197
|
-
def aio(self) -> collections.abc.AsyncIterator[typing.Any]: ...
|
200
|
+
def __call__(self, /) -> typing.Iterator[typing.Any]: ...
|
201
|
+
def aio(self, /) -> collections.abc.AsyncIterator[typing.Any]: ...
|
198
202
|
|
199
203
|
values: __values_spec[typing_extensions.Self]
|
200
204
|
|
201
205
|
class __items_spec(typing_extensions.Protocol[SUPERSELF]):
|
202
|
-
def __call__(self) -> typing.Iterator[tuple[typing.Any, typing.Any]]: ...
|
203
|
-
def aio(self) -> collections.abc.AsyncIterator[tuple[typing.Any, typing.Any]]: ...
|
206
|
+
def __call__(self, /) -> typing.Iterator[tuple[typing.Any, typing.Any]]: ...
|
207
|
+
def aio(self, /) -> collections.abc.AsyncIterator[tuple[typing.Any, typing.Any]]: ...
|
204
208
|
|
205
209
|
items: __items_spec[typing_extensions.Self]
|
modal/environments.pyi
CHANGED
@@ -39,10 +39,10 @@ class Environment(modal.object.Object):
|
|
39
39
|
|
40
40
|
class __lookup_spec(typing_extensions.Protocol):
|
41
41
|
def __call__(
|
42
|
-
self, name: str, client: typing.Optional[modal.client.Client] = None, create_if_missing: bool = False
|
42
|
+
self, /, name: str, client: typing.Optional[modal.client.Client] = None, create_if_missing: bool = False
|
43
43
|
): ...
|
44
44
|
async def aio(
|
45
|
-
self, name: str, client: typing.Optional[modal.client.Client] = None, create_if_missing: bool = False
|
45
|
+
self, /, name: str, client: typing.Optional[modal.client.Client] = None, create_if_missing: bool = False
|
46
46
|
): ...
|
47
47
|
|
48
48
|
lookup: __lookup_spec
|
@@ -50,14 +50,15 @@ class Environment(modal.object.Object):
|
|
50
50
|
async def _get_environment_cached(name: str, client: modal.client._Client) -> _Environment: ...
|
51
51
|
|
52
52
|
class __delete_environment_spec(typing_extensions.Protocol):
|
53
|
-
def __call__(self, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
54
|
-
async def aio(self, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
53
|
+
def __call__(self, /, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
54
|
+
async def aio(self, /, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
55
55
|
|
56
56
|
delete_environment: __delete_environment_spec
|
57
57
|
|
58
58
|
class __update_environment_spec(typing_extensions.Protocol):
|
59
59
|
def __call__(
|
60
60
|
self,
|
61
|
+
/,
|
61
62
|
current_name: str,
|
62
63
|
*,
|
63
64
|
new_name: typing.Optional[str] = None,
|
@@ -66,6 +67,7 @@ class __update_environment_spec(typing_extensions.Protocol):
|
|
66
67
|
): ...
|
67
68
|
async def aio(
|
68
69
|
self,
|
70
|
+
/,
|
69
71
|
current_name: str,
|
70
72
|
*,
|
71
73
|
new_name: typing.Optional[str] = None,
|
@@ -76,17 +78,17 @@ class __update_environment_spec(typing_extensions.Protocol):
|
|
76
78
|
update_environment: __update_environment_spec
|
77
79
|
|
78
80
|
class __create_environment_spec(typing_extensions.Protocol):
|
79
|
-
def __call__(self, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
80
|
-
async def aio(self, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
81
|
+
def __call__(self, /, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
82
|
+
async def aio(self, /, name: str, client: typing.Optional[modal.client.Client] = None): ...
|
81
83
|
|
82
84
|
create_environment: __create_environment_spec
|
83
85
|
|
84
86
|
class __list_environments_spec(typing_extensions.Protocol):
|
85
87
|
def __call__(
|
86
|
-
self, client: typing.Optional[modal.client.Client] = None
|
88
|
+
self, /, client: typing.Optional[modal.client.Client] = None
|
87
89
|
) -> list[modal_proto.api_pb2.EnvironmentListItem]: ...
|
88
90
|
async def aio(
|
89
|
-
self, client: typing.Optional[modal.client.Client] = None
|
91
|
+
self, /, client: typing.Optional[modal.client.Client] = None
|
90
92
|
) -> list[modal_proto.api_pb2.EnvironmentListItem]: ...
|
91
93
|
|
92
94
|
list_environments: __list_environments_spec
|
modal/file_io.pyi
CHANGED
@@ -85,17 +85,21 @@ class _FileIO(typing.Generic[T]):
|
|
85
85
|
async def __aexit__(self, exc_type, exc_value, traceback) -> None: ...
|
86
86
|
|
87
87
|
class __delete_bytes_spec(typing_extensions.Protocol):
|
88
|
-
def __call__(
|
89
|
-
|
88
|
+
def __call__(
|
89
|
+
self, /, file: FileIO, start: typing.Optional[int] = None, end: typing.Optional[int] = None
|
90
|
+
) -> None: ...
|
91
|
+
async def aio(
|
92
|
+
self, /, file: FileIO, start: typing.Optional[int] = None, end: typing.Optional[int] = None
|
93
|
+
) -> None: ...
|
90
94
|
|
91
95
|
delete_bytes: __delete_bytes_spec
|
92
96
|
|
93
97
|
class __replace_bytes_spec(typing_extensions.Protocol):
|
94
98
|
def __call__(
|
95
|
-
self, file: FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
|
99
|
+
self, /, file: FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
|
96
100
|
) -> None: ...
|
97
101
|
async def aio(
|
98
|
-
self, file: FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
|
102
|
+
self, /, file: FileIO, data: bytes, start: typing.Optional[int] = None, end: typing.Optional[int] = None
|
99
103
|
) -> None: ...
|
100
104
|
|
101
105
|
replace_bytes: __replace_bytes_spec
|
@@ -115,34 +119,34 @@ class FileIO(typing.Generic[T]):
|
|
115
119
|
def _handle_error(self, error: modal_proto.api_pb2.SystemErrorMessage) -> None: ...
|
116
120
|
|
117
121
|
class ___consume_output_spec(typing_extensions.Protocol[SUPERSELF]):
|
118
|
-
def __call__(self, exec_id: str) -> typing.Iterator[typing.Optional[bytes]]: ...
|
119
|
-
def aio(self, exec_id: str) -> typing.AsyncIterator[typing.Optional[bytes]]: ...
|
122
|
+
def __call__(self, /, exec_id: str) -> typing.Iterator[typing.Optional[bytes]]: ...
|
123
|
+
def aio(self, /, exec_id: str) -> typing.AsyncIterator[typing.Optional[bytes]]: ...
|
120
124
|
|
121
125
|
_consume_output: ___consume_output_spec[typing_extensions.Self]
|
122
126
|
|
123
127
|
class ___consume_watch_output_spec(typing_extensions.Protocol[SUPERSELF]):
|
124
|
-
def __call__(self, exec_id: str) -> None: ...
|
125
|
-
async def aio(self, exec_id: str) -> None: ...
|
128
|
+
def __call__(self, /, exec_id: str) -> None: ...
|
129
|
+
async def aio(self, /, exec_id: str) -> None: ...
|
126
130
|
|
127
131
|
_consume_watch_output: ___consume_watch_output_spec[typing_extensions.Self]
|
128
132
|
|
129
133
|
class ___parse_watch_output_spec(typing_extensions.Protocol[SUPERSELF]):
|
130
|
-
def __call__(self, event: bytes) -> typing.Optional[FileWatchEvent]: ...
|
131
|
-
async def aio(self, event: bytes) -> typing.Optional[FileWatchEvent]: ...
|
134
|
+
def __call__(self, /, event: bytes) -> typing.Optional[FileWatchEvent]: ...
|
135
|
+
async def aio(self, /, event: bytes) -> typing.Optional[FileWatchEvent]: ...
|
132
136
|
|
133
137
|
_parse_watch_output: ___parse_watch_output_spec[typing_extensions.Self]
|
134
138
|
|
135
139
|
class ___wait_spec(typing_extensions.Protocol[SUPERSELF]):
|
136
|
-
def __call__(self, exec_id: str) -> bytes: ...
|
137
|
-
async def aio(self, exec_id: str) -> bytes: ...
|
140
|
+
def __call__(self, /, exec_id: str) -> bytes: ...
|
141
|
+
async def aio(self, /, exec_id: str) -> bytes: ...
|
138
142
|
|
139
143
|
_wait: ___wait_spec[typing_extensions.Self]
|
140
144
|
|
141
145
|
def _validate_type(self, data: typing.Union[bytes, str]) -> None: ...
|
142
146
|
|
143
147
|
class ___open_file_spec(typing_extensions.Protocol[SUPERSELF]):
|
144
|
-
def __call__(self, path: str, mode: str) -> None: ...
|
145
|
-
async def aio(self, path: str, mode: str) -> None: ...
|
148
|
+
def __call__(self, /, path: str, mode: str) -> None: ...
|
149
|
+
async def aio(self, /, path: str, mode: str) -> None: ...
|
146
150
|
|
147
151
|
_open_file: ___open_file_spec[typing_extensions.Self]
|
148
152
|
|
@@ -156,46 +160,46 @@ class FileIO(typing.Generic[T]):
|
|
156
160
|
) -> FileIO: ...
|
157
161
|
|
158
162
|
class ___make_read_request_spec(typing_extensions.Protocol[SUPERSELF]):
|
159
|
-
def __call__(self, n: typing.Optional[int]) -> bytes: ...
|
160
|
-
async def aio(self, n: typing.Optional[int]) -> bytes: ...
|
163
|
+
def __call__(self, /, n: typing.Optional[int]) -> bytes: ...
|
164
|
+
async def aio(self, /, n: typing.Optional[int]) -> bytes: ...
|
161
165
|
|
162
166
|
_make_read_request: ___make_read_request_spec[typing_extensions.Self]
|
163
167
|
|
164
168
|
class __read_spec(typing_extensions.Protocol[T_INNER, SUPERSELF]):
|
165
|
-
def __call__(self, n: typing.Optional[int] = None) -> T_INNER: ...
|
166
|
-
async def aio(self, n: typing.Optional[int] = None) -> T_INNER: ...
|
169
|
+
def __call__(self, /, n: typing.Optional[int] = None) -> T_INNER: ...
|
170
|
+
async def aio(self, /, n: typing.Optional[int] = None) -> T_INNER: ...
|
167
171
|
|
168
172
|
read: __read_spec[T, typing_extensions.Self]
|
169
173
|
|
170
174
|
class __readline_spec(typing_extensions.Protocol[T_INNER, SUPERSELF]):
|
171
|
-
def __call__(self) -> T_INNER: ...
|
172
|
-
async def aio(self) -> T_INNER: ...
|
175
|
+
def __call__(self, /) -> T_INNER: ...
|
176
|
+
async def aio(self, /) -> T_INNER: ...
|
173
177
|
|
174
178
|
readline: __readline_spec[T, typing_extensions.Self]
|
175
179
|
|
176
180
|
class __readlines_spec(typing_extensions.Protocol[T_INNER, SUPERSELF]):
|
177
|
-
def __call__(self) -> typing.Sequence[T_INNER]: ...
|
178
|
-
async def aio(self) -> typing.Sequence[T_INNER]: ...
|
181
|
+
def __call__(self, /) -> typing.Sequence[T_INNER]: ...
|
182
|
+
async def aio(self, /) -> typing.Sequence[T_INNER]: ...
|
179
183
|
|
180
184
|
readlines: __readlines_spec[T, typing_extensions.Self]
|
181
185
|
|
182
186
|
class __write_spec(typing_extensions.Protocol[SUPERSELF]):
|
183
|
-
def __call__(self, data: typing.Union[bytes, str]) -> None: ...
|
184
|
-
async def aio(self, data: typing.Union[bytes, str]) -> None: ...
|
187
|
+
def __call__(self, /, data: typing.Union[bytes, str]) -> None: ...
|
188
|
+
async def aio(self, /, data: typing.Union[bytes, str]) -> None: ...
|
185
189
|
|
186
190
|
write: __write_spec[typing_extensions.Self]
|
187
191
|
|
188
192
|
class __flush_spec(typing_extensions.Protocol[SUPERSELF]):
|
189
|
-
def __call__(self) -> None: ...
|
190
|
-
async def aio(self) -> None: ...
|
193
|
+
def __call__(self, /) -> None: ...
|
194
|
+
async def aio(self, /) -> None: ...
|
191
195
|
|
192
196
|
flush: __flush_spec[typing_extensions.Self]
|
193
197
|
|
194
198
|
def _get_whence(self, whence: int): ...
|
195
199
|
|
196
200
|
class __seek_spec(typing_extensions.Protocol[SUPERSELF]):
|
197
|
-
def __call__(self, offset: int, whence: int = 0) -> None: ...
|
198
|
-
async def aio(self, offset: int, whence: int = 0) -> None: ...
|
201
|
+
def __call__(self, /, offset: int, whence: int = 0) -> None: ...
|
202
|
+
async def aio(self, /, offset: int, whence: int = 0) -> None: ...
|
199
203
|
|
200
204
|
seek: __seek_spec[typing_extensions.Self]
|
201
205
|
|
@@ -217,14 +221,14 @@ class FileIO(typing.Generic[T]):
|
|
217
221
|
) -> typing.Iterator[FileWatchEvent]: ...
|
218
222
|
|
219
223
|
class ___close_spec(typing_extensions.Protocol[SUPERSELF]):
|
220
|
-
def __call__(self) -> None: ...
|
221
|
-
async def aio(self) -> None: ...
|
224
|
+
def __call__(self, /) -> None: ...
|
225
|
+
async def aio(self, /) -> None: ...
|
222
226
|
|
223
227
|
_close: ___close_spec[typing_extensions.Self]
|
224
228
|
|
225
229
|
class __close_spec(typing_extensions.Protocol[SUPERSELF]):
|
226
|
-
def __call__(self) -> None: ...
|
227
|
-
async def aio(self) -> None: ...
|
230
|
+
def __call__(self, /) -> None: ...
|
231
|
+
async def aio(self, /) -> None: ...
|
228
232
|
|
229
233
|
close: __close_spec[typing_extensions.Self]
|
230
234
|
|
modal/functions.pyi
CHANGED
@@ -94,6 +94,7 @@ class Function(
|
|
94
94
|
restrict_modal_access: bool = False,
|
95
95
|
i6pn_enabled: bool = False,
|
96
96
|
cluster_size: typing.Optional[int] = None,
|
97
|
+
rdma: typing.Optional[bool] = None,
|
97
98
|
max_inputs: typing.Optional[int] = None,
|
98
99
|
ephemeral_disk: typing.Optional[int] = None,
|
99
100
|
include_source: typing.Optional[bool] = None,
|
@@ -113,6 +114,7 @@ class Function(
|
|
113
114
|
class __update_autoscaler_spec(typing_extensions.Protocol[SUPERSELF]):
|
114
115
|
def __call__(
|
115
116
|
self,
|
117
|
+
/,
|
116
118
|
*,
|
117
119
|
min_containers: typing.Optional[int] = None,
|
118
120
|
max_containers: typing.Optional[int] = None,
|
@@ -121,6 +123,7 @@ class Function(
|
|
121
123
|
) -> None: ...
|
122
124
|
async def aio(
|
123
125
|
self,
|
126
|
+
/,
|
124
127
|
*,
|
125
128
|
min_containers: typing.Optional[int] = None,
|
126
129
|
max_containers: typing.Optional[int] = None,
|
@@ -131,8 +134,8 @@ class Function(
|
|
131
134
|
update_autoscaler: __update_autoscaler_spec[typing_extensions.Self]
|
132
135
|
|
133
136
|
class __keep_warm_spec(typing_extensions.Protocol[SUPERSELF]):
|
134
|
-
def __call__(self, warm_pool_size: int) -> None: ...
|
135
|
-
async def aio(self, warm_pool_size: int) -> None: ...
|
137
|
+
def __call__(self, /, warm_pool_size: int) -> None: ...
|
138
|
+
async def aio(self, /, warm_pool_size: int) -> None: ...
|
136
139
|
|
137
140
|
keep_warm: __keep_warm_spec[typing_extensions.Self]
|
138
141
|
|
@@ -146,6 +149,7 @@ class Function(
|
|
146
149
|
class __lookup_spec(typing_extensions.Protocol):
|
147
150
|
def __call__(
|
148
151
|
self,
|
152
|
+
/,
|
149
153
|
app_name: str,
|
150
154
|
name: str,
|
151
155
|
namespace=1,
|
@@ -154,6 +158,7 @@ class Function(
|
|
154
158
|
) -> Function: ...
|
155
159
|
async def aio(
|
156
160
|
self,
|
161
|
+
/,
|
157
162
|
app_name: str,
|
158
163
|
name: str,
|
159
164
|
namespace=1,
|
@@ -186,51 +191,51 @@ class Function(
|
|
186
191
|
|
187
192
|
class ___map_spec(typing_extensions.Protocol[SUPERSELF]):
|
188
193
|
def __call__(
|
189
|
-
self, input_queue: modal.parallel_map.SynchronizedQueue, order_outputs: bool, return_exceptions: bool
|
194
|
+
self, /, input_queue: modal.parallel_map.SynchronizedQueue, order_outputs: bool, return_exceptions: bool
|
190
195
|
) -> typing.Generator[typing.Any, None, None]: ...
|
191
196
|
def aio(
|
192
|
-
self, input_queue: modal.parallel_map.SynchronizedQueue, order_outputs: bool, return_exceptions: bool
|
197
|
+
self, /, input_queue: modal.parallel_map.SynchronizedQueue, order_outputs: bool, return_exceptions: bool
|
193
198
|
) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
194
199
|
|
195
200
|
_map: ___map_spec[typing_extensions.Self]
|
196
201
|
|
197
202
|
class ___call_function_spec(typing_extensions.Protocol[ReturnType_INNER, SUPERSELF]):
|
198
|
-
def __call__(self, args, kwargs) -> ReturnType_INNER: ...
|
199
|
-
async def aio(self, args, kwargs) -> ReturnType_INNER: ...
|
203
|
+
def __call__(self, /, args, kwargs) -> ReturnType_INNER: ...
|
204
|
+
async def aio(self, /, args, kwargs) -> ReturnType_INNER: ...
|
200
205
|
|
201
206
|
_call_function: ___call_function_spec[modal._functions.ReturnType, typing_extensions.Self]
|
202
207
|
|
203
208
|
class ___call_function_nowait_spec(typing_extensions.Protocol[SUPERSELF]):
|
204
209
|
def __call__(
|
205
|
-
self, args, kwargs, function_call_invocation_type: int, from_spawn_map: bool = False
|
210
|
+
self, /, args, kwargs, function_call_invocation_type: int, from_spawn_map: bool = False
|
206
211
|
) -> modal._functions._Invocation: ...
|
207
212
|
async def aio(
|
208
|
-
self, args, kwargs, function_call_invocation_type: int, from_spawn_map: bool = False
|
213
|
+
self, /, args, kwargs, function_call_invocation_type: int, from_spawn_map: bool = False
|
209
214
|
) -> modal._functions._Invocation: ...
|
210
215
|
|
211
216
|
_call_function_nowait: ___call_function_nowait_spec[typing_extensions.Self]
|
212
217
|
|
213
218
|
class ___call_generator_spec(typing_extensions.Protocol[SUPERSELF]):
|
214
|
-
def __call__(self, args, kwargs): ...
|
215
|
-
def aio(self, args, kwargs): ...
|
219
|
+
def __call__(self, /, args, kwargs): ...
|
220
|
+
def aio(self, /, args, kwargs): ...
|
216
221
|
|
217
222
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
218
223
|
|
219
224
|
class ___call_generator_nowait_spec(typing_extensions.Protocol[SUPERSELF]):
|
220
|
-
def __call__(self, args, kwargs): ...
|
221
|
-
async def aio(self, args, kwargs): ...
|
225
|
+
def __call__(self, /, args, kwargs): ...
|
226
|
+
async def aio(self, /, args, kwargs): ...
|
222
227
|
|
223
228
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
224
229
|
|
225
|
-
class __remote_spec(typing_extensions.Protocol[
|
226
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
227
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
230
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
231
|
+
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
232
|
+
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
228
233
|
|
229
|
-
remote: __remote_spec[modal._functions.
|
234
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
230
235
|
|
231
236
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
232
|
-
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
233
|
-
def aio(self, *args, **kwargs) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
237
|
+
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
238
|
+
def aio(self, /, *args, **kwargs) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
234
239
|
|
235
240
|
remote_gen: __remote_gen_spec[typing_extensions.Self]
|
236
241
|
|
@@ -241,46 +246,47 @@ class Function(
|
|
241
246
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
242
247
|
) -> modal._functions.OriginalReturnType: ...
|
243
248
|
|
244
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
245
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
246
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
249
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
250
|
+
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
251
|
+
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
247
252
|
|
248
253
|
_experimental_spawn: ___experimental_spawn_spec[
|
249
|
-
modal._functions.
|
254
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
250
255
|
]
|
251
256
|
|
252
257
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
253
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
254
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
258
|
+
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
259
|
+
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
255
260
|
|
256
261
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
257
262
|
|
258
|
-
class __spawn_spec(typing_extensions.Protocol[
|
259
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
260
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
263
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
264
|
+
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
265
|
+
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
261
266
|
|
262
|
-
spawn: __spawn_spec[modal._functions.
|
267
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
263
268
|
|
264
269
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
265
270
|
|
266
271
|
class __get_current_stats_spec(typing_extensions.Protocol[SUPERSELF]):
|
267
|
-
def __call__(self) -> modal._functions.FunctionStats: ...
|
268
|
-
async def aio(self) -> modal._functions.FunctionStats: ...
|
272
|
+
def __call__(self, /) -> modal._functions.FunctionStats: ...
|
273
|
+
async def aio(self, /) -> modal._functions.FunctionStats: ...
|
269
274
|
|
270
275
|
get_current_stats: __get_current_stats_spec[typing_extensions.Self]
|
271
276
|
|
272
277
|
class ___get_schema_spec(typing_extensions.Protocol[SUPERSELF]):
|
273
|
-
def __call__(self) -> modal_proto.api_pb2.FunctionSchema: ...
|
274
|
-
async def aio(self) -> modal_proto.api_pb2.FunctionSchema: ...
|
278
|
+
def __call__(self, /) -> modal_proto.api_pb2.FunctionSchema: ...
|
279
|
+
async def aio(self, /) -> modal_proto.api_pb2.FunctionSchema: ...
|
275
280
|
|
276
281
|
_get_schema: ___get_schema_spec[typing_extensions.Self]
|
277
282
|
|
278
283
|
class __map_spec(typing_extensions.Protocol[SUPERSELF]):
|
279
284
|
def __call__(
|
280
|
-
self, *input_iterators, kwargs={}, order_outputs: bool = True, return_exceptions: bool = False
|
285
|
+
self, /, *input_iterators, kwargs={}, order_outputs: bool = True, return_exceptions: bool = False
|
281
286
|
) -> modal._utils.async_utils.AsyncOrSyncIterable: ...
|
282
287
|
def aio(
|
283
288
|
self,
|
289
|
+
/,
|
284
290
|
*input_iterators: typing.Union[typing.Iterable[typing.Any], typing.AsyncIterable[typing.Any]],
|
285
291
|
kwargs={},
|
286
292
|
order_outputs: bool = True,
|
@@ -292,6 +298,7 @@ class Function(
|
|
292
298
|
class __starmap_spec(typing_extensions.Protocol[SUPERSELF]):
|
293
299
|
def __call__(
|
294
300
|
self,
|
301
|
+
/,
|
295
302
|
input_iterator: typing.Iterable[typing.Sequence[typing.Any]],
|
296
303
|
*,
|
297
304
|
kwargs={},
|
@@ -300,6 +307,7 @@ class Function(
|
|
300
307
|
) -> modal._utils.async_utils.AsyncOrSyncIterable: ...
|
301
308
|
def aio(
|
302
309
|
self,
|
310
|
+
/,
|
303
311
|
input_iterator: typing.Union[
|
304
312
|
typing.Iterable[typing.Sequence[typing.Any]], typing.AsyncIterable[typing.Sequence[typing.Any]]
|
305
313
|
],
|
@@ -312,14 +320,14 @@ class Function(
|
|
312
320
|
starmap: __starmap_spec[typing_extensions.Self]
|
313
321
|
|
314
322
|
class __for_each_spec(typing_extensions.Protocol[SUPERSELF]):
|
315
|
-
def __call__(self, *input_iterators, kwargs={}, ignore_exceptions: bool = False): ...
|
316
|
-
async def aio(self, *input_iterators, kwargs={}, ignore_exceptions: bool = False): ...
|
323
|
+
def __call__(self, /, *input_iterators, kwargs={}, ignore_exceptions: bool = False): ...
|
324
|
+
async def aio(self, /, *input_iterators, kwargs={}, ignore_exceptions: bool = False): ...
|
317
325
|
|
318
326
|
for_each: __for_each_spec[typing_extensions.Self]
|
319
327
|
|
320
328
|
class __spawn_map_spec(typing_extensions.Protocol[SUPERSELF]):
|
321
|
-
def __call__(self, *input_iterators, kwargs={}) -> None: ...
|
322
|
-
async def aio(self, *input_iterators, kwargs={}) -> None: ...
|
329
|
+
def __call__(self, /, *input_iterators, kwargs={}) -> None: ...
|
330
|
+
async def aio(self, /, *input_iterators, kwargs={}) -> None: ...
|
323
331
|
|
324
332
|
spawn_map: __spawn_map_spec[typing_extensions.Self]
|
325
333
|
|
@@ -330,51 +338,59 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
|
|
330
338
|
def _invocation(self): ...
|
331
339
|
|
332
340
|
class __get_spec(typing_extensions.Protocol[ReturnType_INNER, SUPERSELF]):
|
333
|
-
def __call__(self, timeout: typing.Optional[float] = None) -> ReturnType_INNER: ...
|
334
|
-
async def aio(self, timeout: typing.Optional[float] = None) -> ReturnType_INNER: ...
|
341
|
+
def __call__(self, /, timeout: typing.Optional[float] = None) -> ReturnType_INNER: ...
|
342
|
+
async def aio(self, /, timeout: typing.Optional[float] = None) -> ReturnType_INNER: ...
|
335
343
|
|
336
344
|
get: __get_spec[modal._functions.ReturnType, typing_extensions.Self]
|
337
345
|
|
338
346
|
class __get_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
339
|
-
def __call__(self) -> typing.Generator[typing.Any, None, None]: ...
|
340
|
-
def aio(self) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
347
|
+
def __call__(self, /) -> typing.Generator[typing.Any, None, None]: ...
|
348
|
+
def aio(self, /) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
341
349
|
|
342
350
|
get_gen: __get_gen_spec[typing_extensions.Self]
|
343
351
|
|
344
352
|
class __get_call_graph_spec(typing_extensions.Protocol[SUPERSELF]):
|
345
|
-
def __call__(self) -> list[modal.call_graph.InputInfo]: ...
|
346
|
-
async def aio(self) -> list[modal.call_graph.InputInfo]: ...
|
353
|
+
def __call__(self, /) -> list[modal.call_graph.InputInfo]: ...
|
354
|
+
async def aio(self, /) -> list[modal.call_graph.InputInfo]: ...
|
347
355
|
|
348
356
|
get_call_graph: __get_call_graph_spec[typing_extensions.Self]
|
349
357
|
|
350
358
|
class __cancel_spec(typing_extensions.Protocol[SUPERSELF]):
|
351
|
-
def __call__(self, terminate_containers: bool = False): ...
|
352
|
-
async def aio(self, terminate_containers: bool = False): ...
|
359
|
+
def __call__(self, /, terminate_containers: bool = False): ...
|
360
|
+
async def aio(self, /, terminate_containers: bool = False): ...
|
353
361
|
|
354
362
|
cancel: __cancel_spec[typing_extensions.Self]
|
355
363
|
|
356
364
|
class __from_id_spec(typing_extensions.Protocol):
|
357
365
|
def __call__(
|
358
|
-
self,
|
366
|
+
self,
|
367
|
+
/,
|
368
|
+
function_call_id: str,
|
369
|
+
client: typing.Optional[modal.client.Client] = None,
|
370
|
+
is_generator: bool = False,
|
359
371
|
) -> FunctionCall[typing.Any]: ...
|
360
372
|
async def aio(
|
361
|
-
self,
|
373
|
+
self,
|
374
|
+
/,
|
375
|
+
function_call_id: str,
|
376
|
+
client: typing.Optional[modal.client.Client] = None,
|
377
|
+
is_generator: bool = False,
|
362
378
|
) -> FunctionCall[typing.Any]: ...
|
363
379
|
|
364
380
|
from_id: __from_id_spec
|
365
381
|
|
366
382
|
class __gather_spec(typing_extensions.Protocol):
|
367
383
|
def __call__(
|
368
|
-
self, *function_calls: FunctionCall[modal._functions.T]
|
384
|
+
self, /, *function_calls: FunctionCall[modal._functions.T]
|
369
385
|
) -> typing.Sequence[modal._functions.T]: ...
|
370
386
|
async def aio(
|
371
|
-
self, *function_calls: FunctionCall[modal._functions.T]
|
387
|
+
self, /, *function_calls: FunctionCall[modal._functions.T]
|
372
388
|
) -> typing.Sequence[modal._functions.T]: ...
|
373
389
|
|
374
390
|
gather: __gather_spec
|
375
391
|
|
376
392
|
class __gather_spec(typing_extensions.Protocol):
|
377
|
-
def __call__(self, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
378
|
-
async def aio(self, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
393
|
+
def __call__(self, /, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
394
|
+
async def aio(self, /, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
379
395
|
|
380
396
|
gather: __gather_spec
|