modal 1.1.5.dev43__py3-none-any.whl → 1.1.5.dev44__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.
Potentially problematic release.
This version of modal might be problematic. Click here for more details.
- modal/client.pyi +2 -2
- modal/dict.py +15 -2
- modal/dict.pyi +22 -6
- modal/functions.pyi +6 -6
- {modal-1.1.5.dev43.dist-info → modal-1.1.5.dev44.dist-info}/METADATA +1 -1
- {modal-1.1.5.dev43.dist-info → modal-1.1.5.dev44.dist-info}/RECORD +11 -11
- modal_version/__init__.py +1 -1
- {modal-1.1.5.dev43.dist-info → modal-1.1.5.dev44.dist-info}/WHEEL +0 -0
- {modal-1.1.5.dev43.dist-info → modal-1.1.5.dev44.dist-info}/entry_points.txt +0 -0
- {modal-1.1.5.dev43.dist-info → modal-1.1.5.dev44.dist-info}/licenses/LICENSE +0 -0
- {modal-1.1.5.dev43.dist-info → modal-1.1.5.dev44.dist-info}/top_level.txt +0 -0
modal/client.pyi
CHANGED
|
@@ -33,7 +33,7 @@ class _Client:
|
|
|
33
33
|
server_url: str,
|
|
34
34
|
client_type: int,
|
|
35
35
|
credentials: typing.Optional[tuple[str, str]],
|
|
36
|
-
version: str = "1.1.5.
|
|
36
|
+
version: str = "1.1.5.dev44",
|
|
37
37
|
):
|
|
38
38
|
"""mdmd:hidden
|
|
39
39
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -164,7 +164,7 @@ class Client:
|
|
|
164
164
|
server_url: str,
|
|
165
165
|
client_type: int,
|
|
166
166
|
credentials: typing.Optional[tuple[str, str]],
|
|
167
|
-
version: str = "1.1.5.
|
|
167
|
+
version: str = "1.1.5.dev44",
|
|
168
168
|
):
|
|
169
169
|
"""mdmd:hidden
|
|
170
170
|
The Modal client object is not intended to be instantiated directly by users.
|
modal/dict.py
CHANGED
|
@@ -30,6 +30,14 @@ from .config import logger
|
|
|
30
30
|
from .exception import AlreadyExistsError, InvalidError, NotFoundError, RequestSizeError
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
class _NoDefaultSentinel:
|
|
34
|
+
def __repr__(self) -> str:
|
|
35
|
+
return "..."
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
_NO_DEFAULT = _NoDefaultSentinel()
|
|
39
|
+
|
|
40
|
+
|
|
33
41
|
def _serialize_dict(data):
|
|
34
42
|
return [api_pb2.DictEntry(key=serialize(k), value=serialize(v)) for k, v in data.items()]
|
|
35
43
|
|
|
@@ -543,11 +551,16 @@ class _Dict(_Object, type_prefix="di"):
|
|
|
543
551
|
return await self.put(key, value)
|
|
544
552
|
|
|
545
553
|
@live_method
|
|
546
|
-
async def pop(self, key: Any) -> Any:
|
|
547
|
-
"""Remove a key from the Dict, returning the value if it exists.
|
|
554
|
+
async def pop(self, key: Any, default: Any = _NO_DEFAULT) -> Any:
|
|
555
|
+
"""Remove a key from the Dict, returning the value if it exists.
|
|
556
|
+
|
|
557
|
+
If key is not found, return default if provided, otherwise raise KeyError.
|
|
558
|
+
"""
|
|
548
559
|
req = api_pb2.DictPopRequest(dict_id=self.object_id, key=serialize(key))
|
|
549
560
|
resp = await retry_transient_errors(self._client.stub.DictPop, req)
|
|
550
561
|
if not resp.found:
|
|
562
|
+
if default is not _NO_DEFAULT:
|
|
563
|
+
return default
|
|
551
564
|
raise KeyError(f"{key} not in dict {self.object_id}")
|
|
552
565
|
return deserialize(resp.value, self._client)
|
|
553
566
|
|
modal/dict.pyi
CHANGED
|
@@ -10,6 +10,13 @@ import synchronicity.combined_types
|
|
|
10
10
|
import typing
|
|
11
11
|
import typing_extensions
|
|
12
12
|
|
|
13
|
+
class _NoDefaultSentinel:
|
|
14
|
+
def __repr__(self) -> str:
|
|
15
|
+
"""Return repr(self)."""
|
|
16
|
+
...
|
|
17
|
+
|
|
18
|
+
_NO_DEFAULT: _NoDefaultSentinel
|
|
19
|
+
|
|
13
20
|
def _serialize_dict(data): ...
|
|
14
21
|
|
|
15
22
|
class DictInfo:
|
|
@@ -548,8 +555,11 @@ class _Dict(modal._object._Object):
|
|
|
548
555
|
"""
|
|
549
556
|
...
|
|
550
557
|
|
|
551
|
-
async def pop(self, key: typing.Any) -> typing.Any:
|
|
552
|
-
"""Remove a key from the Dict, returning the value if it exists.
|
|
558
|
+
async def pop(self, key: typing.Any, default: typing.Any = ...) -> typing.Any:
|
|
559
|
+
"""Remove a key from the Dict, returning the value if it exists.
|
|
560
|
+
|
|
561
|
+
If key is not found, return default if provided, otherwise raise KeyError.
|
|
562
|
+
"""
|
|
553
563
|
...
|
|
554
564
|
|
|
555
565
|
async def __delitem__(self, key: typing.Any) -> typing.Any:
|
|
@@ -918,12 +928,18 @@ class Dict(modal.object.Object):
|
|
|
918
928
|
__setitem__: ____setitem___spec[typing_extensions.Self]
|
|
919
929
|
|
|
920
930
|
class __pop_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
921
|
-
def __call__(self, /, key: typing.Any) -> typing.Any:
|
|
922
|
-
"""Remove a key from the Dict, returning the value if it exists.
|
|
931
|
+
def __call__(self, /, key: typing.Any, default: typing.Any = ...) -> typing.Any:
|
|
932
|
+
"""Remove a key from the Dict, returning the value if it exists.
|
|
933
|
+
|
|
934
|
+
If key is not found, return default if provided, otherwise raise KeyError.
|
|
935
|
+
"""
|
|
923
936
|
...
|
|
924
937
|
|
|
925
|
-
async def aio(self, /, key: typing.Any) -> typing.Any:
|
|
926
|
-
"""Remove a key from the Dict, returning the value if it exists.
|
|
938
|
+
async def aio(self, /, key: typing.Any, default: typing.Any = ...) -> typing.Any:
|
|
939
|
+
"""Remove a key from the Dict, returning the value if it exists.
|
|
940
|
+
|
|
941
|
+
If key is not found, return default if provided, otherwise raise KeyError.
|
|
942
|
+
"""
|
|
927
943
|
...
|
|
928
944
|
|
|
929
945
|
pop: __pop_spec[typing_extensions.Self]
|
modal/functions.pyi
CHANGED
|
@@ -449,7 +449,7 @@ class Function(
|
|
|
449
449
|
|
|
450
450
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
|
451
451
|
|
|
452
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
452
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
453
453
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
454
454
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
455
455
|
...
|
|
@@ -458,7 +458,7 @@ class Function(
|
|
|
458
458
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
459
459
|
...
|
|
460
460
|
|
|
461
|
-
remote: __remote_spec[modal._functions.
|
|
461
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
462
462
|
|
|
463
463
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
464
464
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -485,7 +485,7 @@ class Function(
|
|
|
485
485
|
"""
|
|
486
486
|
...
|
|
487
487
|
|
|
488
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
488
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
489
489
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
490
490
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
491
491
|
|
|
@@ -509,7 +509,7 @@ class Function(
|
|
|
509
509
|
...
|
|
510
510
|
|
|
511
511
|
_experimental_spawn: ___experimental_spawn_spec[
|
|
512
|
-
modal._functions.
|
|
512
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
|
513
513
|
]
|
|
514
514
|
|
|
515
515
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
|
@@ -518,7 +518,7 @@ class Function(
|
|
|
518
518
|
|
|
519
519
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
|
520
520
|
|
|
521
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
521
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
522
522
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
523
523
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
524
524
|
|
|
@@ -539,7 +539,7 @@ class Function(
|
|
|
539
539
|
"""
|
|
540
540
|
...
|
|
541
541
|
|
|
542
|
-
spawn: __spawn_spec[modal._functions.
|
|
542
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
543
543
|
|
|
544
544
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
545
545
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=OBFaL-8KVMtBMEmspHA76LvblPdnSgdoGioLkQBjhdQ,48851
|
|
|
22
22
|
modal/app.pyi,sha256=Cqk3pOeEEroCLejj3yJ3XHDqt0rMzeSA295gMKEx6Ww,43955
|
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
|
24
24
|
modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
|
|
25
|
-
modal/client.pyi,sha256=
|
|
25
|
+
modal/client.pyi,sha256=IOo9lNqInnVAPZe6hY583DiFCUXP-ANjdfLFv-Zei-I,15831
|
|
26
26
|
modal/cloud_bucket_mount.py,sha256=I2GRXYhOWLIz2kJZjXu75jAm9EJkBNcutGc6jR2ReUw,5928
|
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=VuUOipMIHqFXMkD-3g2bsoqpSxV5qswlFHDOqPQzYAo,7405
|
|
28
28
|
modal/cls.py,sha256=R1uLQbdqWRRjvxs0I57a4hZZELZkBVCxOKxvKryU5_s,41639
|
|
@@ -30,8 +30,8 @@ modal/cls.pyi,sha256=PRvC9lWIBL-L4cMc9cIt8I_ZDXI7oFttitKaFWWwhUk,29709
|
|
|
30
30
|
modal/config.py,sha256=hpcfT03tdB-G0exZ4HjYDHwDtA8XcnliiyZzCcTbr8o,12124
|
|
31
31
|
modal/container_process.py,sha256=Mutkl7sg_WR5zP4oJiWSC-3UdYRqp0zdKi1shZbi-bk,6996
|
|
32
32
|
modal/container_process.pyi,sha256=9m-st3hCUlNN1GOTctfPPvIvoLtEl7FbuGWwif5-7YU,6037
|
|
33
|
-
modal/dict.py,sha256=
|
|
34
|
-
modal/dict.pyi,sha256=
|
|
33
|
+
modal/dict.py,sha256=PGtZWy1F72qkoYu6_6chXLFQczobZwZyCxYle0vEd-o,22988
|
|
34
|
+
modal/dict.pyi,sha256=vlNhkQefMUrktVHYeWds1IZDwAw9LYiJslDI_lYqPoA,34087
|
|
35
35
|
modal/environments.py,sha256=gHFNLG78bqgizpQ4w_elz27QOqmcgAonFsmLs7NjUJ4,6804
|
|
36
36
|
modal/environments.pyi,sha256=9-KtrzAcUe55cCP4020lSUD7-fWS7OPakAHssq4-bro,4219
|
|
37
37
|
modal/exception.py,sha256=o0V93PK8Hcg2YQ2aeOB1Y-qWBw4Gz5ATfyokR8GapuQ,5634
|
|
@@ -39,7 +39,7 @@ modal/file_io.py,sha256=OSKr77TujcXGJW1iikzYiHckLSmv07QBgBHcxxYEkoI,21456
|
|
|
39
39
|
modal/file_io.pyi,sha256=xtO6Glf_BFwDE7QiQQo24QqcMf_Vv-iz7WojcGVlLBU,15932
|
|
40
40
|
modal/file_pattern_matcher.py,sha256=A_Kdkej6q7YQyhM_2-BvpFmPqJ0oHb54B6yf9VqvPVE,8116
|
|
41
41
|
modal/functions.py,sha256=kcNHvqeGBxPI7Cgd57NIBBghkfbeFJzXO44WW0jSmao,325
|
|
42
|
-
modal/functions.pyi,sha256=
|
|
42
|
+
modal/functions.pyi,sha256=_xKitEUTNQStdZVtYBgWidtyHHsnjXUYgbirM0eMDyM,39558
|
|
43
43
|
modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
|
|
44
44
|
modal/image.py,sha256=ioYIpKq4Fi1ojqdIyochyoRU1_Ncto_BSYLKzY88zuw,107883
|
|
45
45
|
modal/image.pyi,sha256=ZNp48mVPzcQ6XNvxin1iO5XrZ89vfEZvU1Bi-V57jq0,76835
|
|
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=fCqzo_f3vcY750vHtd7CtLs5dvdM_C0ZLLGb3zXuK9
|
|
|
153
153
|
modal/experimental/flash.py,sha256=7qRAL2Nrwbb60YKobcnpM0zJ8vw4xGJqabLPFgEzMZE,28295
|
|
154
154
|
modal/experimental/flash.pyi,sha256=R9VV0UDotiY9BRUjacB-xI4qhR3yBymAvEZFRFHztLs,15143
|
|
155
155
|
modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
|
|
156
|
-
modal-1.1.5.
|
|
156
|
+
modal-1.1.5.dev44.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
157
157
|
modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
|
|
158
158
|
modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
|
|
159
159
|
modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
|
|
@@ -182,10 +182,10 @@ modal_proto/sandbox_router_pb2.py,sha256=INd9izYaIYqllESQt4MSv2Rj9Hf5bMjAvtCc9b4
|
|
|
182
182
|
modal_proto/sandbox_router_pb2.pyi,sha256=YCK0WnCgRos3-p7t4USQQ7x6WAuM278yeQX2IeU5mLg,13295
|
|
183
183
|
modal_proto/sandbox_router_pb2_grpc.py,sha256=zonC5flvCwxeZYJPENj1IJo2Mr0J58DpoC1_8IdPYik,8243
|
|
184
184
|
modal_proto/sandbox_router_pb2_grpc.pyi,sha256=4QgCB9b7_ykvH8YD-hfnogVH9CLyHVDC5QNb03l4_X8,2735
|
|
185
|
-
modal_version/__init__.py,sha256=
|
|
185
|
+
modal_version/__init__.py,sha256=isX0xgSwVTpW1el4-PG6zkykdFDxDNzaHrfggIcX-2k,121
|
|
186
186
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
|
187
|
-
modal-1.1.5.
|
|
188
|
-
modal-1.1.5.
|
|
189
|
-
modal-1.1.5.
|
|
190
|
-
modal-1.1.5.
|
|
191
|
-
modal-1.1.5.
|
|
187
|
+
modal-1.1.5.dev44.dist-info/METADATA,sha256=s31Bo3Ji-_ftZBHGCfAVQMvoGy7xQ7b5SlQbkS667R4,2460
|
|
188
|
+
modal-1.1.5.dev44.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
189
|
+
modal-1.1.5.dev44.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
|
190
|
+
modal-1.1.5.dev44.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
|
191
|
+
modal-1.1.5.dev44.dist-info/RECORD,,
|
modal_version/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|