modal 0.73.27__py3-none-any.whl → 0.73.29__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/__main__.py CHANGED
@@ -66,7 +66,7 @@ def main():
66
66
  title = "Error"
67
67
  content = str(exc)
68
68
  if notes := getattr(exc, "__notes__", []):
69
- content = f"{content}\n\nNote: {' ' .join(notes)}"
69
+ content = f"{content}\n\nNote: {' '.join(notes)}"
70
70
 
71
71
  console = Console(stderr=True)
72
72
  panel = Panel(Text(content), title=title, title_align="left", border_style="red")
@@ -24,6 +24,10 @@ from typing import TYPE_CHECKING, Any, Callable, Optional
24
24
  from google.protobuf.message import Message
25
25
 
26
26
  from modal._clustered_functions import initialize_clustered_function
27
+ from modal._partial_function import (
28
+ _find_callables_for_obj,
29
+ _PartialFunctionFlags,
30
+ )
27
31
  from modal._proxy_tunnel import proxy_tunnel
28
32
  from modal._serialization import deserialize_params
29
33
  from modal._utils.async_utils import TaskContext, synchronizer
@@ -34,10 +38,6 @@ from modal.app import App, _App
34
38
  from modal.client import Client, _Client
35
39
  from modal.config import logger
36
40
  from modal.exception import ExecutionError, InputCancellation, InvalidError
37
- from modal.partial_function import (
38
- _find_callables_for_obj,
39
- _PartialFunctionFlags,
40
- )
41
41
  from modal.running_app import RunningApp, running_app_from_layout
42
42
  from modal_proto import api_pb2
43
43
 
modal/_functions.py CHANGED
@@ -86,6 +86,7 @@ from .secret import _Secret
86
86
  from .volume import _Volume
87
87
 
88
88
  if TYPE_CHECKING:
89
+ import modal._partial_function
89
90
  import modal.app
90
91
  import modal.cls
91
92
  import modal.partial_function
@@ -397,15 +398,15 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
397
398
  _use_method_name: str = ""
398
399
 
399
400
  _class_parameter_info: Optional["api_pb2.ClassParameterInfo"] = None
400
- _method_handle_metadata: Optional[
401
- dict[str, "api_pb2.FunctionHandleMetadata"]
402
- ] = None # set for 0.67+ class service functions
401
+ _method_handle_metadata: Optional[dict[str, "api_pb2.FunctionHandleMetadata"]] = (
402
+ None # set for 0.67+ class service functions
403
+ )
403
404
 
404
405
  def _bind_method(
405
406
  self,
406
407
  user_cls,
407
408
  method_name: str,
408
- partial_function: "modal.partial_function._PartialFunction",
409
+ partial_function: "modal._partial_function._PartialFunction",
409
410
  ):
410
411
  """mdmd:hidden
411
412
 
@@ -480,7 +481,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
480
481
  ) -> "_Function":
481
482
  """mdmd:hidden"""
482
483
  # Needed to avoid circular imports
483
- from .partial_function import _find_partial_methods_for_user_cls, _PartialFunctionFlags
484
+ from ._partial_function import _find_partial_methods_for_user_cls, _PartialFunctionFlags
484
485
 
485
486
  tag = info.get_tag()
486
487