modal 1.0.0.dev11__py3-none-any.whl → 1.0.0.dev13__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/mount.py +1 -62
- modal/mount.pyi +0 -1
- {modal-1.0.0.dev11.dist-info → modal-1.0.0.dev13.dist-info}/METADATA +1 -1
- {modal-1.0.0.dev11.dist-info → modal-1.0.0.dev13.dist-info}/RECORD +13 -13
- modal_proto/api.proto +8 -0
- modal_proto/api_pb2.py +574 -574
- modal_proto/api_pb2.pyi +21 -3
- modal_version/__init__.py +1 -1
- {modal-1.0.0.dev11.dist-info → modal-1.0.0.dev13.dist-info}/WHEEL +0 -0
- {modal-1.0.0.dev11.dist-info → modal-1.0.0.dev13.dist-info}/entry_points.txt +0 -0
- {modal-1.0.0.dev11.dist-info → modal-1.0.0.dev13.dist-info}/licenses/LICENSE +0 -0
- {modal-1.0.0.dev11.dist-info → modal-1.0.0.dev13.dist-info}/top_level.txt +0 -0
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.dev13",
|
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.dev13",
|
98
98
|
): ...
|
99
99
|
def is_closed(self) -> bool: ...
|
100
100
|
@property
|
modal/mount.py
CHANGED
@@ -5,9 +5,6 @@ import concurrent.futures
|
|
5
5
|
import dataclasses
|
6
6
|
import os
|
7
7
|
import re
|
8
|
-
import site
|
9
|
-
import sys
|
10
|
-
import sysconfig
|
11
8
|
import time
|
12
9
|
import typing
|
13
10
|
import warnings
|
@@ -32,7 +29,7 @@ from ._utils.name_utils import check_object_name
|
|
32
29
|
from ._utils.package_utils import get_module_mount_info
|
33
30
|
from .client import _Client
|
34
31
|
from .config import config, logger
|
35
|
-
from .exception import ExecutionError, InvalidError
|
32
|
+
from .exception import ExecutionError, InvalidError
|
36
33
|
from .file_pattern_matcher import FilePatternMatcher
|
37
34
|
|
38
35
|
ROOT_DIR: PurePosixPath = PurePosixPath("/root")
|
@@ -800,22 +797,6 @@ def _get_client_mount():
|
|
800
797
|
return _Mount.from_name(client_mount_name(), namespace=api_pb2.DEPLOYMENT_NAMESPACE_GLOBAL)
|
801
798
|
|
802
799
|
|
803
|
-
SYS_PREFIXES = {
|
804
|
-
Path(p)
|
805
|
-
for p in (
|
806
|
-
sys.prefix,
|
807
|
-
sys.base_prefix,
|
808
|
-
sys.exec_prefix,
|
809
|
-
sys.base_exec_prefix,
|
810
|
-
*sysconfig.get_paths().values(),
|
811
|
-
*site.getsitepackages(),
|
812
|
-
site.getusersitepackages(),
|
813
|
-
)
|
814
|
-
}
|
815
|
-
|
816
|
-
|
817
|
-
SYS_PREFIXES |= {p.resolve() for p in SYS_PREFIXES}
|
818
|
-
|
819
800
|
MODAL_PACKAGES = ["modal", "modal_proto", "modal_version"]
|
820
801
|
|
821
802
|
|
@@ -829,45 +810,3 @@ def _is_modal_path(remote_path: PurePosixPath):
|
|
829
810
|
if is_modal_path:
|
830
811
|
return True
|
831
812
|
return False
|
832
|
-
|
833
|
-
|
834
|
-
def get_sys_modules_mounts() -> dict[str, _Mount]:
|
835
|
-
"""mdmd:hidden
|
836
|
-
|
837
|
-
Auto-mount local modules that have been imported in global scope.
|
838
|
-
This may or may not include the "entrypoint" of the function as well, depending on how modal is invoked
|
839
|
-
Note: sys.modules may change during the iteration
|
840
|
-
"""
|
841
|
-
auto_mounts = {}
|
842
|
-
top_level_modules = []
|
843
|
-
skip_prefixes = set()
|
844
|
-
for name, module in sorted(sys.modules.items(), key=lambda kv: len(kv[0])):
|
845
|
-
parent = name.rsplit(".")[0]
|
846
|
-
if parent and parent in skip_prefixes:
|
847
|
-
skip_prefixes.add(name)
|
848
|
-
continue
|
849
|
-
skip_prefixes.add(name)
|
850
|
-
top_level_modules.append((name, module))
|
851
|
-
|
852
|
-
for module_name, module in top_level_modules:
|
853
|
-
if module_name.startswith("__"):
|
854
|
-
# skip "built in" modules like __main__ and __mp_main__
|
855
|
-
# the running function's main file should be included anyway
|
856
|
-
continue
|
857
|
-
|
858
|
-
try:
|
859
|
-
# at this point we don't know if the sys.modules module should be mounted or not
|
860
|
-
potential_mount = _Mount._from_local_python_packages(module_name)
|
861
|
-
mount_paths = potential_mount._top_level_paths()
|
862
|
-
except ModuleNotMountable:
|
863
|
-
# this typically happens if the module is a built-in, has binary components or doesn't exist
|
864
|
-
continue
|
865
|
-
|
866
|
-
for local_path, remote_path in mount_paths:
|
867
|
-
if any(local_path.is_relative_to(p) for p in SYS_PREFIXES) or _is_modal_path(remote_path):
|
868
|
-
# skip any module that has paths in SYS_PREFIXES, or would overwrite the modal Package in the container
|
869
|
-
break
|
870
|
-
else:
|
871
|
-
auto_mounts[module_name] = potential_mount
|
872
|
-
|
873
|
-
return auto_mounts
|
modal/mount.pyi
CHANGED
@@ -308,7 +308,6 @@ def _create_client_mount(): ...
|
|
308
308
|
def create_client_mount(): ...
|
309
309
|
def _get_client_mount(): ...
|
310
310
|
def _is_modal_path(remote_path: pathlib.PurePosixPath): ...
|
311
|
-
def get_sys_modules_mounts() -> dict[str, _Mount]: ...
|
312
311
|
|
313
312
|
ROOT_DIR: pathlib.PurePosixPath
|
314
313
|
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=HuZu6c3CExccRcBfA7Geh-c_ajWGHB2w0xlVyDIVXlg,48146
|
|
22
22
|
modal/app.pyi,sha256=JT6UkaK3bq9TTYLtxHmjApmuEPHM6XZvLCSaCEAIm0E,24219
|
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=0jUuxl77v1QKbUchfGvC6PLIkLtLXDeaMMiq2EfZih0,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
|
@@ -45,8 +45,8 @@ modal/image.py,sha256=glnu6LDf3iFq71CGVstHx40CKVN4rw8tukPLAy5JgTQ,92464
|
|
45
45
|
modal/image.pyi,sha256=NbegOjy6QX_SL-eTxtJm1_4gOJHW04Ja449QHZIdKgU,25586
|
46
46
|
modal/io_streams.py,sha256=YDZVQSDv05DeXg5TwcucC9Rj5hQBx2GXdluan9rIUpw,15467
|
47
47
|
modal/io_streams.pyi,sha256=1UK6kWLREASQfq-wL9wSp5iqjLU0egRZPDn4LXs1PZY,5136
|
48
|
-
modal/mount.py,sha256=
|
49
|
-
modal/mount.pyi,sha256=
|
48
|
+
modal/mount.py,sha256=HbpGQbqqT5pTP4dh8j6USWXb2Fr1ro3V1uHIardkya4,30726
|
49
|
+
modal/mount.pyi,sha256=_qDhjR8Xg0ArdCw0JCivhhLCQO-Q-n_RlG5Ct4yJBQ0,12528
|
50
50
|
modal/network_file_system.py,sha256=lgtmHYjzA5gDMx0tysH0-WJB2Ao9JD2W15NyYK2A7_w,14612
|
51
51
|
modal/network_file_system.pyi,sha256=58DiUqHGlARmI3cz-Yo7IFObKKFIiGh5UIU5JxGNFfc,8333
|
52
52
|
modal/object.py,sha256=bTeskuY8JFrESjU4_UL_nTwYlBQdOLmVaOX3X6EMxsg,164
|
@@ -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.dev13.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
|
@@ -154,10 +154,10 @@ modal_docs/mdmd/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,2
|
|
154
154
|
modal_docs/mdmd/mdmd.py,sha256=Irx49MCCTlBOP4FBdLR--JrpA3-WhsVeriq0LGgsRic,6232
|
155
155
|
modal_docs/mdmd/signatures.py,sha256=XJaZrK7Mdepk5fdX51A8uENiLFNil85Ud0d4MH8H5f0,3218
|
156
156
|
modal_proto/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
157
|
-
modal_proto/api.proto,sha256=
|
157
|
+
modal_proto/api.proto,sha256=FsDsaAnxXchuynObvATVN_DK08L_n1ORfBgLGcvUtNA,95331
|
158
158
|
modal_proto/api_grpc.py,sha256=C0nQFKPCQN3lBeke1Xd7x4Jzd5m8RxnuFEoUxjIQIwA,115918
|
159
|
-
modal_proto/api_pb2.py,sha256=
|
160
|
-
modal_proto/api_pb2.pyi,sha256=
|
159
|
+
modal_proto/api_pb2.py,sha256=cuBgM8HFj2sRk1Irh7BI2J3gUqlntKFJnn3Btn9Xyz0,335440
|
160
|
+
modal_proto/api_pb2.pyi,sha256=xCmXaSAZ8woXRcsMebETr-giLcqN6c_BYuUhVXW8IuM,458857
|
161
161
|
modal_proto/api_pb2_grpc.py,sha256=dlQcjQVsUJN6cTG9JX6fxaB2iXUFyfhEF9VtQIh-yZE,250736
|
162
162
|
modal_proto/api_pb2_grpc.pyi,sha256=5j_xfVcvGDXmr9vpUQofD6aLpaI2ZfIdefB9jBHtqnE,58657
|
163
163
|
modal_proto/modal_api_grpc.py,sha256=kmpUqh6tc-mgqsZdH7JeFGrA4HULZggCSI2nDz65JvA,17532
|
@@ -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=KDl1gAKTJAFwbu0R-3n1vVySXBygsMOsKDB_-ac--a0,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.dev13.dist-info/METADATA,sha256=GfvGRsihZHkcIYf27x1X9-joU4kuNpyfOGss4W5TE90,2455
|
175
|
+
modal-1.0.0.dev13.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
176
|
+
modal-1.0.0.dev13.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
177
|
+
modal-1.0.0.dev13.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
178
|
+
modal-1.0.0.dev13.dist-info/RECORD,,
|
modal_proto/api.proto
CHANGED
@@ -1380,6 +1380,10 @@ message Function {
|
|
1380
1380
|
// Note the value type as string. Internally we'll coerce all values to string with str().
|
1381
1381
|
// On the server, it's necessary to convert back to the most natural type (e.g. int) when relevant.
|
1382
1382
|
map<string, string> experimental_options = 81;
|
1383
|
+
|
1384
|
+
// If set, client deps will be mounted into the container, and are
|
1385
|
+
// no longer expected to exist in the image itself.
|
1386
|
+
bool mount_client_dependencies = 82;
|
1383
1387
|
}
|
1384
1388
|
|
1385
1389
|
message FunctionAsyncInvokeRequest {
|
@@ -1946,6 +1950,10 @@ message ImageMetadata {
|
|
1946
1950
|
map<string, string> python_packages = 2;
|
1947
1951
|
// The work directory of the image, defaulting to "/". Not set if missing
|
1948
1952
|
optional string workdir = 3;
|
1953
|
+
// The image's libc version
|
1954
|
+
optional string libc_version_info = 4;
|
1955
|
+
// The builder version for/with which the image was created.
|
1956
|
+
optional string image_builder_version = 5;
|
1949
1957
|
}
|
1950
1958
|
|
1951
1959
|
|