modal 0.74.57__py3-none-any.whl → 0.74.59__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/_runtime/container_io_manager.pyi +46 -40
- modal/_runtime/execution_context.pyi +2 -2
- modal/_tunnel.pyi +2 -2
- modal/app.pyi +12 -4
- modal/cli/_download.py +17 -7
- 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 +60 -45
- 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 +112 -5
- modal/volume.pyi +88 -30
- {modal-0.74.57.dist-info → modal-0.74.59.dist-info}/METADATA +1 -1
- {modal-0.74.57.dist-info → modal-0.74.59.dist-info}/RECORD +35 -35
- modal_version/_version_generated.py +1 -1
- {modal-0.74.57.dist-info → modal-0.74.59.dist-info}/WHEEL +0 -0
- {modal-0.74.57.dist-info → modal-0.74.59.dist-info}/entry_points.txt +0 -0
- {modal-0.74.57.dist-info → modal-0.74.59.dist-info}/licenses/LICENSE +0 -0
- {modal-0.74.57.dist-info → modal-0.74.59.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
@@ -114,6 +114,7 @@ class Function(
|
|
114
114
|
class __update_autoscaler_spec(typing_extensions.Protocol[SUPERSELF]):
|
115
115
|
def __call__(
|
116
116
|
self,
|
117
|
+
/,
|
117
118
|
*,
|
118
119
|
min_containers: typing.Optional[int] = None,
|
119
120
|
max_containers: typing.Optional[int] = None,
|
@@ -122,6 +123,7 @@ class Function(
|
|
122
123
|
) -> None: ...
|
123
124
|
async def aio(
|
124
125
|
self,
|
126
|
+
/,
|
125
127
|
*,
|
126
128
|
min_containers: typing.Optional[int] = None,
|
127
129
|
max_containers: typing.Optional[int] = None,
|
@@ -132,8 +134,8 @@ class Function(
|
|
132
134
|
update_autoscaler: __update_autoscaler_spec[typing_extensions.Self]
|
133
135
|
|
134
136
|
class __keep_warm_spec(typing_extensions.Protocol[SUPERSELF]):
|
135
|
-
def __call__(self, warm_pool_size: int) -> None: ...
|
136
|
-
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: ...
|
137
139
|
|
138
140
|
keep_warm: __keep_warm_spec[typing_extensions.Self]
|
139
141
|
|
@@ -147,6 +149,7 @@ class Function(
|
|
147
149
|
class __lookup_spec(typing_extensions.Protocol):
|
148
150
|
def __call__(
|
149
151
|
self,
|
152
|
+
/,
|
150
153
|
app_name: str,
|
151
154
|
name: str,
|
152
155
|
namespace=1,
|
@@ -155,6 +158,7 @@ class Function(
|
|
155
158
|
) -> Function: ...
|
156
159
|
async def aio(
|
157
160
|
self,
|
161
|
+
/,
|
158
162
|
app_name: str,
|
159
163
|
name: str,
|
160
164
|
namespace=1,
|
@@ -187,51 +191,51 @@ class Function(
|
|
187
191
|
|
188
192
|
class ___map_spec(typing_extensions.Protocol[SUPERSELF]):
|
189
193
|
def __call__(
|
190
|
-
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
|
191
195
|
) -> typing.Generator[typing.Any, None, None]: ...
|
192
196
|
def aio(
|
193
|
-
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
|
194
198
|
) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
|
195
199
|
|
196
200
|
_map: ___map_spec[typing_extensions.Self]
|
197
201
|
|
198
202
|
class ___call_function_spec(typing_extensions.Protocol[ReturnType_INNER, SUPERSELF]):
|
199
|
-
def __call__(self, args, kwargs) -> ReturnType_INNER: ...
|
200
|
-
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: ...
|
201
205
|
|
202
206
|
_call_function: ___call_function_spec[modal._functions.ReturnType, typing_extensions.Self]
|
203
207
|
|
204
208
|
class ___call_function_nowait_spec(typing_extensions.Protocol[SUPERSELF]):
|
205
209
|
def __call__(
|
206
|
-
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
|
207
211
|
) -> modal._functions._Invocation: ...
|
208
212
|
async def aio(
|
209
|
-
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
|
210
214
|
) -> modal._functions._Invocation: ...
|
211
215
|
|
212
216
|
_call_function_nowait: ___call_function_nowait_spec[typing_extensions.Self]
|
213
217
|
|
214
218
|
class ___call_generator_spec(typing_extensions.Protocol[SUPERSELF]):
|
215
|
-
def __call__(self, args, kwargs): ...
|
216
|
-
def aio(self, args, kwargs): ...
|
219
|
+
def __call__(self, /, args, kwargs): ...
|
220
|
+
def aio(self, /, args, kwargs): ...
|
217
221
|
|
218
222
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
219
223
|
|
220
224
|
class ___call_generator_nowait_spec(typing_extensions.Protocol[SUPERSELF]):
|
221
|
-
def __call__(self, args, kwargs): ...
|
222
|
-
async def aio(self, args, kwargs): ...
|
225
|
+
def __call__(self, /, args, kwargs): ...
|
226
|
+
async def aio(self, /, args, kwargs): ...
|
223
227
|
|
224
228
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
225
229
|
|
226
230
|
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
227
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
228
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
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: ...
|
229
233
|
|
230
234
|
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
231
235
|
|
232
236
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
233
|
-
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
234
|
-
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]: ...
|
235
239
|
|
236
240
|
remote_gen: __remote_gen_spec[typing_extensions.Self]
|
237
241
|
|
@@ -243,45 +247,46 @@ class Function(
|
|
243
247
|
) -> modal._functions.OriginalReturnType: ...
|
244
248
|
|
245
249
|
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
246
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
247
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
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]: ...
|
248
252
|
|
249
253
|
_experimental_spawn: ___experimental_spawn_spec[
|
250
254
|
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
251
255
|
]
|
252
256
|
|
253
257
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
254
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
255
|
-
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: ...
|
256
260
|
|
257
261
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
258
262
|
|
259
263
|
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
260
|
-
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
261
|
-
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
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]: ...
|
262
266
|
|
263
267
|
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
264
268
|
|
265
269
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
266
270
|
|
267
271
|
class __get_current_stats_spec(typing_extensions.Protocol[SUPERSELF]):
|
268
|
-
def __call__(self) -> modal._functions.FunctionStats: ...
|
269
|
-
async def aio(self) -> modal._functions.FunctionStats: ...
|
272
|
+
def __call__(self, /) -> modal._functions.FunctionStats: ...
|
273
|
+
async def aio(self, /) -> modal._functions.FunctionStats: ...
|
270
274
|
|
271
275
|
get_current_stats: __get_current_stats_spec[typing_extensions.Self]
|
272
276
|
|
273
277
|
class ___get_schema_spec(typing_extensions.Protocol[SUPERSELF]):
|
274
|
-
def __call__(self) -> modal_proto.api_pb2.FunctionSchema: ...
|
275
|
-
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: ...
|
276
280
|
|
277
281
|
_get_schema: ___get_schema_spec[typing_extensions.Self]
|
278
282
|
|
279
283
|
class __map_spec(typing_extensions.Protocol[SUPERSELF]):
|
280
284
|
def __call__(
|
281
|
-
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
|
282
286
|
) -> modal._utils.async_utils.AsyncOrSyncIterable: ...
|
283
287
|
def aio(
|
284
288
|
self,
|
289
|
+
/,
|
285
290
|
*input_iterators: typing.Union[typing.Iterable[typing.Any], typing.AsyncIterable[typing.Any]],
|
286
291
|
kwargs={},
|
287
292
|
order_outputs: bool = True,
|
@@ -293,6 +298,7 @@ class Function(
|
|
293
298
|
class __starmap_spec(typing_extensions.Protocol[SUPERSELF]):
|
294
299
|
def __call__(
|
295
300
|
self,
|
301
|
+
/,
|
296
302
|
input_iterator: typing.Iterable[typing.Sequence[typing.Any]],
|
297
303
|
*,
|
298
304
|
kwargs={},
|
@@ -301,6 +307,7 @@ class Function(
|
|
301
307
|
) -> modal._utils.async_utils.AsyncOrSyncIterable: ...
|
302
308
|
def aio(
|
303
309
|
self,
|
310
|
+
/,
|
304
311
|
input_iterator: typing.Union[
|
305
312
|
typing.Iterable[typing.Sequence[typing.Any]], typing.AsyncIterable[typing.Sequence[typing.Any]]
|
306
313
|
],
|
@@ -313,14 +320,14 @@ class Function(
|
|
313
320
|
starmap: __starmap_spec[typing_extensions.Self]
|
314
321
|
|
315
322
|
class __for_each_spec(typing_extensions.Protocol[SUPERSELF]):
|
316
|
-
def __call__(self, *input_iterators, kwargs={}, ignore_exceptions: bool = False): ...
|
317
|
-
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): ...
|
318
325
|
|
319
326
|
for_each: __for_each_spec[typing_extensions.Self]
|
320
327
|
|
321
328
|
class __spawn_map_spec(typing_extensions.Protocol[SUPERSELF]):
|
322
|
-
def __call__(self, *input_iterators, kwargs={}) -> None: ...
|
323
|
-
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: ...
|
324
331
|
|
325
332
|
spawn_map: __spawn_map_spec[typing_extensions.Self]
|
326
333
|
|
@@ -331,51 +338,59 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
|
|
331
338
|
def _invocation(self): ...
|
332
339
|
|
333
340
|
class __get_spec(typing_extensions.Protocol[ReturnType_INNER, SUPERSELF]):
|
334
|
-
def __call__(self, timeout: typing.Optional[float] = None) -> ReturnType_INNER: ...
|
335
|
-
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: ...
|
336
343
|
|
337
344
|
get: __get_spec[modal._functions.ReturnType, typing_extensions.Self]
|
338
345
|
|
339
346
|
class __get_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
340
|
-
def __call__(self) -> typing.Generator[typing.Any, None, None]: ...
|
341
|
-
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]: ...
|
342
349
|
|
343
350
|
get_gen: __get_gen_spec[typing_extensions.Self]
|
344
351
|
|
345
352
|
class __get_call_graph_spec(typing_extensions.Protocol[SUPERSELF]):
|
346
|
-
def __call__(self) -> list[modal.call_graph.InputInfo]: ...
|
347
|
-
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]: ...
|
348
355
|
|
349
356
|
get_call_graph: __get_call_graph_spec[typing_extensions.Self]
|
350
357
|
|
351
358
|
class __cancel_spec(typing_extensions.Protocol[SUPERSELF]):
|
352
|
-
def __call__(self, terminate_containers: bool = False): ...
|
353
|
-
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): ...
|
354
361
|
|
355
362
|
cancel: __cancel_spec[typing_extensions.Self]
|
356
363
|
|
357
364
|
class __from_id_spec(typing_extensions.Protocol):
|
358
365
|
def __call__(
|
359
|
-
self,
|
366
|
+
self,
|
367
|
+
/,
|
368
|
+
function_call_id: str,
|
369
|
+
client: typing.Optional[modal.client.Client] = None,
|
370
|
+
is_generator: bool = False,
|
360
371
|
) -> FunctionCall[typing.Any]: ...
|
361
372
|
async def aio(
|
362
|
-
self,
|
373
|
+
self,
|
374
|
+
/,
|
375
|
+
function_call_id: str,
|
376
|
+
client: typing.Optional[modal.client.Client] = None,
|
377
|
+
is_generator: bool = False,
|
363
378
|
) -> FunctionCall[typing.Any]: ...
|
364
379
|
|
365
380
|
from_id: __from_id_spec
|
366
381
|
|
367
382
|
class __gather_spec(typing_extensions.Protocol):
|
368
383
|
def __call__(
|
369
|
-
self, *function_calls: FunctionCall[modal._functions.T]
|
384
|
+
self, /, *function_calls: FunctionCall[modal._functions.T]
|
370
385
|
) -> typing.Sequence[modal._functions.T]: ...
|
371
386
|
async def aio(
|
372
|
-
self, *function_calls: FunctionCall[modal._functions.T]
|
387
|
+
self, /, *function_calls: FunctionCall[modal._functions.T]
|
373
388
|
) -> typing.Sequence[modal._functions.T]: ...
|
374
389
|
|
375
390
|
gather: __gather_spec
|
376
391
|
|
377
392
|
class __gather_spec(typing_extensions.Protocol):
|
378
|
-
def __call__(self, *function_calls) -> typing.Sequence[modal._functions.T]: ...
|
379
|
-
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]: ...
|
380
395
|
|
381
396
|
gather: __gather_spec
|
modal/image.pyi
CHANGED
@@ -409,8 +409,8 @@ class Image(modal.object.Object):
|
|
409
409
|
) -> Image: ...
|
410
410
|
|
411
411
|
class __from_id_spec(typing_extensions.Protocol):
|
412
|
-
def __call__(self, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
413
|
-
async def aio(self, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
412
|
+
def __call__(self, /, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
413
|
+
async def aio(self, /, image_id: str, client: typing.Optional[modal.client.Client] = None) -> Image: ...
|
414
414
|
|
415
415
|
from_id: __from_id_spec
|
416
416
|
|
@@ -603,8 +603,8 @@ class Image(modal.object.Object):
|
|
603
603
|
def imports(self): ...
|
604
604
|
|
605
605
|
class ___logs_spec(typing_extensions.Protocol[SUPERSELF]):
|
606
|
-
def __call__(self) -> typing.Generator[str, None, None]: ...
|
607
|
-
def aio(self) -> typing.AsyncGenerator[str, None]: ...
|
606
|
+
def __call__(self, /) -> typing.Generator[str, None, None]: ...
|
607
|
+
def aio(self, /) -> typing.AsyncGenerator[str, None]: ...
|
608
608
|
|
609
609
|
_logs: ___logs_spec[typing_extensions.Self]
|
610
610
|
|