modal 0.73.27__py3-none-any.whl → 0.73.28__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.
@@ -10,10 +10,10 @@ import modal._runtime.container_io_manager
10
10
  import modal.cls
11
11
  from modal import Function
12
12
  from modal._functions import _Function
13
+ from modal._partial_function import _find_partial_methods_for_user_cls, _PartialFunctionFlags
13
14
  from modal._utils.async_utils import synchronizer
14
15
  from modal._utils.function_utils import LocalFunctionError, is_async as get_is_async, is_global_object
15
16
  from modal.exception import ExecutionError, InvalidError
16
- from modal.partial_function import _find_partial_methods_for_user_cls, _PartialFunctionFlags
17
17
  from modal_proto import api_pb2
18
18
 
19
19
  if typing.TYPE_CHECKING:
@@ -139,7 +139,7 @@ class ImportedClass(Service):
139
139
  app: Optional["modal.app._App"]
140
140
  code_deps: Optional[Sequence["modal._object._Object"]]
141
141
 
142
- _partial_functions: dict[str, "modal.partial_function._PartialFunction"]
142
+ _partial_functions: dict[str, "modal._partial_function._PartialFunction"]
143
143
 
144
144
  def get_finalized_functions(
145
145
  self, fun_def: api_pb2.Function, container_io_manager: "modal._runtime.container_io_manager.ContainerIOManager"
modal/app.py CHANGED
@@ -23,6 +23,11 @@ from modal_proto import api_pb2
23
23
  from ._functions import _Function
24
24
  from ._ipython import is_notebook
25
25
  from ._object import _get_environment_name, _Object
26
+ from ._partial_function import (
27
+ _find_partial_methods_for_user_cls,
28
+ _PartialFunction,
29
+ _PartialFunctionFlags,
30
+ )
26
31
  from ._utils.async_utils import synchronize_api
27
32
  from ._utils.deprecation import deprecation_error, deprecation_warning, renamed_parameter
28
33
  from ._utils.function_utils import FunctionInfo, is_global_object, is_method_fn
@@ -38,12 +43,7 @@ from .gpu import GPU_T
38
43
  from .image import _Image
39
44
  from .mount import _Mount
40
45
  from .network_file_system import _NetworkFileSystem
41
- from .partial_function import (
42
- PartialFunction,
43
- _find_partial_methods_for_user_cls,
44
- _PartialFunction,
45
- _PartialFunctionFlags,
46
- )
46
+ from .partial_function import PartialFunction
47
47
  from .proxy import _Proxy
48
48
  from .retries import Retries
49
49
  from .running_app import RunningApp
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.27"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.28"
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.27"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.28"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
modal/cls.py CHANGED
@@ -13,6 +13,12 @@ from modal_proto import api_pb2
13
13
 
14
14
  from ._functions import _Function, _parse_retries
15
15
  from ._object import _Object
16
+ from ._partial_function import (
17
+ _find_callables_for_obj,
18
+ _find_partial_methods_for_user_cls,
19
+ _PartialFunction,
20
+ _PartialFunctionFlags,
21
+ )
16
22
  from ._resolver import Resolver
17
23
  from ._resources import convert_fn_config_to_resources_config
18
24
  from ._serialization import check_valid_cls_constructor_arg
@@ -25,12 +31,6 @@ from .client import _Client
25
31
  from .config import config
26
32
  from .exception import ExecutionError, InvalidError, NotFoundError
27
33
  from .gpu import GPU_T
28
- from .partial_function import (
29
- _find_callables_for_obj,
30
- _find_partial_methods_for_user_cls,
31
- _PartialFunction,
32
- _PartialFunctionFlags,
33
- )
34
34
  from .retries import Retries
35
35
  from .secret import _Secret
36
36
  from .volume import _Volume
@@ -674,8 +674,7 @@ class _Cls(_Object, type_prefix="cs"):
674
674
  )
675
675
 
676
676
  def __getattr__(self, k):
677
- # Used by CLI and container entrypoint
678
- # TODO: remove this method - access to attributes on classes should be discouraged
677
+ # TODO: remove this method - access to attributes on classes (not instances) should be discouraged
679
678
  if k in self._method_functions:
680
679
  deprecation_warning(
681
680
  (2025, 1, 13),
modal/cls.pyi CHANGED
@@ -3,6 +3,7 @@ import google.protobuf.message
3
3
  import inspect
4
4
  import modal._functions
5
5
  import modal._object
6
+ import modal._partial_function
6
7
  import modal.app
7
8
  import modal.client
8
9
  import modal.functions
@@ -104,7 +105,7 @@ class _Cls(modal._object._Object):
104
105
 
105
106
  def _initialize_from_empty(self): ...
106
107
  def _initialize_from_other(self, other: _Cls): ...
107
- def _get_partial_functions(self) -> dict[str, modal.partial_function._PartialFunction]: ...
108
+ def _get_partial_functions(self) -> dict[str, modal._partial_function._PartialFunction]: ...
108
109
  def _get_app(self) -> modal.app._App: ...
109
110
  def _get_user_cls(self) -> type: ...
110
111
  def _get_name(self) -> str: ...
modal/experimental.py CHANGED
@@ -7,11 +7,11 @@ from modal_proto import api_pb2
7
7
  from ._clustered_functions import ClusterInfo, get_cluster_info as _get_cluster_info
8
8
  from ._functions import _Function
9
9
  from ._object import _get_environment_name
10
+ from ._partial_function import _PartialFunction, _PartialFunctionFlags
10
11
  from ._runtime.container_io_manager import _ContainerIOManager
11
12
  from ._utils.async_utils import synchronizer
12
13
  from .client import _Client
13
14
  from .exception import InvalidError
14
- from .partial_function import _PartialFunction, _PartialFunctionFlags
15
15
 
16
16
 
17
17
  def stop_fetching_inputs():