modal 1.0.6.dev58__py3-none-any.whl → 1.2.3.dev7__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.

Potentially problematic release.


This version of modal might be problematic. Click here for more details.

Files changed (147) hide show
  1. modal/__main__.py +3 -4
  2. modal/_billing.py +80 -0
  3. modal/_clustered_functions.py +7 -3
  4. modal/_clustered_functions.pyi +4 -2
  5. modal/_container_entrypoint.py +41 -49
  6. modal/_functions.py +424 -195
  7. modal/_grpc_client.py +171 -0
  8. modal/_load_context.py +105 -0
  9. modal/_object.py +68 -20
  10. modal/_output.py +58 -45
  11. modal/_partial_function.py +36 -11
  12. modal/_pty.py +7 -3
  13. modal/_resolver.py +21 -35
  14. modal/_runtime/asgi.py +4 -3
  15. modal/_runtime/container_io_manager.py +301 -186
  16. modal/_runtime/container_io_manager.pyi +70 -61
  17. modal/_runtime/execution_context.py +18 -2
  18. modal/_runtime/execution_context.pyi +4 -1
  19. modal/_runtime/gpu_memory_snapshot.py +170 -63
  20. modal/_runtime/user_code_imports.py +28 -58
  21. modal/_serialization.py +57 -1
  22. modal/_utils/async_utils.py +33 -12
  23. modal/_utils/auth_token_manager.py +2 -5
  24. modal/_utils/blob_utils.py +110 -53
  25. modal/_utils/function_utils.py +49 -42
  26. modal/_utils/grpc_utils.py +80 -50
  27. modal/_utils/mount_utils.py +26 -1
  28. modal/_utils/name_utils.py +17 -3
  29. modal/_utils/task_command_router_client.py +536 -0
  30. modal/_utils/time_utils.py +34 -6
  31. modal/app.py +219 -83
  32. modal/app.pyi +229 -56
  33. modal/billing.py +5 -0
  34. modal/{requirements → builder}/2025.06.txt +1 -0
  35. modal/{requirements → builder}/PREVIEW.txt +1 -0
  36. modal/cli/_download.py +19 -3
  37. modal/cli/_traceback.py +3 -2
  38. modal/cli/app.py +4 -4
  39. modal/cli/cluster.py +15 -7
  40. modal/cli/config.py +5 -3
  41. modal/cli/container.py +7 -6
  42. modal/cli/dict.py +22 -16
  43. modal/cli/entry_point.py +12 -5
  44. modal/cli/environment.py +5 -4
  45. modal/cli/import_refs.py +3 -3
  46. modal/cli/launch.py +102 -5
  47. modal/cli/network_file_system.py +9 -13
  48. modal/cli/profile.py +3 -2
  49. modal/cli/programs/launch_instance_ssh.py +94 -0
  50. modal/cli/programs/run_jupyter.py +1 -1
  51. modal/cli/programs/run_marimo.py +95 -0
  52. modal/cli/programs/vscode.py +1 -1
  53. modal/cli/queues.py +57 -26
  54. modal/cli/run.py +58 -16
  55. modal/cli/secret.py +48 -22
  56. modal/cli/utils.py +3 -4
  57. modal/cli/volume.py +28 -25
  58. modal/client.py +13 -116
  59. modal/client.pyi +9 -91
  60. modal/cloud_bucket_mount.py +5 -3
  61. modal/cloud_bucket_mount.pyi +5 -1
  62. modal/cls.py +130 -102
  63. modal/cls.pyi +45 -85
  64. modal/config.py +29 -10
  65. modal/container_process.py +291 -13
  66. modal/container_process.pyi +95 -32
  67. modal/dict.py +282 -63
  68. modal/dict.pyi +423 -73
  69. modal/environments.py +15 -27
  70. modal/environments.pyi +5 -15
  71. modal/exception.py +8 -0
  72. modal/experimental/__init__.py +143 -38
  73. modal/experimental/flash.py +247 -78
  74. modal/experimental/flash.pyi +137 -9
  75. modal/file_io.py +14 -28
  76. modal/file_io.pyi +2 -2
  77. modal/file_pattern_matcher.py +25 -16
  78. modal/functions.pyi +134 -61
  79. modal/image.py +255 -86
  80. modal/image.pyi +300 -62
  81. modal/io_streams.py +436 -126
  82. modal/io_streams.pyi +236 -171
  83. modal/mount.py +62 -157
  84. modal/mount.pyi +45 -172
  85. modal/network_file_system.py +30 -53
  86. modal/network_file_system.pyi +16 -76
  87. modal/object.pyi +42 -8
  88. modal/parallel_map.py +821 -113
  89. modal/parallel_map.pyi +134 -0
  90. modal/partial_function.pyi +4 -1
  91. modal/proxy.py +16 -7
  92. modal/proxy.pyi +10 -2
  93. modal/queue.py +263 -61
  94. modal/queue.pyi +409 -66
  95. modal/runner.py +112 -92
  96. modal/runner.pyi +45 -27
  97. modal/sandbox.py +451 -124
  98. modal/sandbox.pyi +513 -67
  99. modal/secret.py +291 -67
  100. modal/secret.pyi +425 -19
  101. modal/serving.py +7 -11
  102. modal/serving.pyi +7 -8
  103. modal/snapshot.py +11 -8
  104. modal/token_flow.py +4 -4
  105. modal/volume.py +344 -98
  106. modal/volume.pyi +464 -68
  107. {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/METADATA +9 -8
  108. modal-1.2.3.dev7.dist-info/RECORD +195 -0
  109. modal_docs/mdmd/mdmd.py +11 -1
  110. modal_proto/api.proto +399 -67
  111. modal_proto/api_grpc.py +241 -1
  112. modal_proto/api_pb2.py +1395 -1000
  113. modal_proto/api_pb2.pyi +1239 -79
  114. modal_proto/api_pb2_grpc.py +499 -4
  115. modal_proto/api_pb2_grpc.pyi +162 -14
  116. modal_proto/modal_api_grpc.py +175 -160
  117. modal_proto/sandbox_router.proto +145 -0
  118. modal_proto/sandbox_router_grpc.py +105 -0
  119. modal_proto/sandbox_router_pb2.py +149 -0
  120. modal_proto/sandbox_router_pb2.pyi +333 -0
  121. modal_proto/sandbox_router_pb2_grpc.py +203 -0
  122. modal_proto/sandbox_router_pb2_grpc.pyi +75 -0
  123. modal_proto/task_command_router.proto +144 -0
  124. modal_proto/task_command_router_grpc.py +105 -0
  125. modal_proto/task_command_router_pb2.py +149 -0
  126. modal_proto/task_command_router_pb2.pyi +333 -0
  127. modal_proto/task_command_router_pb2_grpc.py +203 -0
  128. modal_proto/task_command_router_pb2_grpc.pyi +75 -0
  129. modal_version/__init__.py +1 -1
  130. modal-1.0.6.dev58.dist-info/RECORD +0 -183
  131. modal_proto/modal_options_grpc.py +0 -3
  132. modal_proto/options.proto +0 -19
  133. modal_proto/options_grpc.py +0 -3
  134. modal_proto/options_pb2.py +0 -35
  135. modal_proto/options_pb2.pyi +0 -20
  136. modal_proto/options_pb2_grpc.py +0 -4
  137. modal_proto/options_pb2_grpc.pyi +0 -7
  138. /modal/{requirements → builder}/2023.12.312.txt +0 -0
  139. /modal/{requirements → builder}/2023.12.txt +0 -0
  140. /modal/{requirements → builder}/2024.04.txt +0 -0
  141. /modal/{requirements → builder}/2024.10.txt +0 -0
  142. /modal/{requirements → builder}/README.md +0 -0
  143. /modal/{requirements → builder}/base-images.json +0 -0
  144. {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/WHEEL +0 -0
  145. {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/entry_points.txt +0 -0
  146. {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/licenses/LICENSE +0 -0
  147. {modal-1.0.6.dev58.dist-info → modal-1.2.3.dev7.dist-info}/top_level.txt +0 -0
modal/queue.pyi CHANGED
@@ -1,11 +1,356 @@
1
1
  import collections.abc
2
+ import datetime
3
+ import google.protobuf.message
2
4
  import modal._object
3
5
  import modal.client
4
6
  import modal.object
7
+ import modal_proto.api_pb2
8
+ import synchronicity
5
9
  import synchronicity.combined_types
6
10
  import typing
7
11
  import typing_extensions
8
12
 
13
+ class QueueInfo:
14
+ """Information about the Queue object."""
15
+
16
+ name: typing.Optional[str]
17
+ created_at: datetime.datetime
18
+ created_by: typing.Optional[str]
19
+
20
+ def __init__(
21
+ self, name: typing.Optional[str], created_at: datetime.datetime, created_by: typing.Optional[str]
22
+ ) -> None:
23
+ """Initialize self. See help(type(self)) for accurate signature."""
24
+ ...
25
+
26
+ def __repr__(self):
27
+ """Return repr(self)."""
28
+ ...
29
+
30
+ def __eq__(self, other):
31
+ """Return self==value."""
32
+ ...
33
+
34
+ class _QueueManager:
35
+ """Namespace with methods for managing named Queue objects."""
36
+ @staticmethod
37
+ async def create(
38
+ name: str,
39
+ *,
40
+ allow_existing: bool = False,
41
+ environment_name: typing.Optional[str] = None,
42
+ client: typing.Optional[modal.client._Client] = None,
43
+ ) -> None:
44
+ """Create a new Queue object.
45
+
46
+ **Examples:**
47
+
48
+ ```python notest
49
+ modal.Queue.objects.create("my-queue")
50
+ ```
51
+
52
+ Queues will be created in the active environment, or another one can be specified:
53
+
54
+ ```python notest
55
+ modal.Queue.objects.create("my-queue", environment_name="dev")
56
+ ```
57
+
58
+ By default, an error will be raised if the Queue already exists, but passing
59
+ `allow_existing=True` will make the creation attempt a no-op in this case.
60
+
61
+ ```python notest
62
+ modal.Queue.objects.create("my-queue", allow_existing=True)
63
+ ```
64
+
65
+ Note that this method does not return a local instance of the Queue. You can use
66
+ `modal.Queue.from_name` to perform a lookup after creation.
67
+
68
+ Added in v1.1.2.
69
+ """
70
+ ...
71
+
72
+ @staticmethod
73
+ async def list(
74
+ *,
75
+ max_objects: typing.Optional[int] = None,
76
+ created_before: typing.Union[datetime.datetime, str, None] = None,
77
+ environment_name: str = "",
78
+ client: typing.Optional[modal.client._Client] = None,
79
+ ) -> list[_Queue]:
80
+ """Return a list of hydrated Queue objects.
81
+
82
+ **Examples:**
83
+
84
+ ```python
85
+ queues = modal.Queue.objects.list()
86
+ print([q.name for q in queues])
87
+ ```
88
+
89
+ Queues will be retreived from the active environment, or another one can be specified:
90
+
91
+ ```python notest
92
+ dev_queues = modal.Queue.objects.list(environment_name="dev")
93
+ ```
94
+
95
+ By default, all named Queues are returned, newest to oldest. It's also possible to limit the
96
+ number of results and to filter by creation date:
97
+
98
+ ```python
99
+ queues = modal.Queue.objects.list(max_objects=10, created_before="2025-01-01")
100
+ ```
101
+
102
+ Added in v1.1.2.
103
+ """
104
+ ...
105
+
106
+ @staticmethod
107
+ async def delete(
108
+ name: str,
109
+ *,
110
+ allow_missing: bool = False,
111
+ environment_name: typing.Optional[str] = None,
112
+ client: typing.Optional[modal.client._Client] = None,
113
+ ):
114
+ """Delete a named Queue.
115
+
116
+ Warning: This deletes an *entire Queue*, not just a specific entry or partition.
117
+ Deletion is irreversible and will affect any Apps currently using the Queue.
118
+
119
+ **Examples:**
120
+
121
+ ```python notest
122
+ await modal.Queue.objects.delete("my-queue")
123
+ ```
124
+
125
+ Queues will be deleted from the active environment, or another one can be specified:
126
+
127
+ ```python notest
128
+ await modal.Queue.objects.delete("my-queue", environment_name="dev")
129
+ ```
130
+
131
+ Added in v1.1.2.
132
+ """
133
+ ...
134
+
135
+ class QueueManager:
136
+ """Namespace with methods for managing named Queue objects."""
137
+ def __init__(self, /, *args, **kwargs):
138
+ """Initialize self. See help(type(self)) for accurate signature."""
139
+ ...
140
+
141
+ class __create_spec(typing_extensions.Protocol):
142
+ def __call__(
143
+ self,
144
+ /,
145
+ name: str,
146
+ *,
147
+ allow_existing: bool = False,
148
+ environment_name: typing.Optional[str] = None,
149
+ client: typing.Optional[modal.client.Client] = None,
150
+ ) -> None:
151
+ """Create a new Queue object.
152
+
153
+ **Examples:**
154
+
155
+ ```python notest
156
+ modal.Queue.objects.create("my-queue")
157
+ ```
158
+
159
+ Queues will be created in the active environment, or another one can be specified:
160
+
161
+ ```python notest
162
+ modal.Queue.objects.create("my-queue", environment_name="dev")
163
+ ```
164
+
165
+ By default, an error will be raised if the Queue already exists, but passing
166
+ `allow_existing=True` will make the creation attempt a no-op in this case.
167
+
168
+ ```python notest
169
+ modal.Queue.objects.create("my-queue", allow_existing=True)
170
+ ```
171
+
172
+ Note that this method does not return a local instance of the Queue. You can use
173
+ `modal.Queue.from_name` to perform a lookup after creation.
174
+
175
+ Added in v1.1.2.
176
+ """
177
+ ...
178
+
179
+ async def aio(
180
+ self,
181
+ /,
182
+ name: str,
183
+ *,
184
+ allow_existing: bool = False,
185
+ environment_name: typing.Optional[str] = None,
186
+ client: typing.Optional[modal.client.Client] = None,
187
+ ) -> None:
188
+ """Create a new Queue object.
189
+
190
+ **Examples:**
191
+
192
+ ```python notest
193
+ modal.Queue.objects.create("my-queue")
194
+ ```
195
+
196
+ Queues will be created in the active environment, or another one can be specified:
197
+
198
+ ```python notest
199
+ modal.Queue.objects.create("my-queue", environment_name="dev")
200
+ ```
201
+
202
+ By default, an error will be raised if the Queue already exists, but passing
203
+ `allow_existing=True` will make the creation attempt a no-op in this case.
204
+
205
+ ```python notest
206
+ modal.Queue.objects.create("my-queue", allow_existing=True)
207
+ ```
208
+
209
+ Note that this method does not return a local instance of the Queue. You can use
210
+ `modal.Queue.from_name` to perform a lookup after creation.
211
+
212
+ Added in v1.1.2.
213
+ """
214
+ ...
215
+
216
+ create: __create_spec
217
+
218
+ class __list_spec(typing_extensions.Protocol):
219
+ def __call__(
220
+ self,
221
+ /,
222
+ *,
223
+ max_objects: typing.Optional[int] = None,
224
+ created_before: typing.Union[datetime.datetime, str, None] = None,
225
+ environment_name: str = "",
226
+ client: typing.Optional[modal.client.Client] = None,
227
+ ) -> list[Queue]:
228
+ """Return a list of hydrated Queue objects.
229
+
230
+ **Examples:**
231
+
232
+ ```python
233
+ queues = modal.Queue.objects.list()
234
+ print([q.name for q in queues])
235
+ ```
236
+
237
+ Queues will be retreived from the active environment, or another one can be specified:
238
+
239
+ ```python notest
240
+ dev_queues = modal.Queue.objects.list(environment_name="dev")
241
+ ```
242
+
243
+ By default, all named Queues are returned, newest to oldest. It's also possible to limit the
244
+ number of results and to filter by creation date:
245
+
246
+ ```python
247
+ queues = modal.Queue.objects.list(max_objects=10, created_before="2025-01-01")
248
+ ```
249
+
250
+ Added in v1.1.2.
251
+ """
252
+ ...
253
+
254
+ async def aio(
255
+ self,
256
+ /,
257
+ *,
258
+ max_objects: typing.Optional[int] = None,
259
+ created_before: typing.Union[datetime.datetime, str, None] = None,
260
+ environment_name: str = "",
261
+ client: typing.Optional[modal.client.Client] = None,
262
+ ) -> list[Queue]:
263
+ """Return a list of hydrated Queue objects.
264
+
265
+ **Examples:**
266
+
267
+ ```python
268
+ queues = modal.Queue.objects.list()
269
+ print([q.name for q in queues])
270
+ ```
271
+
272
+ Queues will be retreived from the active environment, or another one can be specified:
273
+
274
+ ```python notest
275
+ dev_queues = modal.Queue.objects.list(environment_name="dev")
276
+ ```
277
+
278
+ By default, all named Queues are returned, newest to oldest. It's also possible to limit the
279
+ number of results and to filter by creation date:
280
+
281
+ ```python
282
+ queues = modal.Queue.objects.list(max_objects=10, created_before="2025-01-01")
283
+ ```
284
+
285
+ Added in v1.1.2.
286
+ """
287
+ ...
288
+
289
+ list: __list_spec
290
+
291
+ class __delete_spec(typing_extensions.Protocol):
292
+ def __call__(
293
+ self,
294
+ /,
295
+ name: str,
296
+ *,
297
+ allow_missing: bool = False,
298
+ environment_name: typing.Optional[str] = None,
299
+ client: typing.Optional[modal.client.Client] = None,
300
+ ):
301
+ """Delete a named Queue.
302
+
303
+ Warning: This deletes an *entire Queue*, not just a specific entry or partition.
304
+ Deletion is irreversible and will affect any Apps currently using the Queue.
305
+
306
+ **Examples:**
307
+
308
+ ```python notest
309
+ await modal.Queue.objects.delete("my-queue")
310
+ ```
311
+
312
+ Queues will be deleted from the active environment, or another one can be specified:
313
+
314
+ ```python notest
315
+ await modal.Queue.objects.delete("my-queue", environment_name="dev")
316
+ ```
317
+
318
+ Added in v1.1.2.
319
+ """
320
+ ...
321
+
322
+ async def aio(
323
+ self,
324
+ /,
325
+ name: str,
326
+ *,
327
+ allow_missing: bool = False,
328
+ environment_name: typing.Optional[str] = None,
329
+ client: typing.Optional[modal.client.Client] = None,
330
+ ):
331
+ """Delete a named Queue.
332
+
333
+ Warning: This deletes an *entire Queue*, not just a specific entry or partition.
334
+ Deletion is irreversible and will affect any Apps currently using the Queue.
335
+
336
+ **Examples:**
337
+
338
+ ```python notest
339
+ await modal.Queue.objects.delete("my-queue")
340
+ ```
341
+
342
+ Queues will be deleted from the active environment, or another one can be specified:
343
+
344
+ ```python notest
345
+ await modal.Queue.objects.delete("my-queue", environment_name="dev")
346
+ ```
347
+
348
+ Added in v1.1.2.
349
+ """
350
+ ...
351
+
352
+ delete: __delete_spec
353
+
9
354
  class _Queue(modal._object._Object):
10
355
  """Distributed, FIFO queue for data flow in Modal apps.
11
356
 
@@ -78,10 +423,19 @@ class _Queue(modal._object._Object):
78
423
 
79
424
  Partition keys must be non-empty and must not exceed 64 bytes.
80
425
  """
426
+
427
+ _metadata: typing.Optional[modal_proto.api_pb2.QueueMetadata]
428
+
81
429
  def __init__(self):
82
430
  """mdmd:hidden"""
83
431
  ...
84
432
 
433
+ @synchronicity.classproperty
434
+ def objects(cls) -> _QueueManager: ...
435
+ @property
436
+ def name(self) -> typing.Optional[str]: ...
437
+ def _hydrate_metadata(self, metadata: typing.Optional[google.protobuf.message.Message]): ...
438
+ def _get_metadata(self) -> modal_proto.api_pb2.QueueMetadata: ...
85
439
  @staticmethod
86
440
  def validate_partition_key(partition: typing.Optional[str]) -> bytes: ...
87
441
  @classmethod
@@ -110,7 +464,12 @@ class _Queue(modal._object._Object):
110
464
 
111
465
  @staticmethod
112
466
  def from_name(
113
- name: str, *, namespace=None, environment_name: typing.Optional[str] = None, create_if_missing: bool = False
467
+ name: str,
468
+ *,
469
+ namespace=None,
470
+ environment_name: typing.Optional[str] = None,
471
+ create_if_missing: bool = False,
472
+ client: typing.Optional[modal.client._Client] = None,
114
473
  ) -> _Queue:
115
474
  """Reference a named Queue, creating if necessary.
116
475
 
@@ -126,35 +485,26 @@ class _Queue(modal._object._Object):
126
485
  ...
127
486
 
128
487
  @staticmethod
129
- async def lookup(
488
+ async def delete(
130
489
  name: str,
131
- namespace=None,
490
+ *,
132
491
  client: typing.Optional[modal.client._Client] = None,
133
492
  environment_name: typing.Optional[str] = None,
134
- create_if_missing: bool = False,
135
- ) -> _Queue:
493
+ ):
136
494
  """mdmd:hidden
137
- Lookup a named Queue.
138
-
139
- DEPRECATED: This method is deprecated in favor of `modal.Queue.from_name`.
495
+ Delete a named Queue.
140
496
 
141
- In contrast to `modal.Queue.from_name`, this is an eager method
142
- that will hydrate the local object with metadata from Modal servers.
497
+ Warning: This deletes an *entire Queue*, not just a specific entry or partition.
498
+ Deletion is irreversible and will affect any Apps currently using the Queue.
143
499
 
144
- ```python notest
145
- q = modal.Queue.lookup("my-queue")
146
- q.put(123)
147
- ```
500
+ DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
148
501
  """
149
502
  ...
150
503
 
151
- @staticmethod
152
- async def delete(
153
- name: str,
154
- *,
155
- client: typing.Optional[modal.client._Client] = None,
156
- environment_name: typing.Optional[str] = None,
157
- ): ...
504
+ async def info(self) -> QueueInfo:
505
+ """Return information about the Queue object."""
506
+ ...
507
+
158
508
  async def _get_nonblocking(self, partition: typing.Optional[str], n_values: int) -> list[typing.Any]: ...
159
509
  async def _get_blocking(
160
510
  self, partition: typing.Optional[str], timeout: typing.Optional[float], n_values: int
@@ -335,10 +685,19 @@ class Queue(modal.object.Object):
335
685
 
336
686
  Partition keys must be non-empty and must not exceed 64 bytes.
337
687
  """
688
+
689
+ _metadata: typing.Optional[modal_proto.api_pb2.QueueMetadata]
690
+
338
691
  def __init__(self):
339
692
  """mdmd:hidden"""
340
693
  ...
341
694
 
695
+ @synchronicity.classproperty
696
+ def objects(cls) -> QueueManager: ...
697
+ @property
698
+ def name(self) -> typing.Optional[str]: ...
699
+ def _hydrate_metadata(self, metadata: typing.Optional[google.protobuf.message.Message]): ...
700
+ def _get_metadata(self) -> modal_proto.api_pb2.QueueMetadata: ...
342
701
  @staticmethod
343
702
  def validate_partition_key(partition: typing.Optional[str]) -> bytes: ...
344
703
  @classmethod
@@ -367,7 +726,12 @@ class Queue(modal.object.Object):
367
726
 
368
727
  @staticmethod
369
728
  def from_name(
370
- name: str, *, namespace=None, environment_name: typing.Optional[str] = None, create_if_missing: bool = False
729
+ name: str,
730
+ *,
731
+ namespace=None,
732
+ environment_name: typing.Optional[str] = None,
733
+ create_if_missing: bool = False,
734
+ client: typing.Optional[modal.client.Client] = None,
371
735
  ) -> Queue:
372
736
  """Reference a named Queue, creating if necessary.
373
737
 
@@ -382,28 +746,22 @@ class Queue(modal.object.Object):
382
746
  """
383
747
  ...
384
748
 
385
- class __lookup_spec(typing_extensions.Protocol):
749
+ class __delete_spec(typing_extensions.Protocol):
386
750
  def __call__(
387
751
  self,
388
752
  /,
389
753
  name: str,
390
- namespace=None,
754
+ *,
391
755
  client: typing.Optional[modal.client.Client] = None,
392
756
  environment_name: typing.Optional[str] = None,
393
- create_if_missing: bool = False,
394
- ) -> Queue:
757
+ ):
395
758
  """mdmd:hidden
396
- Lookup a named Queue.
759
+ Delete a named Queue.
397
760
 
398
- DEPRECATED: This method is deprecated in favor of `modal.Queue.from_name`.
761
+ Warning: This deletes an *entire Queue*, not just a specific entry or partition.
762
+ Deletion is irreversible and will affect any Apps currently using the Queue.
399
763
 
400
- In contrast to `modal.Queue.from_name`, this is an eager method
401
- that will hydrate the local object with metadata from Modal servers.
402
-
403
- ```python notest
404
- q = modal.Queue.lookup("my-queue")
405
- q.put(123)
406
- ```
764
+ DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
407
765
  """
408
766
  ...
409
767
 
@@ -411,47 +769,32 @@ class Queue(modal.object.Object):
411
769
  self,
412
770
  /,
413
771
  name: str,
414
- namespace=None,
772
+ *,
415
773
  client: typing.Optional[modal.client.Client] = None,
416
774
  environment_name: typing.Optional[str] = None,
417
- create_if_missing: bool = False,
418
- ) -> Queue:
775
+ ):
419
776
  """mdmd:hidden
420
- Lookup a named Queue.
421
-
422
- DEPRECATED: This method is deprecated in favor of `modal.Queue.from_name`.
777
+ Delete a named Queue.
423
778
 
424
- In contrast to `modal.Queue.from_name`, this is an eager method
425
- that will hydrate the local object with metadata from Modal servers.
779
+ Warning: This deletes an *entire Queue*, not just a specific entry or partition.
780
+ Deletion is irreversible and will affect any Apps currently using the Queue.
426
781
 
427
- ```python notest
428
- q = modal.Queue.lookup("my-queue")
429
- q.put(123)
430
- ```
782
+ DEPRECATED: This method is deprecated; we recommend using `modal.Queue.objects.delete` instead.
431
783
  """
432
784
  ...
433
785
 
434
- lookup: __lookup_spec
786
+ delete: __delete_spec
435
787
 
436
- class __delete_spec(typing_extensions.Protocol):
437
- def __call__(
438
- self,
439
- /,
440
- name: str,
441
- *,
442
- client: typing.Optional[modal.client.Client] = None,
443
- environment_name: typing.Optional[str] = None,
444
- ): ...
445
- async def aio(
446
- self,
447
- /,
448
- name: str,
449
- *,
450
- client: typing.Optional[modal.client.Client] = None,
451
- environment_name: typing.Optional[str] = None,
452
- ): ...
788
+ class __info_spec(typing_extensions.Protocol[SUPERSELF]):
789
+ def __call__(self, /) -> QueueInfo:
790
+ """Return information about the Queue object."""
791
+ ...
453
792
 
454
- delete: __delete_spec
793
+ async def aio(self, /) -> QueueInfo:
794
+ """Return information about the Queue object."""
795
+ ...
796
+
797
+ info: __info_spec[typing_extensions.Self]
455
798
 
456
799
  class ___get_nonblocking_spec(typing_extensions.Protocol[SUPERSELF]):
457
800
  def __call__(self, /, partition: typing.Optional[str], n_values: int) -> list[typing.Any]: ...