modal 0.73.145__py3-none-any.whl → 0.73.147__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/_functions.py CHANGED
@@ -564,7 +564,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
564
564
  network_file_systems=network_file_systems,
565
565
  volumes=volumes,
566
566
  memory=memory,
567
- timeout=pf.build_timeout,
567
+ timeout=pf.params.build_timeout,
568
568
  cpu=cpu,
569
569
  ephemeral_disk=ephemeral_disk,
570
570
  is_builder_function=True,
@@ -575,7 +575,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
575
575
  image = _Image._from_args(
576
576
  base_images={"base": image},
577
577
  build_function=snapshot_function,
578
- force_build=image.force_build or pf.force_build,
578
+ force_build=image.force_build or bool(pf.params.force_build),
579
579
  )
580
580
 
581
581
  # Note that we also do these checks in FunctionCreate; could drop them here
@@ -644,12 +644,14 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
644
644
 
645
645
  if info.user_cls:
646
646
  method_definitions = {}
647
- partial_functions = _find_partial_methods_for_user_cls(info.user_cls, _PartialFunctionFlags.FUNCTION)
648
- for method_name, partial_function in partial_functions.items():
649
- function_type = get_function_type(partial_function.is_generator)
647
+ interface_methods = _find_partial_methods_for_user_cls(
648
+ info.user_cls, _PartialFunctionFlags.interface_flags()
649
+ )
650
+ for method_name, partial_function in interface_methods.items():
651
+ function_type = get_function_type(partial_function.params.is_generator)
650
652
  function_name = f"{info.user_cls.__name__}.{method_name}"
651
653
  method_definition = api_pb2.MethodDefinition(
652
- webhook_config=partial_function.webhook_config,
654
+ webhook_config=partial_function.params.webhook_config,
653
655
  function_type=function_type,
654
656
  function_name=function_name,
655
657
  )