modal 0.73.159__py3-none-any.whl → 0.73.161__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/_runtime/asgi.py CHANGED
@@ -473,7 +473,7 @@ async def _proxy_lifespan_request(base_url, scope, receive, send) -> None:
473
473
  read_bufsize=1024 * 1024, # 1 MiB
474
474
  connector=aiohttp.TCPConnector(
475
475
  limit=1000
476
- ), # 100 is the default max, but 1000 is the max for `allow_concurrent_inputs`.
476
+ ), # 100 is the default max, but 1000 is the max for `@modal.concurrent`.
477
477
  # Note: these values will need to be kept in sync.
478
478
  **(
479
479
  # These options were introduced in aiohttp 3.9, and we can remove the
modal/app.py CHANGED
@@ -598,7 +598,6 @@ class _App:
598
598
  scaledown_window: Optional[int] = None, # Max amount of time a container can remain idle before scaling down.
599
599
  proxy: Optional[_Proxy] = None, # Reference to a Modal Proxy to use in front of this function.
600
600
  retries: Optional[Union[int, Retries]] = None, # Number of times to retry each input in case of failure.
601
- allow_concurrent_inputs: Optional[int] = None, # Number of inputs the container may fetch to run concurrently.
602
601
  timeout: Optional[int] = None, # Maximum execution time of the function in seconds.
603
602
  name: Optional[str] = None, # Sets the Modal name of the function within the app
604
603
  is_generator: Optional[
@@ -625,6 +624,7 @@ class _App:
625
624
  keep_warm: Optional[int] = None, # Replaced with `min_containers`
626
625
  concurrency_limit: Optional[int] = None, # Replaced with `max_containers`
627
626
  container_idle_timeout: Optional[int] = None, # Replaced with `scaledown_window`
627
+ allow_concurrent_inputs: Optional[int] = None, # Replaced with the `@modal.concurrent` decorator
628
628
  _experimental_buffer_containers: Optional[int] = None, # Now stable API with `buffer_containers`
629
629
  ) -> _FunctionDecoratorType:
630
630
  """Decorator to register a new Modal [Function](/docs/reference/modal.Function) with this App."""
@@ -637,6 +637,14 @@ class _App:
637
637
  if image is None:
638
638
  image = self._get_default_image()
639
639
 
640
+ if allow_concurrent_inputs is not None:
641
+ deprecation_warning(
642
+ (2025, 4, 9),
643
+ "The `allow_concurrent_inputs` parameter is deprecated."
644
+ " Please use the `@modal.concurrent` decorator instead."
645
+ "\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
646
+ )
647
+
640
648
  secrets = [*self._secrets, *secrets]
641
649
 
642
650
  def wrapped(
@@ -819,7 +827,6 @@ class _App:
819
827
  scaledown_window: Optional[int] = None, # Max amount of time a container can remain idle before scaling down.
820
828
  proxy: Optional[_Proxy] = None, # Reference to a Modal Proxy to use in front of this function.
821
829
  retries: Optional[Union[int, Retries]] = None, # Number of times to retry each input in case of failure.
822
- allow_concurrent_inputs: Optional[int] = None, # Number of inputs the container may fetch to run concurrently.
823
830
  timeout: Optional[int] = None, # Maximum execution time of the function in seconds.
824
831
  cloud: Optional[str] = None, # Cloud provider to run the function on. Possible values are aws, gcp, oci, auto.
825
832
  region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the function on.
@@ -840,6 +847,7 @@ class _App:
840
847
  keep_warm: Optional[int] = None, # Replaced with `min_containers`
841
848
  concurrency_limit: Optional[int] = None, # Replaced with `max_containers`
842
849
  container_idle_timeout: Optional[int] = None, # Replaced with `scaledown_window`
850
+ allow_concurrent_inputs: Optional[int] = None, # Replaced with the `@modal.concurrent` decorator
843
851
  _experimental_buffer_containers: Optional[int] = None, # Now stable API with `buffer_containers`
844
852
  ) -> Callable[[Union[CLS_T, _PartialFunction]], CLS_T]:
845
853
  """
@@ -854,6 +862,14 @@ class _App:
854
862
  raise InvalidError("`region` and `_experimental_scheduler_placement` cannot be used together")
855
863
  scheduler_placement = SchedulerPlacement(region=region)
856
864
 
865
+ if allow_concurrent_inputs is not None:
866
+ deprecation_warning(
867
+ (2025, 4, 9),
868
+ "The `allow_concurrent_inputs` parameter is deprecated."
869
+ " Please use the `@modal.concurrent` decorator instead."
870
+ "\n\nSee https://modal.com/docs/guide/modal-1-0-migration for more information.",
871
+ )
872
+
857
873
  def wrapper(wrapped_cls: Union[CLS_T, _PartialFunction]) -> CLS_T:
858
874
  # Check if the decorated object is a class
859
875
  if isinstance(wrapped_cls, _PartialFunction):
modal/app.pyi CHANGED
@@ -182,7 +182,6 @@ class _App:
182
182
  scaledown_window: typing.Optional[int] = None,
183
183
  proxy: typing.Optional[modal.proxy._Proxy] = None,
184
184
  retries: typing.Union[int, modal.retries.Retries, None] = None,
185
- allow_concurrent_inputs: typing.Optional[int] = None,
186
185
  timeout: typing.Optional[int] = None,
187
186
  name: typing.Optional[str] = None,
188
187
  is_generator: typing.Optional[bool] = None,
@@ -200,6 +199,7 @@ class _App:
200
199
  keep_warm: typing.Optional[int] = None,
201
200
  concurrency_limit: typing.Optional[int] = None,
202
201
  container_idle_timeout: typing.Optional[int] = None,
202
+ allow_concurrent_inputs: typing.Optional[int] = None,
203
203
  _experimental_buffer_containers: typing.Optional[int] = None,
204
204
  ) -> _FunctionDecoratorType: ...
205
205
  @typing_extensions.dataclass_transform(
@@ -232,7 +232,6 @@ class _App:
232
232
  scaledown_window: typing.Optional[int] = None,
233
233
  proxy: typing.Optional[modal.proxy._Proxy] = None,
234
234
  retries: typing.Union[int, modal.retries.Retries, None] = None,
235
- allow_concurrent_inputs: typing.Optional[int] = None,
236
235
  timeout: typing.Optional[int] = None,
237
236
  cloud: typing.Optional[str] = None,
238
237
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
@@ -247,6 +246,7 @@ class _App:
247
246
  keep_warm: typing.Optional[int] = None,
248
247
  concurrency_limit: typing.Optional[int] = None,
249
248
  container_idle_timeout: typing.Optional[int] = None,
249
+ allow_concurrent_inputs: typing.Optional[int] = None,
250
250
  _experimental_buffer_containers: typing.Optional[int] = None,
251
251
  ) -> collections.abc.Callable[[typing.Union[CLS_T, modal._partial_function._PartialFunction]], CLS_T]: ...
252
252
  async def spawn_sandbox(
@@ -422,7 +422,6 @@ class App:
422
422
  scaledown_window: typing.Optional[int] = None,
423
423
  proxy: typing.Optional[modal.proxy.Proxy] = None,
424
424
  retries: typing.Union[int, modal.retries.Retries, None] = None,
425
- allow_concurrent_inputs: typing.Optional[int] = None,
426
425
  timeout: typing.Optional[int] = None,
427
426
  name: typing.Optional[str] = None,
428
427
  is_generator: typing.Optional[bool] = None,
@@ -440,6 +439,7 @@ class App:
440
439
  keep_warm: typing.Optional[int] = None,
441
440
  concurrency_limit: typing.Optional[int] = None,
442
441
  container_idle_timeout: typing.Optional[int] = None,
442
+ allow_concurrent_inputs: typing.Optional[int] = None,
443
443
  _experimental_buffer_containers: typing.Optional[int] = None,
444
444
  ) -> _FunctionDecoratorType: ...
445
445
  @typing_extensions.dataclass_transform(
@@ -472,7 +472,6 @@ class App:
472
472
  scaledown_window: typing.Optional[int] = None,
473
473
  proxy: typing.Optional[modal.proxy.Proxy] = None,
474
474
  retries: typing.Union[int, modal.retries.Retries, None] = None,
475
- allow_concurrent_inputs: typing.Optional[int] = None,
476
475
  timeout: typing.Optional[int] = None,
477
476
  cloud: typing.Optional[str] = None,
478
477
  region: typing.Union[str, collections.abc.Sequence[str], None] = None,
@@ -487,6 +486,7 @@ class App:
487
486
  keep_warm: typing.Optional[int] = None,
488
487
  concurrency_limit: typing.Optional[int] = None,
489
488
  container_idle_timeout: typing.Optional[int] = None,
489
+ allow_concurrent_inputs: typing.Optional[int] = None,
490
490
  _experimental_buffer_containers: typing.Optional[int] = None,
491
491
  ) -> collections.abc.Callable[[typing.Union[CLS_T, modal.partial_function.PartialFunction]], CLS_T]: ...
492
492
 
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 = "0.73.159",
34
+ version: str = "0.73.161",
35
35
  ): ...
36
36
  def is_closed(self) -> bool: ...
37
37
  @property
@@ -93,7 +93,7 @@ class Client:
93
93
  server_url: str,
94
94
  client_type: int,
95
95
  credentials: typing.Optional[tuple[str, str]],
96
- version: str = "0.73.159",
96
+ version: str = "0.73.161",
97
97
  ): ...
98
98
  def is_closed(self) -> bool: ...
99
99
  @property
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 0.73.159
3
+ Version: 0.73.161
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -30,6 +30,7 @@ Requires-Dist: types-certifi
30
30
  Requires-Dist: types-toml
31
31
  Requires-Dist: watchfiles
32
32
  Requires-Dist: typing_extensions~=4.6
33
+ Dynamic: license-file
33
34
 
34
35
  # Modal Python Library
35
36
 
@@ -19,11 +19,11 @@ modal/_tunnel.py,sha256=zTBxBiuH1O22tS1OliAJdIsSmaZS8PlnifS_6S5z-mk,6320
19
19
  modal/_tunnel.pyi,sha256=JmmDYAy9F1FpgJ_hWx0xkom2nTOFQjn4mTPYlU3PFo4,1245
20
20
  modal/_type_manager.py,sha256=DWjgmjYJuOagw2erin506UUbG2H5UzZCFEekS-7hmfA,9087
21
21
  modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
22
- modal/app.py,sha256=w00bV9cjABAsS2ExE7zb1jY6Q_snXYmdKa3xRFg8iXA,47428
23
- modal/app.pyi,sha256=pUEqciyGZ446sc_QoG8XcQ_oc6oU-U4dqjkxjhgOX98,26968
22
+ modal/app.py,sha256=bJp7W3liuVG2VwWkG31tMFogDh84EKppzP8YJFWl3eQ,48140
23
+ modal/app.pyi,sha256=SkqXNrdnGIZ4MmNNvpGtzNLoUdyuvi9IjQQR_DRiRHk,26968
24
24
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
25
25
  modal/client.py,sha256=U-YKSw0n7J1ZLREt9cbEJCtmHe5YoPKFxl0xlkan2yc,15565
26
- modal/client.pyi,sha256=TE65rR-JEWtJhkSxNOsl0fr1IqDYd21AjD2aa5_xOtA,7661
26
+ modal/client.pyi,sha256=rfhbtDoBSiDssT9hBrUNCM_b6GhnaM4rDDlNxqrTTTw,7661
27
27
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
28
28
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
29
29
  modal/cls.py,sha256=8tvSw7QFTS1FnX2MXaxagu3KwuR6y_DMwhqHv3MZ0Nk,32963
@@ -82,7 +82,7 @@ modal/token_flow.pyi,sha256=0XV3d-9CGQL3qjPdw3RgwIFVqqxo8Z-u044_mkgAM3o,2064
82
82
  modal/volume.py,sha256=JAWeDvoAG95tMBv-fYIERyHsJPS_X_xGpxRRmYtb6j0,30096
83
83
  modal/volume.pyi,sha256=kTsXarphjZILXci84LQy7EyC84eXUs5-7D62IM5q3eE,12491
84
84
  modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
85
- modal/_runtime/asgi.py,sha256=vmbrREjdCnxAeUyoUd1vtv7PfcR86IR0R2Jp1J6rEok,22435
85
+ modal/_runtime/asgi.py,sha256=KNarxvZI9z8fnmZl2vbkWTjnoLXs9kqOahkrbsTLkyc,22429
86
86
  modal/_runtime/container_io_manager.py,sha256=-EpE47kL759b87SsQaaGMuqRBbvS8gRHoyAOIKzGRTY,44045
87
87
  modal/_runtime/container_io_manager.pyi,sha256=wRd2wHMFru0NmNgiCBVdDTrJGkeVZsZvWwA1fzn8wi8,17009
88
88
  modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
@@ -146,6 +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-0.73.161.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
149
150
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
150
151
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
151
152
  modal_docs/gen_reference_docs.py,sha256=cvTgltucqYLLIX84QxAwf51Z5Vc2n6cLxS8VcrxNCAo,6401
@@ -170,10 +171,9 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
170
171
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
171
172
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
172
173
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
173
- modal_version/_version_generated.py,sha256=G2ne8nDuU_4SoCtLuOAJRnbZo3wKwxhaEnQrw0W6Efw,150
174
- modal-0.73.159.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
175
- modal-0.73.159.dist-info/METADATA,sha256=MraIsGfyaQsXi1lj19eWqdlSeIz3LFAvA0mcxNdUW-U,2453
176
- modal-0.73.159.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
177
- modal-0.73.159.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
- modal-0.73.159.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
- modal-0.73.159.dist-info/RECORD,,
174
+ modal_version/_version_generated.py,sha256=knYOGBBkTjTNuUs3r5KxvmiRvBonv8KhUzpP1A-GUCw,150
175
+ modal-0.73.161.dist-info/METADATA,sha256=YhCVtQL8KYAyQfSerc4yQlO6p7Z9WM6Q-FkMxna4ww4,2475
176
+ modal-0.73.161.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
177
+ modal-0.73.161.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
+ modal-0.73.161.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
+ modal-0.73.161.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 159 # git: 274a6be
4
+ build_number = 161 # git: c909c8b