modal 1.0.0.dev3__py3-none-any.whl → 1.0.0.dev5__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/_object.py +0 -14
- modal/app.py +0 -38
- modal/app.pyi +0 -80
- modal/client.pyi +2 -2
- modal/container_process.py +1 -9
- modal/container_process.pyi +3 -3
- modal/functions.pyi +6 -6
- modal/image.py +5 -2
- modal/object.pyi +0 -6
- modal/runner.py +0 -18
- modal/runner.pyi +0 -5
- modal/sandbox.py +0 -20
- modal/sandbox.pyi +0 -2
- modal/serving.py +0 -6
- modal/serving.pyi +0 -3
- modal/volume.py +6 -13
- {modal-1.0.0.dev3.dist-info → modal-1.0.0.dev5.dist-info}/METADATA +1 -1
- {modal-1.0.0.dev3.dist-info → modal-1.0.0.dev5.dist-info}/RECORD +23 -23
- modal_version/__init__.py +1 -1
- {modal-1.0.0.dev3.dist-info → modal-1.0.0.dev5.dist-info}/WHEEL +0 -0
- {modal-1.0.0.dev3.dist-info → modal-1.0.0.dev5.dist-info}/entry_points.txt +0 -0
- {modal-1.0.0.dev3.dist-info → modal-1.0.0.dev5.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.0.dev3.dist-info → modal-1.0.0.dev5.dist-info}/top_level.txt +0 -0
modal/_object.py
CHANGED
@@ -10,7 +10,6 @@ from typing_extensions import Self
|
|
10
10
|
|
11
11
|
from ._resolver import Resolver
|
12
12
|
from ._utils.async_utils import aclosing
|
13
|
-
from ._utils.deprecation import deprecation_warning
|
14
13
|
from .client import _Client
|
15
14
|
from .config import config, logger
|
16
15
|
from .exception import ExecutionError, InvalidError
|
@@ -237,19 +236,6 @@ class _Object:
|
|
237
236
|
|
238
237
|
return self._deps if self._deps is not None else default_deps
|
239
238
|
|
240
|
-
async def resolve(self, client: Optional[_Client] = None):
|
241
|
-
"""mdmd:hidden"""
|
242
|
-
obj = self.__class__.__name__.strip("_")
|
243
|
-
deprecation_warning(
|
244
|
-
(2025, 1, 16),
|
245
|
-
f"The `{obj}.resolve` method is deprecated and will be removed in a future release."
|
246
|
-
f" Please use `{obj}.hydrate()` or `await {obj}.hydrate.aio()` instead."
|
247
|
-
"\n\nNote that it is rarely necessary to explicitly hydrate objects, as most methods"
|
248
|
-
" will lazily hydrate when needed.",
|
249
|
-
show_source=False, # synchronicity interferes with attributing source correctly
|
250
|
-
)
|
251
|
-
await self.hydrate(client)
|
252
|
-
|
253
239
|
async def hydrate(self, client: Optional[_Client] = None) -> Self:
|
254
240
|
"""Synchronize the local object with its identity on the Modal server.
|
255
241
|
|
modal/app.py
CHANGED
@@ -1037,44 +1037,6 @@ class _App:
|
|
1037
1037
|
|
1038
1038
|
return wrapper
|
1039
1039
|
|
1040
|
-
async def spawn_sandbox(
|
1041
|
-
self,
|
1042
|
-
*entrypoint_args: str,
|
1043
|
-
image: Optional[_Image] = None, # The image to run as the container for the sandbox.
|
1044
|
-
mounts: Sequence[_Mount] = (), # Mounts to attach to the sandbox.
|
1045
|
-
secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
|
1046
|
-
network_file_systems: dict[Union[str, PurePosixPath], _NetworkFileSystem] = {},
|
1047
|
-
timeout: Optional[int] = None, # Maximum execution time of the sandbox in seconds.
|
1048
|
-
workdir: Optional[str] = None, # Working directory of the sandbox.
|
1049
|
-
gpu: GPU_T = None,
|
1050
|
-
cloud: Optional[str] = None,
|
1051
|
-
region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the sandbox on.
|
1052
|
-
# Specify, in fractional CPU cores, how many CPU cores to request.
|
1053
|
-
# Or, pass (request, limit) to additionally specify a hard limit in fractional CPU cores.
|
1054
|
-
# CPU throttling will prevent a container from exceeding its specified limit.
|
1055
|
-
cpu: Optional[Union[float, tuple[float, float]]] = None,
|
1056
|
-
# Specify, in MiB, a memory request which is the minimum memory required.
|
1057
|
-
# Or, pass (request, limit) to additionally specify a hard limit in MiB.
|
1058
|
-
memory: Optional[Union[int, tuple[int, int]]] = None,
|
1059
|
-
block_network: bool = False, # Whether to block network access
|
1060
|
-
volumes: dict[
|
1061
|
-
Union[str, PurePosixPath], Union[_Volume, _CloudBucketMount]
|
1062
|
-
] = {}, # Mount points for Modal Volumes and CloudBucketMounts
|
1063
|
-
pty_info: Optional[api_pb2.PTYInfo] = None,
|
1064
|
-
_experimental_scheduler_placement: Optional[
|
1065
|
-
SchedulerPlacement
|
1066
|
-
] = None, # Experimental controls over fine-grained scheduling (alpha).
|
1067
|
-
) -> None:
|
1068
|
-
"""mdmd:hidden"""
|
1069
|
-
arglist = ", ".join(repr(s) for s in entrypoint_args)
|
1070
|
-
message = (
|
1071
|
-
"`App.spawn_sandbox` is deprecated.\n\n"
|
1072
|
-
"Sandboxes can be created using the `Sandbox` object:\n\n"
|
1073
|
-
f"```\nsb = Sandbox.create({arglist}, app=app)\n```\n\n"
|
1074
|
-
"See https://modal.com/docs/guide/sandbox for more info on working with sandboxes."
|
1075
|
-
)
|
1076
|
-
deprecation_error((2024, 7, 5), message)
|
1077
|
-
|
1078
1040
|
def include(self, /, other_app: "_App") -> typing_extensions.Self:
|
1079
1041
|
"""Include another App's objects in this one.
|
1080
1042
|
|
modal/app.pyi
CHANGED
@@ -20,7 +20,6 @@ import modal.schedule
|
|
20
20
|
import modal.scheduler_placement
|
21
21
|
import modal.secret
|
22
22
|
import modal.volume
|
23
|
-
import modal_proto.api_pb2
|
24
23
|
import pathlib
|
25
24
|
import synchronicity.combined_types
|
26
25
|
import typing
|
@@ -263,30 +262,6 @@ class _App:
|
|
263
262
|
_experimental_buffer_containers: typing.Optional[int] = None,
|
264
263
|
allow_cross_region_volumes: typing.Optional[bool] = None,
|
265
264
|
) -> collections.abc.Callable[[typing.Union[CLS_T, modal._partial_function._PartialFunction]], CLS_T]: ...
|
266
|
-
async def spawn_sandbox(
|
267
|
-
self,
|
268
|
-
*entrypoint_args: str,
|
269
|
-
image: typing.Optional[modal.image._Image] = None,
|
270
|
-
mounts: collections.abc.Sequence[modal.mount._Mount] = (),
|
271
|
-
secrets: collections.abc.Sequence[modal.secret._Secret] = (),
|
272
|
-
network_file_systems: dict[
|
273
|
-
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
|
274
|
-
] = {},
|
275
|
-
timeout: typing.Optional[int] = None,
|
276
|
-
workdir: typing.Optional[str] = None,
|
277
|
-
gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
|
278
|
-
cloud: typing.Optional[str] = None,
|
279
|
-
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
280
|
-
cpu: typing.Union[float, tuple[float, float], None] = None,
|
281
|
-
memory: typing.Union[int, tuple[int, int], None] = None,
|
282
|
-
block_network: bool = False,
|
283
|
-
volumes: dict[
|
284
|
-
typing.Union[str, pathlib.PurePosixPath],
|
285
|
-
typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
|
286
|
-
] = {},
|
287
|
-
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
288
|
-
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
289
|
-
) -> None: ...
|
290
265
|
def include(self, /, other_app: _App) -> typing_extensions.Self: ...
|
291
266
|
def _logs(
|
292
267
|
self, client: typing.Optional[modal.client._Client] = None
|
@@ -537,61 +512,6 @@ class App:
|
|
537
512
|
_experimental_buffer_containers: typing.Optional[int] = None,
|
538
513
|
allow_cross_region_volumes: typing.Optional[bool] = None,
|
539
514
|
) -> collections.abc.Callable[[typing.Union[CLS_T, modal.partial_function.PartialFunction]], CLS_T]: ...
|
540
|
-
|
541
|
-
class __spawn_sandbox_spec(typing_extensions.Protocol[SUPERSELF]):
|
542
|
-
def __call__(
|
543
|
-
self,
|
544
|
-
/,
|
545
|
-
*entrypoint_args: str,
|
546
|
-
image: typing.Optional[modal.image.Image] = None,
|
547
|
-
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
548
|
-
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
549
|
-
network_file_systems: dict[
|
550
|
-
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
551
|
-
] = {},
|
552
|
-
timeout: typing.Optional[int] = None,
|
553
|
-
workdir: typing.Optional[str] = None,
|
554
|
-
gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
|
555
|
-
cloud: typing.Optional[str] = None,
|
556
|
-
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
557
|
-
cpu: typing.Union[float, tuple[float, float], None] = None,
|
558
|
-
memory: typing.Union[int, tuple[int, int], None] = None,
|
559
|
-
block_network: bool = False,
|
560
|
-
volumes: dict[
|
561
|
-
typing.Union[str, pathlib.PurePosixPath],
|
562
|
-
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
563
|
-
] = {},
|
564
|
-
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
565
|
-
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
566
|
-
) -> None: ...
|
567
|
-
async def aio(
|
568
|
-
self,
|
569
|
-
/,
|
570
|
-
*entrypoint_args: str,
|
571
|
-
image: typing.Optional[modal.image.Image] = None,
|
572
|
-
mounts: collections.abc.Sequence[modal.mount.Mount] = (),
|
573
|
-
secrets: collections.abc.Sequence[modal.secret.Secret] = (),
|
574
|
-
network_file_systems: dict[
|
575
|
-
typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
|
576
|
-
] = {},
|
577
|
-
timeout: typing.Optional[int] = None,
|
578
|
-
workdir: typing.Optional[str] = None,
|
579
|
-
gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
|
580
|
-
cloud: typing.Optional[str] = None,
|
581
|
-
region: typing.Union[str, collections.abc.Sequence[str], None] = None,
|
582
|
-
cpu: typing.Union[float, tuple[float, float], None] = None,
|
583
|
-
memory: typing.Union[int, tuple[int, int], None] = None,
|
584
|
-
block_network: bool = False,
|
585
|
-
volumes: dict[
|
586
|
-
typing.Union[str, pathlib.PurePosixPath],
|
587
|
-
typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
|
588
|
-
] = {},
|
589
|
-
pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
|
590
|
-
_experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
|
591
|
-
) -> None: ...
|
592
|
-
|
593
|
-
spawn_sandbox: __spawn_sandbox_spec[typing_extensions.Self]
|
594
|
-
|
595
515
|
def include(self, /, other_app: App) -> typing_extensions.Self: ...
|
596
516
|
|
597
517
|
class ___logs_spec(typing_extensions.Protocol[SUPERSELF]):
|
modal/client.pyi
CHANGED
@@ -31,7 +31,7 @@ class _Client:
|
|
31
31
|
server_url: str,
|
32
32
|
client_type: int,
|
33
33
|
credentials: typing.Optional[tuple[str, str]],
|
34
|
-
version: str = "1.0.0.
|
34
|
+
version: str = "1.0.0.dev5",
|
35
35
|
): ...
|
36
36
|
def is_closed(self) -> bool: ...
|
37
37
|
@property
|
@@ -94,7 +94,7 @@ class Client:
|
|
94
94
|
server_url: str,
|
95
95
|
client_type: int,
|
96
96
|
credentials: typing.Optional[tuple[str, str]],
|
97
|
-
version: str = "1.0.0.
|
97
|
+
version: str = "1.0.0.dev5",
|
98
98
|
): ...
|
99
99
|
def is_closed(self) -> bool: ...
|
100
100
|
@property
|
modal/container_process.py
CHANGED
@@ -6,7 +6,6 @@ from typing import Generic, Optional, TypeVar
|
|
6
6
|
from modal_proto import api_pb2
|
7
7
|
|
8
8
|
from ._utils.async_utils import TaskContext, synchronize_api
|
9
|
-
from ._utils.deprecation import deprecation_error
|
10
9
|
from ._utils.grpc_utils import retry_transient_errors
|
11
10
|
from ._utils.shell_utils import stream_from_stdin, write_to_fd
|
12
11
|
from .client import _Client
|
@@ -118,18 +117,11 @@ class _ContainerProcess(Generic[T]):
|
|
118
117
|
self._returncode = resp.exit_code
|
119
118
|
return self._returncode
|
120
119
|
|
121
|
-
async def attach(self
|
120
|
+
async def attach(self):
|
122
121
|
if platform.system() == "Windows":
|
123
122
|
print("interactive exec is not currently supported on Windows.")
|
124
123
|
return
|
125
124
|
|
126
|
-
if pty is not None:
|
127
|
-
deprecation_error(
|
128
|
-
(2024, 12, 9),
|
129
|
-
"The `pty` argument to `modal.container_process.attach(pty=...)` is deprecated, "
|
130
|
-
"as only PTY mode is supported. Please remove the argument.",
|
131
|
-
)
|
132
|
-
|
133
125
|
from rich.console import Console
|
134
126
|
|
135
127
|
console = Console()
|
modal/container_process.pyi
CHANGED
@@ -35,7 +35,7 @@ class _ContainerProcess(typing.Generic[T]):
|
|
35
35
|
def returncode(self) -> int: ...
|
36
36
|
async def poll(self) -> typing.Optional[int]: ...
|
37
37
|
async def wait(self) -> int: ...
|
38
|
-
async def attach(self
|
38
|
+
async def attach(self): ...
|
39
39
|
|
40
40
|
SUPERSELF = typing.TypeVar("SUPERSELF", covariant=True)
|
41
41
|
|
@@ -80,7 +80,7 @@ class ContainerProcess(typing.Generic[T]):
|
|
80
80
|
wait: __wait_spec[typing_extensions.Self]
|
81
81
|
|
82
82
|
class __attach_spec(typing_extensions.Protocol[SUPERSELF]):
|
83
|
-
def __call__(self,
|
84
|
-
async def aio(self,
|
83
|
+
def __call__(self, /): ...
|
84
|
+
async def aio(self, /): ...
|
85
85
|
|
86
86
|
attach: __attach_spec[typing_extensions.Self]
|
modal/functions.pyi
CHANGED
@@ -234,11 +234,11 @@ class Function(
|
|
234
234
|
|
235
235
|
_call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
|
236
236
|
|
237
|
-
class __remote_spec(typing_extensions.Protocol[
|
237
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
238
238
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
239
239
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
|
240
240
|
|
241
|
-
remote: __remote_spec[modal._functions.
|
241
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
242
242
|
|
243
243
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
244
244
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
|
@@ -253,12 +253,12 @@ class Function(
|
|
253
253
|
self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
|
254
254
|
) -> modal._functions.OriginalReturnType: ...
|
255
255
|
|
256
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
256
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
257
257
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
258
258
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
259
259
|
|
260
260
|
_experimental_spawn: ___experimental_spawn_spec[
|
261
|
-
modal._functions.
|
261
|
+
modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
|
262
262
|
]
|
263
263
|
|
264
264
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
@@ -267,11 +267,11 @@ class Function(
|
|
267
267
|
|
268
268
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
269
269
|
|
270
|
-
class __spawn_spec(typing_extensions.Protocol[
|
270
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
|
271
271
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
272
272
|
async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
|
273
273
|
|
274
|
-
spawn: __spawn_spec[modal._functions.
|
274
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
|
275
275
|
|
276
276
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
|
277
277
|
|
modal/image.py
CHANGED
@@ -1011,13 +1011,16 @@ class _Image(_Object, type_prefix="im"):
|
|
1011
1011
|
pkgs = _flatten_str_args("pip_install", "packages", packages)
|
1012
1012
|
if not pkgs:
|
1013
1013
|
return self
|
1014
|
+
elif not _validate_packages(pkgs):
|
1015
|
+
raise InvalidError(
|
1016
|
+
"Package list for `Image.pip_install` cannot contain other arguments;"
|
1017
|
+
" try the `extra_options` parameter instead."
|
1018
|
+
)
|
1014
1019
|
|
1015
1020
|
def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec:
|
1016
1021
|
package_args = shlex.join(sorted(pkgs))
|
1017
1022
|
extra_args = _make_pip_install_args(find_links, index_url, extra_index_url, pre, extra_options)
|
1018
1023
|
commands = ["FROM base", f"RUN python -m pip install {package_args} {extra_args}"]
|
1019
|
-
if not _validate_packages(pkgs):
|
1020
|
-
_warn_invalid_packages(commands[-1].split("RUN ")[-1])
|
1021
1024
|
if version > "2023.12": # Back-compat for legacy trailing space with empty extra_args
|
1022
1025
|
commands = [cmd.strip() for cmd in commands]
|
1023
1026
|
return DockerfileSpec(commands=commands, context_files={})
|
modal/object.pyi
CHANGED
@@ -124,12 +124,6 @@ class Object:
|
|
124
124
|
@property
|
125
125
|
def deps(self) -> collections.abc.Callable[..., collections.abc.Sequence[Object]]: ...
|
126
126
|
|
127
|
-
class __resolve_spec(typing_extensions.Protocol[SUPERSELF]):
|
128
|
-
def __call__(self, /, client: typing.Optional[modal.client.Client] = None): ...
|
129
|
-
async def aio(self, /, client: typing.Optional[modal.client.Client] = None): ...
|
130
|
-
|
131
|
-
resolve: __resolve_spec[typing_extensions.Self]
|
132
|
-
|
133
127
|
class __hydrate_spec(typing_extensions.Protocol[SUPERSELF]):
|
134
128
|
def __call__(self, /, client: typing.Optional[modal.client.Client] = None) -> SUPERSELF: ...
|
135
129
|
async def aio(self, /, client: typing.Optional[modal.client.Client] = None) -> SUPERSELF: ...
|
modal/runner.py
CHANGED
@@ -27,7 +27,6 @@ from ._pty import get_pty_info
|
|
27
27
|
from ._resolver import Resolver
|
28
28
|
from ._traceback import print_server_warnings, traceback_contains_remote_call
|
29
29
|
from ._utils.async_utils import TaskContext, gather_cancel_on_exc, synchronize_api
|
30
|
-
from ._utils.deprecation import deprecation_error
|
31
30
|
from ._utils.git_utils import get_git_commit_info
|
32
31
|
from ._utils.grpc_utils import retry_transient_errors
|
33
32
|
from ._utils.name_utils import check_object_name, is_valid_tag
|
@@ -632,24 +631,7 @@ async def _interactive_shell(
|
|
632
631
|
raise
|
633
632
|
|
634
633
|
|
635
|
-
def _run_stub(*args: Any, **kwargs: Any):
|
636
|
-
"""mdmd:hidden
|
637
|
-
`run_stub` has been renamed to `run_app` and is deprecated. Please update your code.
|
638
|
-
"""
|
639
|
-
deprecation_error(
|
640
|
-
(2024, 5, 1), "`run_stub` has been renamed to `run_app` and is deprecated. Please update your code."
|
641
|
-
)
|
642
|
-
|
643
|
-
|
644
|
-
def _deploy_stub(*args: Any, **kwargs: Any):
|
645
|
-
"""mdmd:hidden"""
|
646
|
-
message = "`deploy_stub` has been renamed to `deploy_app`. Please update your code."
|
647
|
-
deprecation_error((2024, 5, 1), message)
|
648
|
-
|
649
|
-
|
650
634
|
run_app = synchronize_api(_run_app)
|
651
635
|
serve_update = synchronize_api(_serve_update)
|
652
636
|
deploy_app = synchronize_api(_deploy_app)
|
653
637
|
interactive_shell = synchronize_api(_interactive_shell)
|
654
|
-
run_stub = synchronize_api(_run_stub)
|
655
|
-
deploy_stub = synchronize_api(_deploy_stub)
|
modal/runner.pyi
CHANGED
@@ -83,8 +83,6 @@ async def _deploy_app(
|
|
83
83
|
async def _interactive_shell(
|
84
84
|
_app: _App, cmds: list[str], environment_name: str = "", pty: bool = True, **kwargs: typing.Any
|
85
85
|
) -> None: ...
|
86
|
-
def _run_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
87
|
-
def _deploy_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
88
86
|
|
89
87
|
class __run_app_spec(typing_extensions.Protocol):
|
90
88
|
def __call__(
|
@@ -153,6 +151,3 @@ class __interactive_shell_spec(typing_extensions.Protocol):
|
|
153
151
|
) -> None: ...
|
154
152
|
|
155
153
|
interactive_shell: __interactive_shell_spec
|
156
|
-
|
157
|
-
def run_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
158
|
-
def deploy_stub(*args: typing.Any, **kwargs: typing.Any): ...
|
modal/sandbox.py
CHANGED
@@ -762,23 +762,3 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
762
762
|
|
763
763
|
|
764
764
|
Sandbox = synchronize_api(_Sandbox)
|
765
|
-
|
766
|
-
|
767
|
-
def __getattr__(name):
|
768
|
-
if name == "LogsReader":
|
769
|
-
deprecation_error(
|
770
|
-
(2024, 8, 12),
|
771
|
-
"`modal.sandbox.LogsReader` is deprecated. Please import `modal.io_streams.StreamReader` instead.",
|
772
|
-
)
|
773
|
-
from .io_streams import StreamReader
|
774
|
-
|
775
|
-
return StreamReader
|
776
|
-
elif name == "StreamWriter":
|
777
|
-
deprecation_error(
|
778
|
-
(2024, 8, 12),
|
779
|
-
"`modal.sandbox.StreamWriter` is deprecated. Please import `modal.io_streams.StreamWriter` instead.",
|
780
|
-
)
|
781
|
-
from .io_streams import StreamWriter
|
782
|
-
|
783
|
-
return StreamWriter
|
784
|
-
raise AttributeError(f"module {__name__} has no attribute {name}")
|
modal/sandbox.pyi
CHANGED
modal/serving.py
CHANGED
@@ -11,7 +11,6 @@ from synchronicity.async_wrap import asynccontextmanager
|
|
11
11
|
from modal._output import OutputManager
|
12
12
|
|
13
13
|
from ._utils.async_utils import TaskContext, asyncify, synchronize_api, synchronizer
|
14
|
-
from ._utils.deprecation import deprecation_error
|
15
14
|
from ._utils.logger import logger
|
16
15
|
from ._watcher import watch
|
17
16
|
from .cli.import_refs import ImportRef, import_app_from_ref
|
@@ -122,9 +121,4 @@ async def _serve_app(
|
|
122
121
|
yield app
|
123
122
|
|
124
123
|
|
125
|
-
def _serve_stub(*args, **kwargs):
|
126
|
-
deprecation_error((2024, 5, 1), "`serve_stub` is deprecated. Please use `serve_app` instead.")
|
127
|
-
|
128
|
-
|
129
124
|
serve_app = synchronize_api(_serve_app)
|
130
|
-
serve_stub = synchronize_api(_serve_stub)
|
modal/serving.pyi
CHANGED
@@ -33,7 +33,6 @@ def _serve_app(
|
|
33
33
|
_watcher: typing.Optional[collections.abc.AsyncGenerator[set[str], None]] = None,
|
34
34
|
environment_name: typing.Optional[str] = None,
|
35
35
|
) -> typing.AsyncContextManager[_App]: ...
|
36
|
-
def _serve_stub(*args, **kwargs): ...
|
37
36
|
|
38
37
|
class __serve_app_spec(typing_extensions.Protocol):
|
39
38
|
def __call__(
|
@@ -56,5 +55,3 @@ class __serve_app_spec(typing_extensions.Protocol):
|
|
56
55
|
) -> typing.AsyncContextManager[_App]: ...
|
57
56
|
|
58
57
|
serve_app: __serve_app_spec
|
59
|
-
|
60
|
-
def serve_stub(*args, **kwargs): ...
|
modal/volume.py
CHANGED
@@ -27,7 +27,7 @@ from grpclib import GRPCError, Status
|
|
27
27
|
from synchronicity.async_wrap import asynccontextmanager
|
28
28
|
|
29
29
|
import modal_proto.api_pb2
|
30
|
-
from modal.exception import VolumeUploadTimeoutError
|
30
|
+
from modal.exception import InvalidError, VolumeUploadTimeoutError
|
31
31
|
from modal_proto import api_pb2
|
32
32
|
|
33
33
|
from ._object import EPHEMERAL_OBJECT_HEARTBEAT_SLEEP, _get_environment_name, _Object, live_method, live_method_gen
|
@@ -49,7 +49,7 @@ from ._utils.blob_utils import (
|
|
49
49
|
get_file_upload_spec_from_fileobj,
|
50
50
|
get_file_upload_spec_from_path,
|
51
51
|
)
|
52
|
-
from ._utils.deprecation import
|
52
|
+
from ._utils.deprecation import deprecation_warning
|
53
53
|
from ._utils.grpc_utils import retry_transient_errors
|
54
54
|
from ._utils.http_utils import ClientSessionRegistry
|
55
55
|
from ._utils.name_utils import check_object_name
|
@@ -364,21 +364,14 @@ class _Volume(_Object, type_prefix="vo"):
|
|
364
364
|
recursively.
|
365
365
|
"""
|
366
366
|
if path.endswith("**"):
|
367
|
-
|
367
|
+
raise InvalidError(
|
368
368
|
"Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
|
369
369
|
"Please pass recursive=True instead. For the CLI, just remove the glob suffix."
|
370
370
|
)
|
371
|
-
deprecation_error(
|
372
|
-
(2024, 4, 23),
|
373
|
-
msg,
|
374
|
-
)
|
375
371
|
elif path.endswith("*"):
|
376
|
-
|
377
|
-
(
|
378
|
-
|
379
|
-
"Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
|
380
|
-
"Please remove the glob `*` suffix."
|
381
|
-
),
|
372
|
+
raise InvalidError(
|
373
|
+
"Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
|
374
|
+
"Please remove the glob `*` suffix."
|
382
375
|
)
|
383
376
|
|
384
377
|
req = api_pb2.VolumeListFilesRequest(volume_id=self.object_id, path=path, recursive=recursive)
|
@@ -6,7 +6,7 @@ modal/_container_entrypoint.py,sha256=2Zx9O_EMJg0H77EdnC2vGKs6uFMWwbP1NLFf-qYmWm
|
|
6
6
|
modal/_functions.py,sha256=3ftxwJd-4bSZlEDv2SFGQBgakXqLiTvV_itoAShXrY8,80765
|
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=KzzzZoM41UQUiY9TKOrft9BtZKgjWG_ukdlyLGjB4UY,10758
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
11
|
modal/_partial_function.py,sha256=rxao4kjCoHYvV7esRFzIUiOW7y6jTGIyTYvYuCtBfjE,39140
|
12
12
|
modal/_pty.py,sha256=JZfPDDpzqICZqtyPI_oMJf_9w-p_lLNuzHhwhodUXio,1329
|
@@ -18,18 +18,18 @@ modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
|
|
18
18
|
modal/_tunnel.pyi,sha256=a4Ea0RQ5jaJB0A4LH9FANGB44ObqkHHGVDV4RwtokzU,1251
|
19
19
|
modal/_type_manager.py,sha256=DWjgmjYJuOagw2erin506UUbG2H5UzZCFEekS-7hmfA,9087
|
20
20
|
modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
|
21
|
-
modal/app.py,sha256=
|
22
|
-
modal/app.pyi,sha256=
|
21
|
+
modal/app.py,sha256=e-lGAFV1lhK_gVFsQR2nG4SEfE43ZNsucX71MyS7xic,49005
|
22
|
+
modal/app.pyi,sha256=mUpAC23uWUuButj5aYm_IzRE7MV4besHKK0iRG8tPrw,24595
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=o-aQThHpvDHUzg_kUafyhWzACViUBhY2WLZ2EitnSHA,16787
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=it-xvBHNnUrCuxpgwpaL5G3Uh0kCI4J4qcrrjJ2XKyM,8457
|
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=KKCzn4xTo0hz4t9WxcYVDIHA3_Vm4kPs3UnBq134H58,38238
|
29
29
|
modal/cls.pyi,sha256=BmFCoiFS4EQjkx36iybAFNpxu6xaq24lyJpQuCsB-ko,12990
|
30
30
|
modal/config.py,sha256=OOMEJ5LHNFbHRW5wUpuhl0TH6EPW8D1XV9I3OJXrZrk,12668
|
31
|
-
modal/container_process.py,sha256=
|
32
|
-
modal/container_process.pyi,sha256=
|
31
|
+
modal/container_process.py,sha256=PDvjcyZ6eeN8foKQgR0WJ66Sg3lt7OFhK7Y_Akz6k5w,5846
|
32
|
+
modal/container_process.pyi,sha256=pPIUxVV_TY4huO2jF5cSSjb6L_EN7Es4xRvuwZ5sa5M,2802
|
33
33
|
modal/dict.py,sha256=G7jA94GYBwcN1jgpaFESjS3xDBIjR_N4cJLno5H2qow,14304
|
34
34
|
modal/dict.pyi,sha256=RBaQyOd1ABRNN7vIf5L_rv94y7Kq5Qn9IlKHSr4j8N0,8120
|
35
35
|
modal/environments.py,sha256=gHFNLG78bqgizpQ4w_elz27QOqmcgAonFsmLs7NjUJ4,6804
|
@@ -39,9 +39,9 @@ modal/file_io.py,sha256=lcMs_E9Xfm0YX1t9U2wNIBPnqHRxmImqjLW1GHqVmyg,20945
|
|
39
39
|
modal/file_io.pyi,sha256=oB7x-rKq7bmm8cA7Z7W9C9yeko7KK9m9i5GidFnkGK4,9569
|
40
40
|
modal/file_pattern_matcher.py,sha256=wov-otB5M1oTdrYDtR2_VgacYin2srdtAP4McA1Cqzw,6516
|
41
41
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
42
|
-
modal/functions.pyi,sha256=
|
42
|
+
modal/functions.pyi,sha256=jg9x3tdhoLWrlmAxsA0gknuRxbbR2lFSo-ZSulV7lH0,17001
|
43
43
|
modal/gpu.py,sha256=Kbhs_u49FaC2Zi0TjCdrpstpRtT5eZgecynmQi5IZVE,6752
|
44
|
-
modal/image.py,sha256=
|
44
|
+
modal/image.py,sha256=7YZwSbUMAU1zT3OsoCL3ty4dfaNAjvVJWjjVcGZ1ZcE,92929
|
45
45
|
modal/image.pyi,sha256=MDq7tNJevElK78VxFYrZRe_00kz9gPdg98MN5c6fFoE,25644
|
46
46
|
modal/io_streams.py,sha256=YDZVQSDv05DeXg5TwcucC9Rj5hQBx2GXdluan9rIUpw,15467
|
47
47
|
modal/io_streams.pyi,sha256=1UK6kWLREASQfq-wL9wSp5iqjLU0egRZPDn4LXs1PZY,5136
|
@@ -50,7 +50,7 @@ modal/mount.pyi,sha256=PHs-N9LGSDfYWw70UrhvGZW_6uWwyx-1GAieROzCNNs,12583
|
|
50
50
|
modal/network_file_system.py,sha256=P65zs04YkRyGm1uGNbIYzjQH-YGdCTBiW6L5q_JoYh4,14592
|
51
51
|
modal/network_file_system.pyi,sha256=58DiUqHGlARmI3cz-Yo7IFObKKFIiGh5UIU5JxGNFfc,8333
|
52
52
|
modal/object.py,sha256=bTeskuY8JFrESjU4_UL_nTwYlBQdOLmVaOX3X6EMxsg,164
|
53
|
-
modal/object.pyi,sha256=
|
53
|
+
modal/object.pyi,sha256=UkR8NQ1jCIaw3hBUPxBRc6vvrOqtV37G_hsW2O5-4wE,5378
|
54
54
|
modal/output.py,sha256=q4T9uHduunj4NwY-YSwkHGgjZlCXMuJbfQ5UFaAGRAc,1968
|
55
55
|
modal/parallel_map.py,sha256=zU2zL8_9PmmNC9Ny2GB7K2_HbAdPU7RiVLN0GtzaDls,35923
|
56
56
|
modal/parallel_map.pyi,sha256=mhYGQmufQEJbjNrX7vNhBS2gUdfBrpmuWNUHth_Dz6U,6140
|
@@ -62,23 +62,23 @@ modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
modal/queue.py,sha256=U2QmeY8T0fdLZmZKKcDcSnNzYu8MM-tr2qm0Nd3D2eo,18809
|
63
63
|
modal/queue.pyi,sha256=O0f0S5kM1P0GVgzUzgsN0XsI46B9cJem4kkWluFndjM,10632
|
64
64
|
modal/retries.py,sha256=IvNLDM0f_GLUDD5VgEDoN09C88yoxSrCquinAuxT1Sc,5205
|
65
|
-
modal/runner.py,sha256=
|
66
|
-
modal/runner.pyi,sha256=
|
65
|
+
modal/runner.py,sha256=BqqN9rWfr-Bwuv9fVNZqAwZnM8OSC9H-HTJC1KQPRMg,24150
|
66
|
+
modal/runner.pyi,sha256=1AnEu48SUPnLWp3raQ2zJCV5lc85EGLkX2nL0bHWaB0,5162
|
67
67
|
modal/running_app.py,sha256=v61mapYNV1-O-Uaho5EfJlryMLvIT9We0amUOSvSGx8,1188
|
68
|
-
modal/sandbox.py,sha256=
|
69
|
-
modal/sandbox.pyi,sha256=
|
68
|
+
modal/sandbox.py,sha256=shZ-jzYx5WJl8qgv84OWkwzhIhunSNvm2KMUjGAoIhg,32062
|
69
|
+
modal/sandbox.pyi,sha256=BD1VfQGFY6X6sismOWGd8_UMTPE7-gs3eSfNFw44u2M,22931
|
70
70
|
modal/schedule.py,sha256=ewa7hb9NKYnoeSCW2PujZAbGGJL8btX6X3KalCFpc_M,2626
|
71
71
|
modal/scheduler_placement.py,sha256=BAREdOY5HzHpzSBqt6jDVR6YC_jYfHMVqOzkyqQfngU,1235
|
72
72
|
modal/secret.py,sha256=I2z-rgKWl_Ix107d2_Y2OWGXdFOuJ7zMOyDfIOdFI1A,10374
|
73
73
|
modal/secret.pyi,sha256=NY_dz0UjiYyn4u4LaBZwPP3Ji7SlTLpEyzrYK2sj9HQ,3103
|
74
|
-
modal/serving.py,sha256=
|
75
|
-
modal/serving.pyi,sha256=
|
74
|
+
modal/serving.py,sha256=3I3WBeVbzZY258u9PXBCW_dZBgypq3OhwBuTVvlgubE,4423
|
75
|
+
modal/serving.pyi,sha256=YfixTaWikyYpwhnNxCHMZnDDQiPmV1xJ87QF91U_WGU,1924
|
76
76
|
modal/snapshot.py,sha256=6rQvDP3iX9hdiAudKTy0-m0JESt4kk0q2gusXbaRA-8,1279
|
77
77
|
modal/snapshot.pyi,sha256=dIEBdTPb7O3VwkQ8TMPjfyU17RLuS9i0DnACxxHy8X4,676
|
78
78
|
modal/stream_type.py,sha256=A6320qoAAWhEfwOCZfGtymQTu5AfLfJXXgARqooTPvY,417
|
79
79
|
modal/token_flow.py,sha256=0_4KabXKsuE4OXTJ1OuLOtA-b1sesShztMZkkRFK7tA,7605
|
80
80
|
modal/token_flow.pyi,sha256=ILbRv6JsZq-jK8jcJM7eB74e0PsbzwBm7hyPcV9lBlQ,2121
|
81
|
-
modal/volume.py,sha256=
|
81
|
+
modal/volume.py,sha256=E4S7cFbM2vg2i8yCR1qkVHgwPGYkkiBqqVd1dzWgTO8,43216
|
82
82
|
modal/volume.pyi,sha256=9hPIMRBzGZycVL8uRfGpjSmNu_pCbkGAOyrnE86bU2Y,21113
|
83
83
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
84
84
|
modal/_runtime/asgi.py,sha256=_2xSTsDD27Cit7xnMs4lzkJA2wzer2_N4Oa3BkXFzVA,22521
|
@@ -146,7 +146,7 @@ modal/requirements/2024.10.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddR
|
|
146
146
|
modal/requirements/PREVIEW.txt,sha256=qD-5cVIVM9wXesJ6JC89Ew-3m2KjEElUz3jaw_MddRo,296
|
147
147
|
modal/requirements/README.md,sha256=9tK76KP0Uph7O0M5oUgsSwEZDj5y-dcUPsnpR0Sc-Ik,854
|
148
148
|
modal/requirements/base-images.json,sha256=57vMSqzMbLBxw5tFWSaMiIkkVEps4JfX5PAtXGnkS4U,740
|
149
|
-
modal-1.0.0.
|
149
|
+
modal-1.0.0.dev5.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
150
150
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
151
151
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
152
152
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
@@ -169,10 +169,10 @@ modal_proto/options_pb2.pyi,sha256=l7DBrbLO7q3Ir-XDkWsajm0d0TQqqrfuX54i4BMpdQg,1
|
|
169
169
|
modal_proto/options_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
170
170
|
modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0yJSI,247
|
171
171
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
172
|
-
modal_version/__init__.py,sha256=
|
172
|
+
modal_version/__init__.py,sha256=VICQvzOhWSpql-aZVxES75pKsAm_b2bTA_o2shw5XAU,120
|
173
173
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
174
|
-
modal-1.0.0.
|
175
|
-
modal-1.0.0.
|
176
|
-
modal-1.0.0.
|
177
|
-
modal-1.0.0.
|
178
|
-
modal-1.0.0.
|
174
|
+
modal-1.0.0.dev5.dist-info/METADATA,sha256=Z80D-FBGtFpLfCkeKb30--FR3iI4rgmTODNdQtlLE1Y,2454
|
175
|
+
modal-1.0.0.dev5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-1.0.0.dev5.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-1.0.0.dev5.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-1.0.0.dev5.dist-info/RECORD,,
|
modal_version/__init__.py
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|