modal 0.73.85__py3-none-any.whl → 0.73.87__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/_functions.py +2 -0
- modal/_object.py +2 -0
- modal/_partial_function.py +6 -6
- modal/app.py +2 -2
- modal/client.pyi +2 -2
- modal/functions.pyi +6 -6
- modal/image.py +6 -0
- {modal-0.73.85.dist-info → modal-0.73.87.dist-info}/METADATA +1 -1
- {modal-0.73.85.dist-info → modal-0.73.87.dist-info}/RECORD +14 -14
- modal_version/_version_generated.py +1 -1
- {modal-0.73.85.dist-info → modal-0.73.87.dist-info}/LICENSE +0 -0
- {modal-0.73.85.dist-info → modal-0.73.87.dist-info}/WHEEL +0 -0
- {modal-0.73.85.dist-info → modal-0.73.87.dist-info}/entry_points.txt +0 -0
- {modal-0.73.85.dist-info → modal-0.73.87.dist-info}/top_level.txt +0 -0
modal/_functions.py
CHANGED
@@ -1643,6 +1643,8 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
|
|
1643
1643
|
|
1644
1644
|
result_1, result_2 = modal.FunctionCall.gather(fc1, fc2)
|
1645
1645
|
```
|
1646
|
+
|
1647
|
+
*Added in v0.73.69*: This method replaces the deprecated `modal.functions.gather` function.
|
1646
1648
|
"""
|
1647
1649
|
try:
|
1648
1650
|
return await TaskContext.gather(*[fc.get() for fc in function_calls])
|
modal/_object.py
CHANGED
@@ -255,6 +255,8 @@ class _Object:
|
|
255
255
|
It is rarely necessary to call this method explicitly, as most operations
|
256
256
|
will lazily hydrate when needed. The main use case is when you need to
|
257
257
|
access object metadata, such as its ID.
|
258
|
+
|
259
|
+
*Added in v0.72.39*: This method replaces the deprecated `.resolve()` method.
|
258
260
|
"""
|
259
261
|
if self._is_hydrated:
|
260
262
|
if self.client._snapshotted and not self._is_rehydrated:
|
modal/_partial_function.py
CHANGED
@@ -256,15 +256,15 @@ def _fastapi_endpoint(
|
|
256
256
|
behaves as a [FastAPI](https://fastapi.tiangolo.com/) handler and should
|
257
257
|
return a response object to the caller.
|
258
258
|
|
259
|
-
Endpoints created with `@
|
259
|
+
Endpoints created with `@modal.fastapi_endpoint` are meant to be simple, single
|
260
260
|
request handlers and automatically have
|
261
261
|
[CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) enabled.
|
262
|
-
For more flexibility, use `@
|
262
|
+
For more flexibility, use `@modal.asgi_app`.
|
263
263
|
|
264
264
|
To learn how to use Modal with popular web frameworks, see the
|
265
265
|
[guide on web endpoints](https://modal.com/docs/guide/webhooks).
|
266
266
|
|
267
|
-
This function replaces the deprecated `@web_endpoint` decorator.
|
267
|
+
*Added in v0.73.82*: This function replaces the deprecated `@web_endpoint` decorator.
|
268
268
|
"""
|
269
269
|
if isinstance(_warn_parentheses_missing, str):
|
270
270
|
# Probably passing the method string as a positional argument.
|
@@ -316,10 +316,10 @@ def _web_endpoint(
|
|
316
316
|
behaves as a [FastAPI](https://fastapi.tiangolo.com/) handler and should
|
317
317
|
return a response object to the caller.
|
318
318
|
|
319
|
-
Endpoints created with `@
|
319
|
+
Endpoints created with `@modal.web_endpoint` are meant to be simple, single
|
320
320
|
request handlers and automatically have
|
321
321
|
[CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) enabled.
|
322
|
-
For more flexibility, use `@
|
322
|
+
For more flexibility, use `@modal.asgi_app`.
|
323
323
|
|
324
324
|
To learn how to use Modal with popular web frameworks, see the
|
325
325
|
[guide on web endpoints](https://modal.com/docs/guide/webhooks).
|
@@ -337,7 +337,7 @@ def _web_endpoint(
|
|
337
337
|
raw_f = raw_f.get_raw_f()
|
338
338
|
raise InvalidError(
|
339
339
|
f"Applying decorators for {raw_f} in the wrong order!\nUsage:\n\n"
|
340
|
-
"@app.function()\n@
|
340
|
+
"@app.function()\n@modal.web_endpoint()\ndef my_webhook():\n ..."
|
341
341
|
)
|
342
342
|
|
343
343
|
return _PartialFunction(
|
modal/app.py
CHANGED
@@ -613,7 +613,7 @@ class _App:
|
|
613
613
|
max_inputs: Optional[int] = None,
|
614
614
|
i6pn: Optional[bool] = None, # Whether to enable IPv6 container networking within the region.
|
615
615
|
# Whether the function's home package should be included in the image - defaults to True
|
616
|
-
include_source: Optional[bool] = None,
|
616
|
+
include_source: Optional[bool] = None, # When `False`, don't automatically add the App source to the container.
|
617
617
|
# Parameters below here are experimental. Use with caution!
|
618
618
|
_experimental_scheduler_placement: Optional[
|
619
619
|
SchedulerPlacement
|
@@ -819,7 +819,7 @@ class _App:
|
|
819
819
|
# Limits the number of inputs a container handles before shutting down.
|
820
820
|
# Use `max_inputs = 1` for single-use containers.
|
821
821
|
max_inputs: Optional[int] = None,
|
822
|
-
include_source: Optional[bool] = None,
|
822
|
+
include_source: Optional[bool] = None, # When `False`, don't automatically add the App source to the container.
|
823
823
|
# Parameters below here are experimental. Use with caution!
|
824
824
|
_experimental_scheduler_placement: Optional[
|
825
825
|
SchedulerPlacement
|
modal/client.pyi
CHANGED
@@ -27,7 +27,7 @@ class _Client:
|
|
27
27
|
_snapshotted: bool
|
28
28
|
|
29
29
|
def __init__(
|
30
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.87"
|
31
31
|
): ...
|
32
32
|
def is_closed(self) -> bool: ...
|
33
33
|
@property
|
@@ -85,7 +85,7 @@ class Client:
|
|
85
85
|
_snapshotted: bool
|
86
86
|
|
87
87
|
def __init__(
|
88
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.87"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/functions.pyi
CHANGED
@@ -198,11 +198,11 @@ class Function(
|
|
198
198
|
|
199
199
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
200
200
|
|
201
|
-
class __remote_spec(typing_extensions.Protocol[
|
201
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
202
202
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
203
203
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
204
204
|
|
205
|
-
remote: __remote_spec[modal._functions.
|
205
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
206
206
|
|
207
207
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
208
208
|
def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -217,19 +217,19 @@ class Function(
|
|
217
217
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
218
218
|
) -> modal._functions.OriginalReturnType: ...
|
219
219
|
|
220
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
220
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
221
221
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
222
222
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
223
223
|
|
224
224
|
_experimental_spawn: ___experimental_spawn_spec[
|
225
|
-
modal._functions.
|
225
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
226
226
|
]
|
227
227
|
|
228
|
-
class __spawn_spec(typing_extensions.Protocol[
|
228
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
229
229
|
def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
230
230
|
async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
231
231
|
|
232
|
-
spawn: __spawn_spec[modal._functions.
|
232
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
233
233
|
|
234
234
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
235
235
|
|
modal/image.py
CHANGED
@@ -714,6 +714,8 @@ class _Image(_Object, type_prefix="im"):
|
|
714
714
|
copy=True can slow down iteration since it requires a rebuild of the Image and any subsequent
|
715
715
|
build steps whenever the included files change, but it is required if you want to run additional
|
716
716
|
build steps after this one.
|
717
|
+
|
718
|
+
*Added in v0.66.40*: This method replaces the deprecated `modal.Image.copy_local_file` method.
|
717
719
|
"""
|
718
720
|
if not PurePosixPath(remote_path).is_absolute():
|
719
721
|
# TODO(elias): implement relative to absolute resolution using image workdir metadata
|
@@ -788,6 +790,8 @@ class _Image(_Object, type_prefix="im"):
|
|
788
790
|
ignore=FilePatternMatcher.from_file("/path/to/ignorefile"),
|
789
791
|
)
|
790
792
|
```
|
793
|
+
|
794
|
+
*Added in v0.66.40*: This method replaces the deprecated `modal.Image.copy_local_dir` method.
|
791
795
|
"""
|
792
796
|
if not PurePosixPath(remote_path).is_absolute():
|
793
797
|
# TODO(elias): implement relative to absolute resolution using image workdir metadata
|
@@ -851,6 +855,8 @@ class _Image(_Object, type_prefix="im"):
|
|
851
855
|
ignore=lambda p: p.stat().st_size > 1e9
|
852
856
|
)
|
853
857
|
```
|
858
|
+
|
859
|
+
*Added in v0.67.28*: This method replaces the deprecated `modal.Mount.from_local_python_packages` pattern.
|
854
860
|
"""
|
855
861
|
mount = _Mount._from_local_python_packages(*modules, ignore=ignore)
|
856
862
|
img = self._add_mount_layer_or_copy(mount, copy=copy)
|
@@ -3,12 +3,12 @@ modal/__main__.py,sha256=CgIjP8m1xJjjd4AXc-delmR6LdBCZclw2A_V38CFIio,2870
|
|
3
3
|
modal/_clustered_functions.py,sha256=kTf-9YBXY88NutC1akI-gCbvf01RhMPCw-zoOI_YIUE,2700
|
4
4
|
modal/_clustered_functions.pyi,sha256=vllkegc99A0jrUOWa8mdlSbdp6uz36TsHhGxysAOpaQ,771
|
5
5
|
modal/_container_entrypoint.py,sha256=arhkIoF8nQNfa4iwYGSoqN3QMDg5M38QNAODXC8TlKc,29301
|
6
|
-
modal/_functions.py,sha256=
|
6
|
+
modal/_functions.py,sha256=6gN02fk7LSmEY4OPv1Cpeo0IGmR1WYwMZ842VF4aF1Y,72841
|
7
7
|
modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
8
8
|
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
9
|
-
modal/_object.py,sha256=
|
9
|
+
modal/_object.py,sha256=JBIECWdfpRKCaCxVWZbC3Q1kF5Whk_EKvY9f4Y6AFyg,11446
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
|
-
modal/_partial_function.py,sha256=
|
11
|
+
modal/_partial_function.py,sha256=Ll6Wkt8atWboyQQgACqNS1GUuyJ31x133Up_tZbpRbI,30054
|
12
12
|
modal/_proxy_tunnel.py,sha256=gnKyCfmVB7x2d1A6c-JDysNIP3kEFxmXzhcXhPrzPn0,1906
|
13
13
|
modal/_pty.py,sha256=JZfPDDpzqICZqtyPI_oMJf_9w-p_lLNuzHhwhodUXio,1329
|
14
14
|
modal/_resolver.py,sha256=RtoXoYzSllPlFu0D1vel_FWiEmDO7RyToiC2bxeN8ZY,6917
|
@@ -18,11 +18,11 @@ modal/_traceback.py,sha256=IZQzB3fVlUfMHOSyKUgw0H6qv4yHnpyq-XVCNZKfUdA,5023
|
|
18
18
|
modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
|
19
19
|
modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
|
20
20
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
21
|
-
modal/app.py,sha256=
|
21
|
+
modal/app.py,sha256=ojhuLZuNZAQ1OsbDH0k6G4pm1W7bOIvZfXbaKlvQ-Ao,45622
|
22
22
|
modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=RthBnz-USniOAiz87eWrTmiPhtSbCSMeFQAHOVyGRIU,7593
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
28
28
|
modal/cls.py,sha256=5DjpSBP1IyROKZm5ItDiEGdbRnfTT6K1Ul0jEvEKw_Q,31695
|
@@ -41,9 +41,9 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
41
41
|
modal/file_io.pyi,sha256=NTRft1tbPSWf9TlWVeZmTlgB5AZ_Zhu2srWIrWr7brk,9445
|
42
42
|
modal/file_pattern_matcher.py,sha256=trosX-Bp7dOubudN1bLLhRAoidWy1TcoaR4Pv8CedWw,6497
|
43
43
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
44
|
-
modal/functions.pyi,sha256=
|
44
|
+
modal/functions.pyi,sha256=ujc6eIYyNmMn__4dpxEy85-vZmAniZv56D2A4uBgs6U,14377
|
45
45
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
46
|
-
modal/image.py,sha256=
|
46
|
+
modal/image.py,sha256=O51ZH3p8hPUzOUBdcsQP_Bh0dUgqLiK_yzZInmdnwrs,90580
|
47
47
|
modal/image.pyi,sha256=L7aZUOElSGtNHmFHz1RgKP1cG5paiXt_EzylrwBwzVk,25004
|
48
48
|
modal/io_streams.py,sha256=QkQiizKRzd5bnbKQsap31LJgBYlAnj4-XkV_50xPYX0,15079
|
49
49
|
modal/io_streams.pyi,sha256=bJ7ZLmSmJ0nKoa6r4FJpbqvzdUVa0lEe0Fa-MMpMezU,5071
|
@@ -168,10 +168,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
168
168
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
169
169
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
170
170
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
171
|
-
modal_version/_version_generated.py,sha256=
|
172
|
-
modal-0.73.
|
173
|
-
modal-0.73.
|
174
|
-
modal-0.73.
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
171
|
+
modal_version/_version_generated.py,sha256=tnZ7OrSamKKaKMDtwznZNZN2T9WZzN1S6VulZZIX6m4,149
|
172
|
+
modal-0.73.87.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
173
|
+
modal-0.73.87.dist-info/METADATA,sha256=Mf3mBgIQlVi7sRwKC8_fB--Nal8fuOb4zTsvQrU7HJ8,2452
|
174
|
+
modal-0.73.87.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
175
|
+
modal-0.73.87.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
176
|
+
modal-0.73.87.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
177
|
+
modal-0.73.87.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|