modal 1.0.0.dev15__py3-none-any.whl → 1.0.0.dev16__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/__init__.py +10 -2
- modal/app.py +0 -32
- modal/app.pyi +0 -29
- modal/client.pyi +2 -2
- modal/exception.py +1 -1
- {modal-1.0.0.dev15.dist-info → modal-1.0.0.dev16.dist-info}/METADATA +1 -1
- {modal-1.0.0.dev15.dist-info → modal-1.0.0.dev16.dist-info}/RECORD +12 -12
- modal_version/__init__.py +1 -1
- {modal-1.0.0.dev15.dist-info → modal-1.0.0.dev16.dist-info}/WHEEL +0 -0
- {modal-1.0.0.dev15.dist-info → modal-1.0.0.dev16.dist-info}/entry_points.txt +0 -0
- {modal-1.0.0.dev15.dist-info → modal-1.0.0.dev16.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.0.dev15.dist-info → modal-1.0.0.dev16.dist-info}/top_level.txt +0 -0
modal/__init__.py
CHANGED
@@ -11,7 +11,7 @@ from modal_version import __version__
|
|
11
11
|
try:
|
12
12
|
from ._runtime.execution_context import current_function_call_id, current_input_id, interact, is_local
|
13
13
|
from ._tunnel import Tunnel, forward
|
14
|
-
from .app import App
|
14
|
+
from .app import App
|
15
15
|
from .client import Client
|
16
16
|
from .cloud_bucket_mount import CloudBucketMount
|
17
17
|
from .cls import Cls, parameter
|
@@ -54,6 +54,7 @@ except Exception:
|
|
54
54
|
print()
|
55
55
|
raise
|
56
56
|
|
57
|
+
|
57
58
|
__all__ = [
|
58
59
|
"__version__",
|
59
60
|
"App",
|
@@ -77,7 +78,6 @@ __all__ = [
|
|
77
78
|
"SandboxSnapshot",
|
78
79
|
"SchedulerPlacement",
|
79
80
|
"Secret",
|
80
|
-
"Stub",
|
81
81
|
"Tunnel",
|
82
82
|
"Volume",
|
83
83
|
"asgi_app",
|
@@ -99,3 +99,11 @@ __all__ = [
|
|
99
99
|
"web_server",
|
100
100
|
"wsgi_app",
|
101
101
|
]
|
102
|
+
|
103
|
+
|
104
|
+
def __getattr__(name):
|
105
|
+
if name == "Stub":
|
106
|
+
raise AttributeError(
|
107
|
+
"Module 'modal' has no attribute 'Stub'. Use `modal.App` instead. This is a simple name change."
|
108
|
+
)
|
109
|
+
raise AttributeError(f"module 'modal' has no attribute '{name}'")
|
modal/app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Copyright Modal Labs 2022
|
2
2
|
import inspect
|
3
3
|
import typing
|
4
|
-
import warnings
|
5
4
|
from collections.abc import AsyncGenerator, Coroutine, Sequence
|
6
5
|
from pathlib import PurePosixPath
|
7
6
|
from textwrap import dedent
|
@@ -78,11 +77,6 @@ class _LocalEntrypoint:
|
|
78
77
|
def app(self) -> "_App":
|
79
78
|
return self._app
|
80
79
|
|
81
|
-
@property
|
82
|
-
def stub(self) -> "_App":
|
83
|
-
# Deprecated soon, only for backwards compatibility
|
84
|
-
return self._app
|
85
|
-
|
86
80
|
|
87
81
|
LocalEntrypoint = synchronize_api(_LocalEntrypoint)
|
88
82
|
|
@@ -781,12 +775,6 @@ class _App:
|
|
781
775
|
rdma = None
|
782
776
|
i6pn_enabled = i6pn
|
783
777
|
|
784
|
-
if info.function_name.endswith(".app"):
|
785
|
-
warnings.warn(
|
786
|
-
"Beware: the function name is `app`. Modal will soon rename `Stub` to `App`, "
|
787
|
-
"so you might run into issues if you have code like `app = modal.App()` in the same scope"
|
788
|
-
)
|
789
|
-
|
790
778
|
if is_generator is None:
|
791
779
|
is_generator = inspect.isgeneratorfunction(raw_f) or inspect.isasyncgenfunction(raw_f)
|
792
780
|
|
@@ -1096,23 +1084,3 @@ class _App:
|
|
1096
1084
|
|
1097
1085
|
|
1098
1086
|
App = synchronize_api(_App)
|
1099
|
-
|
1100
|
-
|
1101
|
-
class _Stub(_App):
|
1102
|
-
"""mdmd:hidden
|
1103
|
-
This enables using a "Stub" class instead of "App".
|
1104
|
-
|
1105
|
-
For most of Modal's history, the app class was called "Stub", so this exists for
|
1106
|
-
backwards compatibility, in order to facilitate moving from "Stub" to "App".
|
1107
|
-
"""
|
1108
|
-
|
1109
|
-
def __new__(cls, *args, **kwargs):
|
1110
|
-
deprecation_warning(
|
1111
|
-
(2024, 4, 29),
|
1112
|
-
'The use of "Stub" has been deprecated in favor of "App".'
|
1113
|
-
" This is a pure name change with no other implications.",
|
1114
|
-
)
|
1115
|
-
return _App(*args, **kwargs)
|
1116
|
-
|
1117
|
-
|
1118
|
-
Stub = synchronize_api(_Stub)
|
modal/app.pyi
CHANGED
@@ -33,8 +33,6 @@ class _LocalEntrypoint:
|
|
33
33
|
def info(self) -> modal._utils.function_utils.FunctionInfo: ...
|
34
34
|
@property
|
35
35
|
def app(self) -> _App: ...
|
36
|
-
@property
|
37
|
-
def stub(self) -> _App: ...
|
38
36
|
|
39
37
|
class LocalEntrypoint:
|
40
38
|
_info: modal._utils.function_utils.FunctionInfo
|
@@ -46,8 +44,6 @@ class LocalEntrypoint:
|
|
46
44
|
def info(self) -> modal._utils.function_utils.FunctionInfo: ...
|
47
45
|
@property
|
48
46
|
def app(self) -> App: ...
|
49
|
-
@property
|
50
|
-
def stub(self) -> App: ...
|
51
47
|
|
52
48
|
def check_sequence(items: typing.Sequence[typing.Any], item_type: type[typing.Any], error_msg: str) -> None: ...
|
53
49
|
|
@@ -520,29 +516,4 @@ class App:
|
|
520
516
|
@classmethod
|
521
517
|
def _reset_container_app(cls): ...
|
522
518
|
|
523
|
-
class _Stub(_App):
|
524
|
-
@staticmethod
|
525
|
-
def __new__(
|
526
|
-
cls,
|
527
|
-
name: typing.Optional[str] = None,
|
528
|
-
*,
|
529
|
-
image: typing.Optional[modal.image._Image] = None,
|
530
|
-
mounts: collections.abc.Sequence[modal.mount._Mount] = [],
|
531
|
-
secrets: collections.abc.Sequence[modal.secret._Secret] = [],
|
532
|
-
volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume._Volume] = {},
|
533
|
-
include_source: typing.Optional[bool] = None,
|
534
|
-
): ...
|
535
|
-
|
536
|
-
class Stub(App):
|
537
|
-
def __init__(
|
538
|
-
self,
|
539
|
-
name: typing.Optional[str] = None,
|
540
|
-
*,
|
541
|
-
image: typing.Optional[modal.image.Image] = None,
|
542
|
-
mounts: collections.abc.Sequence[modal.mount.Mount] = [],
|
543
|
-
secrets: collections.abc.Sequence[modal.secret.Secret] = [],
|
544
|
-
volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume.Volume] = {},
|
545
|
-
include_source: typing.Optional[bool] = None,
|
546
|
-
) -> None: ...
|
547
|
-
|
548
519
|
_default_image: modal.image._Image
|
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.dev16",
|
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.dev16",
|
98
98
|
): ...
|
99
99
|
def is_closed(self) -> bool: ...
|
100
100
|
@property
|
modal/exception.py
CHANGED
@@ -116,7 +116,7 @@ class InternalFailure(Error):
|
|
116
116
|
|
117
117
|
class _CliUserExecutionError(Exception):
|
118
118
|
"""mdmd:hidden
|
119
|
-
Private wrapper for exceptions during when importing or running
|
119
|
+
Private wrapper for exceptions during when importing or running Apps from the CLI.
|
120
120
|
|
121
121
|
This intentionally does not inherit from `modal.exception.Error` because it
|
122
122
|
is a private type that should never bubble up to users. Exceptions raised in
|
@@ -1,4 +1,4 @@
|
|
1
|
-
modal/__init__.py,sha256=
|
1
|
+
modal/__init__.py,sha256=AaO8fXHO6BYltmFoYOwCB2pSjEECXVvGK5p2Vfo_SpU,2752
|
2
2
|
modal/__main__.py,sha256=sTJcc9EbDuCKSwg3tL6ZckFw9WWdlkXW8mId1IvJCNc,2846
|
3
3
|
modal/_clustered_functions.py,sha256=kTf-9YBXY88NutC1akI-gCbvf01RhMPCw-zoOI_YIUE,2700
|
4
4
|
modal/_clustered_functions.pyi,sha256=2aWxN2v5WUnj-R-sk6BzJ-3AvggkQGQjwhtvbDH3pds,777
|
@@ -18,11 +18,11 @@ 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=Wz9DIFzO2ByObuqoh3zk9B76WTWcPqYoQDuPU-yrLTU,47100
|
22
|
+
modal/app.pyi,sha256=1dHHI6RgvJ1y5Ouzb1_S-wpjfjCL7QHz0gqE4BxMw10,23192
|
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=e6ghxi754Z0WfJ_zMQ8mrthEitSVfS-QZ_AgzWWVUlc,8459
|
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=dBbeARwOWftlKd1cwtM0cHFtQWSWkwVXwVmOV4w0SyI,37907
|
@@ -34,7 +34,7 @@ modal/dict.py,sha256=w-Zuk3FXuwkyxKuF1ry86S8j2cvoC8-u4Ga0h-GfV1s,14324
|
|
34
34
|
modal/dict.pyi,sha256=RBaQyOd1ABRNN7vIf5L_rv94y7Kq5Qn9IlKHSr4j8N0,8120
|
35
35
|
modal/environments.py,sha256=gHFNLG78bqgizpQ4w_elz27QOqmcgAonFsmLs7NjUJ4,6804
|
36
36
|
modal/environments.pyi,sha256=4HbI0kywveaUVI7HqDtZ4HphCTGXYi_wie2hz87up5A,3425
|
37
|
-
modal/exception.py,sha256=
|
37
|
+
modal/exception.py,sha256=cDiZMzkKZ2nLhaYG0Dt-_1YZs5LZEyUJNF05WqyCX90,5262
|
38
38
|
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
|
@@ -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.dev16.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=-BSzjamBYi1bfz_PGPNWb6JtCWPr4i-Q5Txuq0wPwPs,121
|
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.dev16.dist-info/METADATA,sha256=0sLq92t_upACBNZHkXXnirRuo-15pDljGA8vKq21a8g,2455
|
175
|
+
modal-1.0.0.dev16.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-1.0.0.dev16.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-1.0.0.dev16.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-1.0.0.dev16.dist-info/RECORD,,
|
modal_version/__init__.py
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|