modal 0.67.0__py3-none-any.whl → 0.67.22__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.py +2 -2
- modal/_clustered_functions.pyi +2 -2
- modal/_container_entrypoint.py +5 -4
- modal/_output.py +29 -28
- modal/_pty.py +2 -2
- modal/_resolver.py +6 -5
- modal/_resources.py +3 -3
- modal/_runtime/asgi.py +46 -6
- modal/_runtime/container_io_manager.py +22 -26
- modal/_runtime/execution_context.py +2 -2
- modal/_runtime/telemetry.py +1 -2
- modal/_runtime/user_code_imports.py +12 -14
- modal/_serialization.py +3 -7
- modal/_traceback.py +5 -5
- modal/_tunnel.py +5 -4
- modal/_tunnel.pyi +2 -2
- modal/_utils/async_utils.py +53 -17
- modal/_utils/blob_utils.py +22 -7
- modal/_utils/function_utils.py +14 -10
- modal/_utils/grpc_testing.py +7 -6
- modal/_utils/grpc_utils.py +2 -3
- modal/_utils/hash_utils.py +2 -2
- modal/_utils/mount_utils.py +5 -4
- modal/_utils/package_utils.py +2 -3
- modal/_utils/pattern_matcher.py +6 -6
- modal/_utils/rand_pb_testing.py +3 -3
- modal/_utils/shell_utils.py +2 -1
- modal/_vendor/a2wsgi_wsgi.py +62 -72
- modal/_vendor/cloudpickle.py +1 -1
- modal/_watcher.py +8 -7
- modal/app.py +81 -69
- modal/app.pyi +104 -99
- modal/call_graph.py +6 -6
- modal/cli/_download.py +3 -2
- modal/cli/_traceback.py +4 -4
- modal/cli/app.py +4 -4
- modal/cli/container.py +4 -4
- modal/cli/dict.py +1 -1
- modal/cli/environment.py +2 -3
- modal/cli/import_refs.py +1 -1
- modal/cli/launch.py +2 -2
- modal/cli/network_file_system.py +1 -1
- modal/cli/profile.py +1 -1
- modal/cli/programs/run_jupyter.py +2 -2
- modal/cli/programs/vscode.py +3 -3
- modal/cli/queues.py +1 -1
- modal/cli/run.py +6 -6
- modal/cli/secret.py +3 -3
- modal/cli/utils.py +2 -1
- modal/cli/volume.py +3 -3
- modal/client.py +6 -11
- modal/client.pyi +18 -27
- modal/cloud_bucket_mount.py +3 -3
- modal/cloud_bucket_mount.pyi +2 -2
- modal/cls.py +32 -32
- modal/cls.pyi +35 -34
- modal/config.py +3 -2
- modal/container_process.py +6 -2
- modal/dict.py +6 -3
- modal/dict.pyi +10 -9
- modal/environments.py +3 -3
- modal/environments.pyi +3 -3
- modal/exception.py +2 -3
- modal/functions.py +111 -40
- modal/functions.pyi +71 -48
- modal/image.py +46 -49
- modal/image.pyi +102 -101
- modal/io_streams.py +20 -12
- modal/io_streams.pyi +24 -14
- modal/mount.py +24 -24
- modal/mount.pyi +28 -29
- modal/network_file_system.py +14 -11
- modal/network_file_system.pyi +12 -11
- modal/object.py +9 -8
- modal/object.pyi +47 -34
- modal/output.py +2 -1
- modal/parallel_map.py +4 -4
- modal/partial_function.py +10 -14
- modal/partial_function.pyi +17 -18
- modal/queue.py +11 -8
- modal/queue.pyi +23 -22
- modal/retries.py +38 -0
- modal/runner.py +8 -7
- modal/runner.pyi +8 -14
- modal/running_app.py +3 -3
- modal/sandbox.py +20 -13
- modal/sandbox.pyi +73 -72
- modal/scheduler_placement.py +2 -1
- modal/secret.py +7 -7
- modal/secret.pyi +12 -12
- modal/serving.py +4 -3
- modal/serving.pyi +5 -4
- modal/token_flow.py +3 -2
- modal/token_flow.pyi +3 -3
- modal/volume.py +16 -23
- modal/volume.pyi +17 -16
- {modal-0.67.0.dist-info → modal-0.67.22.dist-info}/METADATA +2 -2
- modal-0.67.22.dist-info/RECORD +168 -0
- modal_docs/mdmd/signatures.py +1 -2
- modal_global_objects/mounts/python_standalone.py +1 -1
- modal_proto/api.proto +13 -0
- modal_proto/api_grpc.py +16 -0
- modal_proto/api_pb2.py +241 -221
- modal_proto/api_pb2.pyi +41 -0
- modal_proto/api_pb2_grpc.py +33 -0
- modal_proto/api_pb2_grpc.pyi +10 -0
- modal_proto/modal_api_grpc.py +1 -0
- modal_version/_version_generated.py +1 -1
- modal-0.67.0.dist-info/RECORD +0 -168
- {modal-0.67.0.dist-info → modal-0.67.22.dist-info}/LICENSE +0 -0
- {modal-0.67.0.dist-info → modal-0.67.22.dist-info}/WHEEL +0 -0
- {modal-0.67.0.dist-info → modal-0.67.22.dist-info}/entry_points.txt +0 -0
- {modal-0.67.0.dist-info → modal-0.67.22.dist-info}/top_level.txt +0 -0
modal_docs/mdmd/signatures.py
CHANGED
@@ -4,12 +4,11 @@ import inspect
|
|
4
4
|
import re
|
5
5
|
import textwrap
|
6
6
|
import warnings
|
7
|
-
from typing import Tuple
|
8
7
|
|
9
8
|
from synchronicity.synchronizer import FunctionWithAio
|
10
9
|
|
11
10
|
|
12
|
-
def _signature_from_ast(func) ->
|
11
|
+
def _signature_from_ast(func) -> tuple[str, str]:
|
13
12
|
"""Get function signature, including decorators and comments, from source code
|
14
13
|
|
15
14
|
Traverses functools.wraps-wrappings to get source of underlying function.
|
@@ -17,7 +17,7 @@ def publish_python_standalone_mount(client, version: str) -> None:
|
|
17
17
|
release, full_version = PYTHON_STANDALONE_VERSIONS[version]
|
18
18
|
|
19
19
|
libc = "gnu"
|
20
|
-
arch = "
|
20
|
+
arch = "x86_64_v3"
|
21
21
|
url = (
|
22
22
|
"https://github.com/indygreg/python-build-standalone/releases/download"
|
23
23
|
+ f"/{release}/cpython-{full_version}+{release}-{arch}-unknown-linux-gnu-install_only.tar.gz"
|
modal_proto/api.proto
CHANGED
@@ -2146,6 +2146,18 @@ message SandboxListResponse {
|
|
2146
2146
|
repeated SandboxInfo sandboxes = 1;
|
2147
2147
|
}
|
2148
2148
|
|
2149
|
+
message SandboxSnapshotFsRequest {
|
2150
|
+
string sandbox_id = 1;
|
2151
|
+
float timeout = 2;
|
2152
|
+
}
|
2153
|
+
|
2154
|
+
message SandboxSnapshotFsResponse {
|
2155
|
+
string image_id = 1;
|
2156
|
+
GenericResult result = 2;
|
2157
|
+
// Metadata may be empty since we may skip it for performance reasons.
|
2158
|
+
ImageMetadata image_metadata = 3;
|
2159
|
+
}
|
2160
|
+
|
2149
2161
|
message SandboxStdinWriteRequest {
|
2150
2162
|
string sandbox_id = 1;
|
2151
2163
|
bytes input = 2;
|
@@ -2745,6 +2757,7 @@ service ModalClient {
|
|
2745
2757
|
rpc SandboxGetTaskId(SandboxGetTaskIdRequest) returns (SandboxGetTaskIdResponse); // needed for modal container exec
|
2746
2758
|
rpc SandboxGetTunnels(SandboxGetTunnelsRequest) returns (SandboxGetTunnelsResponse);
|
2747
2759
|
rpc SandboxList(SandboxListRequest) returns (SandboxListResponse);
|
2760
|
+
rpc SandboxSnapshotFs(SandboxSnapshotFsRequest) returns (SandboxSnapshotFsResponse);
|
2748
2761
|
rpc SandboxStdinWrite(SandboxStdinWriteRequest) returns (SandboxStdinWriteResponse);
|
2749
2762
|
rpc SandboxTagsSet(SandboxTagsSetRequest) returns (google.protobuf.Empty);
|
2750
2763
|
rpc SandboxTerminate(SandboxTerminateRequest) returns (SandboxTerminateResponse);
|
modal_proto/api_grpc.py
CHANGED
@@ -389,6 +389,10 @@ class ModalClientBase(abc.ABC):
|
|
389
389
|
async def SandboxList(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxListRequest, modal_proto.api_pb2.SandboxListResponse]') -> None:
|
390
390
|
pass
|
391
391
|
|
392
|
+
@abc.abstractmethod
|
393
|
+
async def SandboxSnapshotFs(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxSnapshotFsRequest, modal_proto.api_pb2.SandboxSnapshotFsResponse]') -> None:
|
394
|
+
pass
|
395
|
+
|
392
396
|
@abc.abstractmethod
|
393
397
|
async def SandboxStdinWrite(self, stream: 'grpclib.server.Stream[modal_proto.api_pb2.SandboxStdinWriteRequest, modal_proto.api_pb2.SandboxStdinWriteResponse]') -> None:
|
394
398
|
pass
|
@@ -1093,6 +1097,12 @@ class ModalClientBase(abc.ABC):
|
|
1093
1097
|
modal_proto.api_pb2.SandboxListRequest,
|
1094
1098
|
modal_proto.api_pb2.SandboxListResponse,
|
1095
1099
|
),
|
1100
|
+
'/modal.client.ModalClient/SandboxSnapshotFs': grpclib.const.Handler(
|
1101
|
+
self.SandboxSnapshotFs,
|
1102
|
+
grpclib.const.Cardinality.UNARY_UNARY,
|
1103
|
+
modal_proto.api_pb2.SandboxSnapshotFsRequest,
|
1104
|
+
modal_proto.api_pb2.SandboxSnapshotFsResponse,
|
1105
|
+
),
|
1096
1106
|
'/modal.client.ModalClient/SandboxStdinWrite': grpclib.const.Handler(
|
1097
1107
|
self.SandboxStdinWrite,
|
1098
1108
|
grpclib.const.Cardinality.UNARY_UNARY,
|
@@ -1873,6 +1883,12 @@ class ModalClientStub:
|
|
1873
1883
|
modal_proto.api_pb2.SandboxListRequest,
|
1874
1884
|
modal_proto.api_pb2.SandboxListResponse,
|
1875
1885
|
)
|
1886
|
+
self.SandboxSnapshotFs = grpclib.client.UnaryUnaryMethod(
|
1887
|
+
channel,
|
1888
|
+
'/modal.client.ModalClient/SandboxSnapshotFs',
|
1889
|
+
modal_proto.api_pb2.SandboxSnapshotFsRequest,
|
1890
|
+
modal_proto.api_pb2.SandboxSnapshotFsResponse,
|
1891
|
+
)
|
1876
1892
|
self.SandboxStdinWrite = grpclib.client.UnaryUnaryMethod(
|
1877
1893
|
channel,
|
1878
1894
|
'/modal.client.ModalClient/SandboxStdinWrite',
|