modal 0.73.27__py3-none-any.whl → 0.73.29__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/__main__.py +1 -1
- modal/_container_entrypoint.py +4 -4
- modal/_functions.py +6 -5
- modal/_partial_function.py +691 -0
- modal/_resolver.py +1 -2
- modal/_runtime/container_io_manager.py +1 -1
- modal/_runtime/user_code_imports.py +3 -4
- modal/_utils/async_utils.py +3 -6
- modal/_utils/blob_utils.py +1 -1
- modal/_utils/function_utils.py +1 -2
- modal/app.py +12 -14
- modal/cli/entry_point.py +1 -1
- modal/cli/run.py +2 -3
- modal/cli/secret.py +1 -1
- modal/cli/volume.py +1 -2
- modal/client.pyi +2 -2
- modal/cls.py +7 -8
- modal/cls.pyi +2 -1
- modal/environments.py +1 -3
- modal/experimental.py +1 -1
- modal/file_pattern_matcher.py +1 -2
- modal/mount.py +4 -8
- modal/output.py +1 -0
- modal/partial_function.py +26 -696
- modal/partial_function.pyi +19 -157
- modal/sandbox.py +4 -8
- modal/token_flow.py +1 -1
- {modal-0.73.27.dist-info → modal-0.73.29.dist-info}/METADATA +1 -1
- {modal-0.73.27.dist-info → modal-0.73.29.dist-info}/RECORD +35 -34
- modal_docs/mdmd/mdmd.py +1 -0
- modal_version/_version_generated.py +1 -1
- {modal-0.73.27.dist-info → modal-0.73.29.dist-info}/LICENSE +0 -0
- {modal-0.73.27.dist-info → modal-0.73.29.dist-info}/WHEEL +0 -0
- {modal-0.73.27.dist-info → modal-0.73.29.dist-info}/entry_points.txt +0 -0
- {modal-0.73.27.dist-info → modal-0.73.29.dist-info}/top_level.txt +0 -0
modal/__main__.py
CHANGED
@@ -66,7 +66,7 @@ def main():
|
|
66
66
|
title = "Error"
|
67
67
|
content = str(exc)
|
68
68
|
if notes := getattr(exc, "__notes__", []):
|
69
|
-
content = f"{content}\n\nNote: {' '
|
69
|
+
content = f"{content}\n\nNote: {' '.join(notes)}"
|
70
70
|
|
71
71
|
console = Console(stderr=True)
|
72
72
|
panel = Panel(Text(content), title=title, title_align="left", border_style="red")
|
modal/_container_entrypoint.py
CHANGED
@@ -24,6 +24,10 @@ from typing import TYPE_CHECKING, Any, Callable, Optional
|
|
24
24
|
from google.protobuf.message import Message
|
25
25
|
|
26
26
|
from modal._clustered_functions import initialize_clustered_function
|
27
|
+
from modal._partial_function import (
|
28
|
+
_find_callables_for_obj,
|
29
|
+
_PartialFunctionFlags,
|
30
|
+
)
|
27
31
|
from modal._proxy_tunnel import proxy_tunnel
|
28
32
|
from modal._serialization import deserialize_params
|
29
33
|
from modal._utils.async_utils import TaskContext, synchronizer
|
@@ -34,10 +38,6 @@ from modal.app import App, _App
|
|
34
38
|
from modal.client import Client, _Client
|
35
39
|
from modal.config import logger
|
36
40
|
from modal.exception import ExecutionError, InputCancellation, InvalidError
|
37
|
-
from modal.partial_function import (
|
38
|
-
_find_callables_for_obj,
|
39
|
-
_PartialFunctionFlags,
|
40
|
-
)
|
41
41
|
from modal.running_app import RunningApp, running_app_from_layout
|
42
42
|
from modal_proto import api_pb2
|
43
43
|
|
modal/_functions.py
CHANGED
@@ -86,6 +86,7 @@ from .secret import _Secret
|
|
86
86
|
from .volume import _Volume
|
87
87
|
|
88
88
|
if TYPE_CHECKING:
|
89
|
+
import modal._partial_function
|
89
90
|
import modal.app
|
90
91
|
import modal.cls
|
91
92
|
import modal.partial_function
|
@@ -397,15 +398,15 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
397
398
|
_use_method_name: str = ""
|
398
399
|
|
399
400
|
_class_parameter_info: Optional["api_pb2.ClassParameterInfo"] = None
|
400
|
-
_method_handle_metadata: Optional[
|
401
|
-
|
402
|
-
|
401
|
+
_method_handle_metadata: Optional[dict[str, "api_pb2.FunctionHandleMetadata"]] = (
|
402
|
+
None # set for 0.67+ class service functions
|
403
|
+
)
|
403
404
|
|
404
405
|
def _bind_method(
|
405
406
|
self,
|
406
407
|
user_cls,
|
407
408
|
method_name: str,
|
408
|
-
partial_function: "modal.
|
409
|
+
partial_function: "modal._partial_function._PartialFunction",
|
409
410
|
):
|
410
411
|
"""mdmd:hidden
|
411
412
|
|
@@ -480,7 +481,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
480
481
|
) -> "_Function":
|
481
482
|
"""mdmd:hidden"""
|
482
483
|
# Needed to avoid circular imports
|
483
|
-
from .
|
484
|
+
from ._partial_function import _find_partial_methods_for_user_cls, _PartialFunctionFlags
|
484
485
|
|
485
486
|
tag = info.get_tag()
|
486
487
|
|