modal 0.73.83__py3-none-any.whl → 0.73.84__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/_partial_function.py +7 -22
- modal/client.pyi +2 -2
- modal/partial_function.pyi +2 -6
- {modal-0.73.83.dist-info → modal-0.73.84.dist-info}/METADATA +1 -1
- {modal-0.73.83.dist-info → modal-0.73.84.dist-info}/RECORD +10 -10
- modal_version/_version_generated.py +1 -1
- {modal-0.73.83.dist-info → modal-0.73.84.dist-info}/LICENSE +0 -0
- {modal-0.73.83.dist-info → modal-0.73.84.dist-info}/WHEEL +0 -0
- {modal-0.73.83.dist-info → modal-0.73.84.dist-info}/entry_points.txt +0 -0
- {modal-0.73.83.dist-info → modal-0.73.84.dist-info}/top_level.txt +0 -0
modal/_partial_function.py
CHANGED
@@ -54,7 +54,6 @@ class _PartialFunction(typing.Generic[P, ReturnType, OriginalReturnType]):
|
|
54
54
|
flags: _PartialFunctionFlags
|
55
55
|
webhook_config: Optional[api_pb2.WebhookConfig]
|
56
56
|
is_generator: bool
|
57
|
-
keep_warm: Optional[int]
|
58
57
|
batch_max_size: Optional[int]
|
59
58
|
batch_wait_ms: Optional[int]
|
60
59
|
force_build: bool
|
@@ -65,9 +64,9 @@ class _PartialFunction(typing.Generic[P, ReturnType, OriginalReturnType]):
|
|
65
64
|
self,
|
66
65
|
raw_f: Callable[P, ReturnType],
|
67
66
|
flags: _PartialFunctionFlags,
|
67
|
+
*,
|
68
68
|
webhook_config: Optional[api_pb2.WebhookConfig] = None,
|
69
69
|
is_generator: Optional[bool] = None,
|
70
|
-
keep_warm: Optional[int] = None,
|
71
70
|
batch_max_size: Optional[int] = None,
|
72
71
|
batch_wait_ms: Optional[int] = None,
|
73
72
|
cluster_size: Optional[int] = None, # Experimental: Clustered functions
|
@@ -84,7 +83,6 @@ class _PartialFunction(typing.Generic[P, ReturnType, OriginalReturnType]):
|
|
84
83
|
final_is_generator = is_generator
|
85
84
|
|
86
85
|
self.is_generator = final_is_generator
|
87
|
-
self.keep_warm = keep_warm
|
88
86
|
self.wrapped = False # Make sure that this was converted into a FunctionHandle
|
89
87
|
self.batch_max_size = batch_max_size
|
90
88
|
self.batch_wait_ms = batch_wait_ms
|
@@ -141,7 +139,6 @@ class _PartialFunction(typing.Generic[P, ReturnType, OriginalReturnType]):
|
|
141
139
|
raw_f=self.raw_f,
|
142
140
|
flags=(self.flags | flags),
|
143
141
|
webhook_config=self.webhook_config,
|
144
|
-
keep_warm=self.keep_warm,
|
145
142
|
batch_max_size=self.batch_max_size,
|
146
143
|
batch_wait_ms=self.batch_wait_ms,
|
147
144
|
force_build=self.force_build,
|
@@ -198,7 +195,6 @@ def _method(
|
|
198
195
|
# Set this to True if it's a non-generator function returning
|
199
196
|
# a [sync/async] generator object
|
200
197
|
is_generator: Optional[bool] = None,
|
201
|
-
keep_warm: Optional[int] = None, # Deprecated: Use keep_warm on @app.cls() instead
|
202
198
|
) -> _MethodDecoratorType:
|
203
199
|
"""Decorator for methods that should be transformed into a Modal Function registered against this class's App.
|
204
200
|
|
@@ -216,17 +212,6 @@ def _method(
|
|
216
212
|
if _warn_parentheses_missing is not None:
|
217
213
|
raise InvalidError("Positional arguments are not allowed. Did you forget parentheses? Suggestion: `@method()`.")
|
218
214
|
|
219
|
-
if keep_warm is not None:
|
220
|
-
deprecation_warning(
|
221
|
-
(2024, 6, 10),
|
222
|
-
(
|
223
|
-
"`keep_warm=` is no longer supported per-method on Modal classes. "
|
224
|
-
"All methods and web endpoints of a class use the same set of containers now. "
|
225
|
-
"Use keep_warm via the @app.cls() decorator instead. "
|
226
|
-
),
|
227
|
-
pending=True,
|
228
|
-
)
|
229
|
-
|
230
215
|
def wrapper(raw_f: Callable[..., Any]) -> _PartialFunction:
|
231
216
|
nonlocal is_generator
|
232
217
|
if isinstance(raw_f, _PartialFunction) and raw_f.webhook_config:
|
@@ -241,7 +226,7 @@ def _method(
|
|
241
226
|
"Batched function on classes should not be wrapped by `@method`. "
|
242
227
|
"Suggestion: remove the `@method` decorator."
|
243
228
|
)
|
244
|
-
return _PartialFunction(raw_f, _PartialFunctionFlags.FUNCTION, is_generator=is_generator
|
229
|
+
return _PartialFunction(raw_f, _PartialFunctionFlags.FUNCTION, is_generator=is_generator)
|
245
230
|
|
246
231
|
return wrapper # type: ignore # synchronicity issue with wrapped vs unwrapped types and protocols
|
247
232
|
|
@@ -300,7 +285,7 @@ def _fastapi_endpoint(
|
|
300
285
|
return _PartialFunction(
|
301
286
|
raw_f,
|
302
287
|
_PartialFunctionFlags.FUNCTION,
|
303
|
-
api_pb2.WebhookConfig(
|
288
|
+
webhook_config=api_pb2.WebhookConfig(
|
304
289
|
type=api_pb2.WEBHOOK_TYPE_FUNCTION,
|
305
290
|
method=method,
|
306
291
|
web_endpoint_docs=docs,
|
@@ -358,7 +343,7 @@ def _web_endpoint(
|
|
358
343
|
return _PartialFunction(
|
359
344
|
raw_f,
|
360
345
|
_PartialFunctionFlags.FUNCTION,
|
361
|
-
api_pb2.WebhookConfig(
|
346
|
+
webhook_config=api_pb2.WebhookConfig(
|
362
347
|
type=api_pb2.WEBHOOK_TYPE_FUNCTION,
|
363
348
|
method=method,
|
364
349
|
web_endpoint_docs=docs,
|
@@ -428,7 +413,7 @@ def _asgi_app(
|
|
428
413
|
return _PartialFunction(
|
429
414
|
raw_f,
|
430
415
|
_PartialFunctionFlags.FUNCTION,
|
431
|
-
api_pb2.WebhookConfig(
|
416
|
+
webhook_config=api_pb2.WebhookConfig(
|
432
417
|
type=api_pb2.WEBHOOK_TYPE_ASGI_APP,
|
433
418
|
requested_suffix=label,
|
434
419
|
async_mode=api_pb2.WEBHOOK_ASYNC_MODE_AUTO,
|
@@ -496,7 +481,7 @@ def _wsgi_app(
|
|
496
481
|
return _PartialFunction(
|
497
482
|
raw_f,
|
498
483
|
_PartialFunctionFlags.FUNCTION,
|
499
|
-
api_pb2.WebhookConfig(
|
484
|
+
webhook_config=api_pb2.WebhookConfig(
|
500
485
|
type=api_pb2.WEBHOOK_TYPE_WSGI_APP,
|
501
486
|
requested_suffix=label,
|
502
487
|
async_mode=api_pb2.WEBHOOK_ASYNC_MODE_AUTO,
|
@@ -551,7 +536,7 @@ def _web_server(
|
|
551
536
|
return _PartialFunction(
|
552
537
|
raw_f,
|
553
538
|
_PartialFunctionFlags.FUNCTION,
|
554
|
-
api_pb2.WebhookConfig(
|
539
|
+
webhook_config=api_pb2.WebhookConfig(
|
555
540
|
type=api_pb2.WEBHOOK_TYPE_WEB_SERVER,
|
556
541
|
requested_suffix=label,
|
557
542
|
async_mode=api_pb2.WEBHOOK_ASYNC_MODE_AUTO,
|
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.84"
|
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.84"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
modal/partial_function.pyi
CHANGED
@@ -13,7 +13,6 @@ class PartialFunction(
|
|
13
13
|
flags: modal._partial_function._PartialFunctionFlags
|
14
14
|
webhook_config: typing.Optional[modal_proto.api_pb2.WebhookConfig]
|
15
15
|
is_generator: bool
|
16
|
-
keep_warm: typing.Optional[int]
|
17
16
|
batch_max_size: typing.Optional[int]
|
18
17
|
batch_wait_ms: typing.Optional[int]
|
19
18
|
force_build: bool
|
@@ -24,9 +23,9 @@ class PartialFunction(
|
|
24
23
|
self,
|
25
24
|
raw_f: collections.abc.Callable[modal._partial_function.P, modal._partial_function.ReturnType],
|
26
25
|
flags: modal._partial_function._PartialFunctionFlags,
|
26
|
+
*,
|
27
27
|
webhook_config: typing.Optional[modal_proto.api_pb2.WebhookConfig] = None,
|
28
28
|
is_generator: typing.Optional[bool] = None,
|
29
|
-
keep_warm: typing.Optional[int] = None,
|
30
29
|
batch_max_size: typing.Optional[int] = None,
|
31
30
|
batch_wait_ms: typing.Optional[int] = None,
|
32
31
|
cluster_size: typing.Optional[int] = None,
|
@@ -44,10 +43,7 @@ class PartialFunction(
|
|
44
43
|
def add_flags(self, flags) -> PartialFunction: ...
|
45
44
|
|
46
45
|
def method(
|
47
|
-
_warn_parentheses_missing=None,
|
48
|
-
*,
|
49
|
-
is_generator: typing.Optional[bool] = None,
|
50
|
-
keep_warm: typing.Optional[int] = None,
|
46
|
+
_warn_parentheses_missing=None, *, is_generator: typing.Optional[bool] = None
|
51
47
|
) -> modal._partial_function._MethodDecoratorType: ...
|
52
48
|
def web_endpoint(
|
53
49
|
_warn_parentheses_missing=None,
|
@@ -8,7 +8,7 @@ modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
|
8
8
|
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
9
9
|
modal/_object.py,sha256=ItQcsMNkz9Y3kdTsvfNarbW-paJ2qabDyQ7njaqY0XI,11359
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
|
-
modal/_partial_function.py,sha256=
|
11
|
+
modal/_partial_function.py,sha256=3rmdWxX2nmAJU4SSfhCE7IDHFNrKYHVVbuxBlK0cI_g,30023
|
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
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=PPYAQ7ts6PeJHcV2D5DWsJw-vfZzM4Rpnw7S2BNnEk8,45474
|
|
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=kCq-GfIM9Ahb4umbNkcEsLdhhxXnag6beolz8_FDzHw,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
|
@@ -57,7 +57,7 @@ modal/output.py,sha256=q4T9uHduunj4NwY-YSwkHGgjZlCXMuJbfQ5UFaAGRAc,1968
|
|
57
57
|
modal/parallel_map.py,sha256=POBTyiWabe2e4qBNlsjjksiu1AAPEsNqI-mM8cgNFco,16042
|
58
58
|
modal/parallel_map.pyi,sha256=-YKY_bVuQv8B4gtFrHnXtuNV0_JpmU9vqMJzR7beeCU,2524
|
59
59
|
modal/partial_function.py,sha256=uu8zvIV0Big0jiTlC4-VPL16dOScNB5jhfPeqxvvCrI,1117
|
60
|
-
modal/partial_function.pyi,sha256
|
60
|
+
modal/partial_function.pyi,sha256=-MAK61qJRi6Wjym-Measz5_9moJurYrJfdi7uSQZa5M,4936
|
61
61
|
modal/proxy.py,sha256=NrOevrWxG3G7-zlyRzG6BcIvop7AWLeyahZxitbBaOk,1418
|
62
62
|
modal/proxy.pyi,sha256=1OEKIVUyC-xb7fHMzngakQso0nTsK60TVhXtlcMj6Wk,390
|
63
63
|
modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -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=6NDydGuk5jv_G-VRhREbufmsEGLmjLJXrOSb7BiQmXU,149
|
172
|
+
modal-0.73.84.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
173
|
+
modal-0.73.84.dist-info/METADATA,sha256=JE85zuzg-i__LiV5KWYnDyYeYI_3_5oELXrh2BMgFns,2452
|
174
|
+
modal-0.73.84.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
175
|
+
modal-0.73.84.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
176
|
+
modal-0.73.84.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
177
|
+
modal-0.73.84.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|