modal 0.67.1__py3-none-any.whl → 0.67.33__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.
Files changed (113) hide show
  1. modal/_clustered_functions.py +2 -2
  2. modal/_clustered_functions.pyi +2 -2
  3. modal/_container_entrypoint.py +8 -5
  4. modal/_output.py +29 -28
  5. modal/_pty.py +2 -2
  6. modal/_resolver.py +6 -5
  7. modal/_resources.py +3 -3
  8. modal/_runtime/asgi.py +46 -6
  9. modal/_runtime/container_io_manager.py +22 -26
  10. modal/_runtime/execution_context.py +2 -2
  11. modal/_runtime/telemetry.py +1 -2
  12. modal/_runtime/user_code_imports.py +12 -14
  13. modal/_serialization.py +3 -7
  14. modal/_traceback.py +5 -5
  15. modal/_tunnel.py +5 -4
  16. modal/_tunnel.pyi +2 -2
  17. modal/_utils/async_utils.py +53 -17
  18. modal/_utils/blob_utils.py +22 -7
  19. modal/_utils/function_utils.py +20 -10
  20. modal/_utils/grpc_testing.py +7 -6
  21. modal/_utils/grpc_utils.py +2 -3
  22. modal/_utils/hash_utils.py +2 -2
  23. modal/_utils/mount_utils.py +5 -4
  24. modal/_utils/package_utils.py +2 -3
  25. modal/_utils/pattern_matcher.py +6 -6
  26. modal/_utils/rand_pb_testing.py +3 -3
  27. modal/_utils/shell_utils.py +2 -1
  28. modal/_vendor/a2wsgi_wsgi.py +62 -72
  29. modal/_vendor/cloudpickle.py +1 -1
  30. modal/_watcher.py +8 -7
  31. modal/app.py +68 -62
  32. modal/app.pyi +104 -99
  33. modal/call_graph.py +6 -6
  34. modal/cli/_download.py +3 -2
  35. modal/cli/_traceback.py +4 -4
  36. modal/cli/app.py +4 -4
  37. modal/cli/container.py +4 -4
  38. modal/cli/dict.py +1 -1
  39. modal/cli/environment.py +2 -3
  40. modal/cli/import_refs.py +1 -1
  41. modal/cli/launch.py +2 -2
  42. modal/cli/network_file_system.py +1 -1
  43. modal/cli/profile.py +1 -1
  44. modal/cli/programs/run_jupyter.py +2 -2
  45. modal/cli/programs/vscode.py +3 -3
  46. modal/cli/queues.py +1 -1
  47. modal/cli/run.py +6 -6
  48. modal/cli/secret.py +3 -3
  49. modal/cli/utils.py +2 -1
  50. modal/cli/volume.py +3 -3
  51. modal/client.py +6 -11
  52. modal/client.pyi +18 -27
  53. modal/cloud_bucket_mount.py +3 -3
  54. modal/cloud_bucket_mount.pyi +2 -2
  55. modal/cls.py +100 -47
  56. modal/cls.pyi +40 -40
  57. modal/config.py +3 -2
  58. modal/container_process.py +6 -2
  59. modal/dict.py +6 -3
  60. modal/dict.pyi +10 -9
  61. modal/environments.py +3 -3
  62. modal/environments.pyi +3 -3
  63. modal/exception.py +2 -3
  64. modal/functions.py +112 -104
  65. modal/functions.pyi +77 -58
  66. modal/image.py +59 -57
  67. modal/image.pyi +104 -103
  68. modal/io_streams.py +20 -12
  69. modal/io_streams.pyi +24 -14
  70. modal/mount.py +24 -24
  71. modal/mount.pyi +28 -29
  72. modal/network_file_system.py +14 -11
  73. modal/network_file_system.pyi +12 -11
  74. modal/object.py +9 -8
  75. modal/object.pyi +47 -34
  76. modal/output.py +2 -1
  77. modal/parallel_map.py +4 -4
  78. modal/partial_function.py +10 -14
  79. modal/partial_function.pyi +17 -18
  80. modal/queue.py +11 -8
  81. modal/queue.pyi +23 -22
  82. modal/retries.py +38 -0
  83. modal/runner.py +8 -7
  84. modal/runner.pyi +8 -14
  85. modal/running_app.py +3 -3
  86. modal/sandbox.py +20 -13
  87. modal/sandbox.pyi +73 -72
  88. modal/scheduler_placement.py +2 -1
  89. modal/secret.py +7 -7
  90. modal/secret.pyi +12 -12
  91. modal/serving.py +4 -3
  92. modal/serving.pyi +5 -4
  93. modal/token_flow.py +3 -2
  94. modal/token_flow.pyi +3 -3
  95. modal/volume.py +16 -23
  96. modal/volume.pyi +17 -16
  97. {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/METADATA +2 -2
  98. modal-0.67.33.dist-info/RECORD +168 -0
  99. modal_docs/mdmd/signatures.py +1 -2
  100. modal_global_objects/mounts/python_standalone.py +1 -1
  101. modal_proto/api.proto +15 -0
  102. modal_proto/api_grpc.py +32 -0
  103. modal_proto/api_pb2.py +674 -654
  104. modal_proto/api_pb2.pyi +45 -1
  105. modal_proto/api_pb2_grpc.py +66 -0
  106. modal_proto/api_pb2_grpc.pyi +20 -0
  107. modal_proto/modal_api_grpc.py +2 -0
  108. modal_version/_version_generated.py +1 -1
  109. modal-0.67.1.dist-info/RECORD +0 -168
  110. {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/LICENSE +0 -0
  111. {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/WHEEL +0 -0
  112. {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/entry_points.txt +0 -0
  113. {modal-0.67.1.dist-info → modal-0.67.33.dist-info}/top_level.txt +0 -0
modal/functions.pyi CHANGED
@@ -1,3 +1,4 @@
1
+ import collections.abc
1
2
  import google.protobuf.message
2
3
  import modal._utils.async_utils
3
4
  import modal._utils.function_utils
@@ -25,11 +26,35 @@ import pathlib
25
26
  import typing
26
27
  import typing_extensions
27
28
 
29
+ class _RetryContext:
30
+ function_call_invocation_type: int
31
+ retry_policy: modal_proto.api_pb2.FunctionRetryPolicy
32
+ function_call_jwt: str
33
+ input_jwt: str
34
+ input_id: str
35
+ item: modal_proto.api_pb2.FunctionPutInputsItem
36
+
37
+ def __init__(
38
+ self,
39
+ function_call_invocation_type: int,
40
+ retry_policy: modal_proto.api_pb2.FunctionRetryPolicy,
41
+ function_call_jwt: str,
42
+ input_jwt: str,
43
+ input_id: str,
44
+ item: modal_proto.api_pb2.FunctionPutInputsItem,
45
+ ) -> None: ...
46
+ def __repr__(self): ...
47
+ def __eq__(self, other): ...
48
+
28
49
  class _Invocation:
29
50
  stub: modal_proto.modal_api_grpc.ModalClientModal
30
51
 
31
52
  def __init__(
32
- self, stub: modal_proto.modal_api_grpc.ModalClientModal, function_call_id: str, client: modal.client._Client
53
+ self,
54
+ stub: modal_proto.modal_api_grpc.ModalClientModal,
55
+ function_call_id: str,
56
+ client: modal.client._Client,
57
+ retry_context: typing.Optional[_RetryContext] = None,
33
58
  ): ...
34
59
  @staticmethod
35
60
  async def create(
@@ -38,6 +63,8 @@ class _Invocation:
38
63
  async def pop_function_call_outputs(
39
64
  self, timeout: typing.Optional[float], clear_on_success: bool
40
65
  ) -> modal_proto.api_pb2.FunctionGetOutputsResponse: ...
66
+ async def _retry_input(self) -> None: ...
67
+ async def _get_single_output(self) -> typing.Any: ...
41
68
  async def run_function(self) -> typing.Any: ...
42
69
  async def poll_function(self, timeout: typing.Optional[float] = None): ...
43
70
  def run_generator(self): ...
@@ -60,42 +87,38 @@ def _parse_retries(
60
87
 
61
88
  class _FunctionSpec:
62
89
  image: typing.Optional[modal.image._Image]
63
- mounts: typing.Sequence[modal.mount._Mount]
64
- secrets: typing.Sequence[modal.secret._Secret]
65
- network_file_systems: typing.Dict[
66
- typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
67
- ]
68
- volumes: typing.Dict[
90
+ mounts: collections.abc.Sequence[modal.mount._Mount]
91
+ secrets: collections.abc.Sequence[modal.secret._Secret]
92
+ network_file_systems: dict[typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem]
93
+ volumes: dict[
69
94
  typing.Union[str, pathlib.PurePosixPath],
70
95
  typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
71
96
  ]
72
- gpus: typing.Union[
73
- None, bool, str, modal.gpu._GPUConfig, typing.List[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
74
- ]
97
+ gpus: typing.Union[None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]]
75
98
  cloud: typing.Optional[str]
76
99
  cpu: typing.Optional[float]
77
- memory: typing.Union[int, typing.Tuple[int, int], None]
100
+ memory: typing.Union[int, tuple[int, int], None]
78
101
  ephemeral_disk: typing.Optional[int]
79
102
  scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement]
80
103
 
81
104
  def __init__(
82
105
  self,
83
106
  image: typing.Optional[modal.image._Image],
84
- mounts: typing.Sequence[modal.mount._Mount],
85
- secrets: typing.Sequence[modal.secret._Secret],
86
- network_file_systems: typing.Dict[
107
+ mounts: collections.abc.Sequence[modal.mount._Mount],
108
+ secrets: collections.abc.Sequence[modal.secret._Secret],
109
+ network_file_systems: dict[
87
110
  typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
88
111
  ],
89
- volumes: typing.Dict[
112
+ volumes: dict[
90
113
  typing.Union[str, pathlib.PurePosixPath],
91
114
  typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
92
115
  ],
93
116
  gpus: typing.Union[
94
- None, bool, str, modal.gpu._GPUConfig, typing.List[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
117
+ None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
95
118
  ],
96
119
  cloud: typing.Optional[str],
97
120
  cpu: typing.Optional[float],
98
- memory: typing.Union[int, typing.Tuple[int, int], None],
121
+ memory: typing.Union[int, tuple[int, int], None],
99
122
  ephemeral_disk: typing.Optional[int],
100
123
  scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement],
101
124
  ) -> None: ...
@@ -110,7 +133,7 @@ OriginalReturnType = typing.TypeVar("OriginalReturnType", covariant=True)
110
133
 
111
134
  class _Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object._Object):
112
135
  _info: typing.Optional[modal._utils.function_utils.FunctionInfo]
113
- _serve_mounts: typing.FrozenSet[modal.mount._Mount]
136
+ _serve_mounts: frozenset[modal.mount._Mount]
114
137
  _app: typing.Optional[modal.app._App]
115
138
  _obj: typing.Optional[modal.cls._Obj]
116
139
  _web_url: typing.Optional[str]
@@ -124,32 +147,31 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.
124
147
  _cluster_size: typing.Optional[int]
125
148
  _use_method_name: str
126
149
  _class_parameter_info: typing.Optional[modal_proto.api_pb2.ClassParameterInfo]
127
- _method_handle_metadata: typing.Optional[typing.Dict[str, modal_proto.api_pb2.FunctionHandleMetadata]]
150
+ _method_handle_metadata: typing.Optional[dict[str, modal_proto.api_pb2.FunctionHandleMetadata]]
128
151
 
129
152
  def _bind_method(self, user_cls, method_name: str, partial_function: modal.partial_function._PartialFunction): ...
130
- def _bind_instance_method(self, class_bound_method: _Function): ...
131
153
  @staticmethod
132
154
  def from_args(
133
155
  info: modal._utils.function_utils.FunctionInfo,
134
156
  app,
135
157
  image: modal.image._Image,
136
- secrets: typing.Sequence[modal.secret._Secret] = (),
158
+ secrets: collections.abc.Sequence[modal.secret._Secret] = (),
137
159
  schedule: typing.Optional[modal.schedule.Schedule] = None,
138
160
  is_generator=False,
139
161
  gpu: typing.Union[
140
- None, bool, str, modal.gpu._GPUConfig, typing.List[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
162
+ None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
141
163
  ] = None,
142
- mounts: typing.Collection[modal.mount._Mount] = (),
143
- network_file_systems: typing.Dict[
164
+ mounts: collections.abc.Collection[modal.mount._Mount] = (),
165
+ network_file_systems: dict[
144
166
  typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
145
167
  ] = {},
146
168
  allow_cross_region_volumes: bool = False,
147
- volumes: typing.Dict[
169
+ volumes: dict[
148
170
  typing.Union[str, pathlib.PurePosixPath],
149
171
  typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
150
172
  ] = {},
151
173
  webhook_config: typing.Optional[modal_proto.api_pb2.WebhookConfig] = None,
152
- memory: typing.Union[int, typing.Tuple[int, int], None] = None,
174
+ memory: typing.Union[int, tuple[int, int], None] = None,
153
175
  proxy: typing.Optional[modal.proxy._Proxy] = None,
154
176
  retries: typing.Union[int, modal.retries.Retries, None] = None,
155
177
  timeout: typing.Optional[int] = None,
@@ -177,15 +199,14 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.
177
199
  def _bind_parameters(
178
200
  self,
179
201
  obj: modal.cls._Obj,
180
- from_other_workspace: bool,
181
202
  options: typing.Optional[modal_proto.api_pb2.FunctionOptions],
182
- args: typing.Sized,
183
- kwargs: typing.Dict[str, typing.Any],
203
+ args: collections.abc.Sized,
204
+ kwargs: dict[str, typing.Any],
184
205
  ) -> _Function: ...
185
206
  async def keep_warm(self, warm_pool_size: int) -> None: ...
186
207
  @classmethod
187
208
  def from_name(
188
- cls: typing.Type[_Function], app_name: str, tag: str, namespace=1, environment_name: typing.Optional[str] = None
209
+ cls: type[_Function], app_name: str, tag: str, namespace=1, environment_name: typing.Optional[str] = None
189
210
  ) -> _Function: ...
190
211
  @staticmethod
191
212
  async def lookup(
@@ -218,13 +239,13 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.
218
239
  def cluster_size(self) -> int: ...
219
240
  def _map(
220
241
  self, input_queue: modal.parallel_map._SynchronizedQueue, order_outputs: bool, return_exceptions: bool
221
- ) -> typing.AsyncGenerator[typing.Any, None]: ...
242
+ ) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
222
243
  async def _call_function(self, args, kwargs) -> ReturnType: ...
223
244
  async def _call_function_nowait(self, args, kwargs, function_call_invocation_type: int) -> _Invocation: ...
224
245
  def _call_generator(self, args, kwargs): ...
225
246
  async def _call_generator_nowait(self, args, kwargs): ...
226
247
  async def remote(self, *args: P.args, **kwargs: P.kwargs) -> ReturnType: ...
227
- def remote_gen(self, *args, **kwargs) -> typing.AsyncGenerator[typing.Any, None]: ...
248
+ def remote_gen(self, *args, **kwargs) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
228
249
  def _get_info(self) -> modal._utils.function_utils.FunctionInfo: ...
229
250
  def _get_obj(self) -> typing.Optional[modal.cls._Obj]: ...
230
251
  def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
@@ -279,7 +300,7 @@ P_INNER = typing_extensions.ParamSpec("P_INNER")
279
300
 
280
301
  class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.Object):
281
302
  _info: typing.Optional[modal._utils.function_utils.FunctionInfo]
282
- _serve_mounts: typing.FrozenSet[modal.mount.Mount]
303
+ _serve_mounts: frozenset[modal.mount.Mount]
283
304
  _app: typing.Optional[modal.app.App]
284
305
  _obj: typing.Optional[modal.cls.Obj]
285
306
  _web_url: typing.Optional[str]
@@ -293,33 +314,32 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
293
314
  _cluster_size: typing.Optional[int]
294
315
  _use_method_name: str
295
316
  _class_parameter_info: typing.Optional[modal_proto.api_pb2.ClassParameterInfo]
296
- _method_handle_metadata: typing.Optional[typing.Dict[str, modal_proto.api_pb2.FunctionHandleMetadata]]
317
+ _method_handle_metadata: typing.Optional[dict[str, modal_proto.api_pb2.FunctionHandleMetadata]]
297
318
 
298
319
  def __init__(self, *args, **kwargs): ...
299
320
  def _bind_method(self, user_cls, method_name: str, partial_function: modal.partial_function.PartialFunction): ...
300
- def _bind_instance_method(self, class_bound_method: Function): ...
301
321
  @staticmethod
302
322
  def from_args(
303
323
  info: modal._utils.function_utils.FunctionInfo,
304
324
  app,
305
325
  image: modal.image.Image,
306
- secrets: typing.Sequence[modal.secret.Secret] = (),
326
+ secrets: collections.abc.Sequence[modal.secret.Secret] = (),
307
327
  schedule: typing.Optional[modal.schedule.Schedule] = None,
308
328
  is_generator=False,
309
329
  gpu: typing.Union[
310
- None, bool, str, modal.gpu._GPUConfig, typing.List[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
330
+ None, bool, str, modal.gpu._GPUConfig, list[typing.Union[None, bool, str, modal.gpu._GPUConfig]]
311
331
  ] = None,
312
- mounts: typing.Collection[modal.mount.Mount] = (),
313
- network_file_systems: typing.Dict[
332
+ mounts: collections.abc.Collection[modal.mount.Mount] = (),
333
+ network_file_systems: dict[
314
334
  typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
315
335
  ] = {},
316
336
  allow_cross_region_volumes: bool = False,
317
- volumes: typing.Dict[
337
+ volumes: dict[
318
338
  typing.Union[str, pathlib.PurePosixPath],
319
339
  typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
320
340
  ] = {},
321
341
  webhook_config: typing.Optional[modal_proto.api_pb2.WebhookConfig] = None,
322
- memory: typing.Union[int, typing.Tuple[int, int], None] = None,
342
+ memory: typing.Union[int, tuple[int, int], None] = None,
323
343
  proxy: typing.Optional[modal.proxy.Proxy] = None,
324
344
  retries: typing.Union[int, modal.retries.Retries, None] = None,
325
345
  timeout: typing.Optional[int] = None,
@@ -347,10 +367,9 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
347
367
  def _bind_parameters(
348
368
  self,
349
369
  obj: modal.cls.Obj,
350
- from_other_workspace: bool,
351
370
  options: typing.Optional[modal_proto.api_pb2.FunctionOptions],
352
- args: typing.Sized,
353
- kwargs: typing.Dict[str, typing.Any],
371
+ args: collections.abc.Sized,
372
+ kwargs: dict[str, typing.Any],
354
373
  ) -> Function: ...
355
374
 
356
375
  class __keep_warm_spec(typing_extensions.Protocol):
@@ -361,7 +380,7 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
361
380
 
362
381
  @classmethod
363
382
  def from_name(
364
- cls: typing.Type[Function], app_name: str, tag: str, namespace=1, environment_name: typing.Optional[str] = None
383
+ cls: type[Function], app_name: str, tag: str, namespace=1, environment_name: typing.Optional[str] = None
365
384
  ) -> Function: ...
366
385
 
367
386
  class __lookup_spec(typing_extensions.Protocol):
@@ -412,7 +431,7 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
412
431
  ) -> typing.Generator[typing.Any, None, None]: ...
413
432
  def aio(
414
433
  self, input_queue: modal.parallel_map.SynchronizedQueue, order_outputs: bool, return_exceptions: bool
415
- ) -> typing.AsyncGenerator[typing.Any, None]: ...
434
+ ) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
416
435
 
417
436
  _map: ___map_spec
418
437
 
@@ -436,15 +455,15 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
436
455
 
437
456
  _call_generator_nowait: ___call_generator_nowait_spec
438
457
 
439
- class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
458
+ class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
440
459
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
441
460
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
442
461
 
443
- remote: __remote_spec[ReturnType, P]
462
+ remote: __remote_spec[P, ReturnType]
444
463
 
445
464
  class __remote_gen_spec(typing_extensions.Protocol):
446
465
  def __call__(self, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
447
- def aio(self, *args, **kwargs) -> typing.AsyncGenerator[typing.Any, None]: ...
466
+ def aio(self, *args, **kwargs) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
448
467
 
449
468
  remote_gen: __remote_gen_spec
450
469
 
@@ -452,17 +471,17 @@ class Function(typing.Generic[P, ReturnType, OriginalReturnType], modal.object.O
452
471
  def _get_obj(self) -> typing.Optional[modal.cls.Obj]: ...
453
472
  def local(self, *args: P.args, **kwargs: P.kwargs) -> OriginalReturnType: ...
454
473
 
455
- class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
474
+ class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
456
475
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
457
476
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
458
477
 
459
- _experimental_spawn: ___experimental_spawn_spec[ReturnType, P]
478
+ _experimental_spawn: ___experimental_spawn_spec[P, ReturnType]
460
479
 
461
- class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
480
+ class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
462
481
  def __call__(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
463
482
  async def aio(self, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
464
483
 
465
- spawn: __spawn_spec[ReturnType, P]
484
+ spawn: __spawn_spec[P, ReturnType]
466
485
 
467
486
  def get_raw_f(self) -> typing.Callable[..., typing.Any]: ...
468
487
 
@@ -517,8 +536,8 @@ class _FunctionCall(typing.Generic[ReturnType], modal.object._Object):
517
536
 
518
537
  def _invocation(self): ...
519
538
  async def get(self, timeout: typing.Optional[float] = None) -> ReturnType: ...
520
- def get_gen(self) -> typing.AsyncGenerator[typing.Any, None]: ...
521
- async def get_call_graph(self) -> typing.List[modal.call_graph.InputInfo]: ...
539
+ def get_gen(self) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
540
+ async def get_call_graph(self) -> list[modal.call_graph.InputInfo]: ...
522
541
  async def cancel(self, terminate_containers: bool = False): ...
523
542
  @staticmethod
524
543
  async def from_id(
@@ -539,13 +558,13 @@ class FunctionCall(typing.Generic[ReturnType], modal.object.Object):
539
558
 
540
559
  class __get_gen_spec(typing_extensions.Protocol):
541
560
  def __call__(self) -> typing.Generator[typing.Any, None, None]: ...
542
- def aio(self) -> typing.AsyncGenerator[typing.Any, None]: ...
561
+ def aio(self) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
543
562
 
544
563
  get_gen: __get_gen_spec
545
564
 
546
565
  class __get_call_graph_spec(typing_extensions.Protocol):
547
- def __call__(self) -> typing.List[modal.call_graph.InputInfo]: ...
548
- async def aio(self) -> typing.List[modal.call_graph.InputInfo]: ...
566
+ def __call__(self) -> list[modal.call_graph.InputInfo]: ...
567
+ async def aio(self) -> list[modal.call_graph.InputInfo]: ...
549
568
 
550
569
  get_call_graph: __get_call_graph_spec
551
570