modal 1.0.0.dev3__tar.gz → 1.0.0.dev5__tar.gz

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 (183) hide show
  1. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/PKG-INFO +1 -1
  2. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_object.py +0 -14
  3. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/app.py +0 -38
  4. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/app.pyi +0 -80
  5. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/client.pyi +2 -2
  6. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/container_process.py +1 -9
  7. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/container_process.pyi +3 -3
  8. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/functions.pyi +6 -6
  9. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/image.py +5 -2
  10. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/object.pyi +0 -6
  11. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/runner.py +0 -18
  12. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/runner.pyi +0 -5
  13. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/sandbox.py +0 -20
  14. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/sandbox.pyi +0 -2
  15. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/serving.py +0 -6
  16. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/serving.pyi +0 -3
  17. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/volume.py +6 -13
  18. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal.egg-info/PKG-INFO +1 -1
  19. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_version/__init__.py +1 -1
  20. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/LICENSE +0 -0
  21. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/README.md +0 -0
  22. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/__init__.py +0 -0
  23. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/__main__.py +0 -0
  24. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_clustered_functions.py +0 -0
  25. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_clustered_functions.pyi +0 -0
  26. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_container_entrypoint.py +0 -0
  27. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_functions.py +0 -0
  28. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_ipython.py +0 -0
  29. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_location.py +0 -0
  30. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_output.py +0 -0
  31. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_partial_function.py +0 -0
  32. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_pty.py +0 -0
  33. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_resolver.py +0 -0
  34. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_resources.py +0 -0
  35. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/__init__.py +0 -0
  36. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/asgi.py +0 -0
  37. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/container_io_manager.py +0 -0
  38. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/container_io_manager.pyi +0 -0
  39. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/execution_context.py +0 -0
  40. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/execution_context.pyi +0 -0
  41. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  42. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/telemetry.py +0 -0
  43. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_runtime/user_code_imports.py +0 -0
  44. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_serialization.py +0 -0
  45. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_traceback.py +0 -0
  46. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_tunnel.py +0 -0
  47. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_tunnel.pyi +0 -0
  48. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_type_manager.py +0 -0
  49. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/__init__.py +0 -0
  50. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/app_utils.py +0 -0
  51. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/async_utils.py +0 -0
  52. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/blob_utils.py +0 -0
  53. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/bytes_io_segment_payload.py +0 -0
  54. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/deprecation.py +0 -0
  55. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/docker_utils.py +0 -0
  56. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/function_utils.py +0 -0
  57. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/git_utils.py +0 -0
  58. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/grpc_testing.py +0 -0
  59. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/grpc_utils.py +0 -0
  60. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/hash_utils.py +0 -0
  61. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/http_utils.py +0 -0
  62. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/jwt_utils.py +0 -0
  63. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/logger.py +0 -0
  64. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/mount_utils.py +0 -0
  65. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/name_utils.py +0 -0
  66. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/package_utils.py +0 -0
  67. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/pattern_utils.py +0 -0
  68. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/rand_pb_testing.py +0 -0
  69. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_utils/shell_utils.py +0 -0
  70. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_vendor/__init__.py +0 -0
  71. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  72. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_vendor/cloudpickle.py +0 -0
  73. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_vendor/tblib.py +0 -0
  74. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/_watcher.py +0 -0
  75. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/call_graph.py +0 -0
  76. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/__init__.py +0 -0
  77. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/_download.py +0 -0
  78. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/_traceback.py +0 -0
  79. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/app.py +0 -0
  80. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/cluster.py +0 -0
  81. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/config.py +0 -0
  82. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/container.py +0 -0
  83. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/dict.py +0 -0
  84. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/entry_point.py +0 -0
  85. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/environment.py +0 -0
  86. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/import_refs.py +0 -0
  87. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/launch.py +0 -0
  88. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/network_file_system.py +0 -0
  89. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/profile.py +0 -0
  90. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/programs/__init__.py +0 -0
  91. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/programs/run_jupyter.py +0 -0
  92. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/programs/vscode.py +0 -0
  93. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/queues.py +0 -0
  94. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/run.py +0 -0
  95. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/secret.py +0 -0
  96. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/token.py +0 -0
  97. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/utils.py +0 -0
  98. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cli/volume.py +0 -0
  99. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/client.py +0 -0
  100. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cloud_bucket_mount.py +0 -0
  101. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cloud_bucket_mount.pyi +0 -0
  102. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cls.py +0 -0
  103. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/cls.pyi +0 -0
  104. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/config.py +0 -0
  105. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/dict.py +0 -0
  106. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/dict.pyi +0 -0
  107. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/environments.py +0 -0
  108. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/environments.pyi +0 -0
  109. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/exception.py +0 -0
  110. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/experimental/__init__.py +0 -0
  111. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/experimental/ipython.py +0 -0
  112. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/file_io.py +0 -0
  113. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/file_io.pyi +0 -0
  114. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/file_pattern_matcher.py +0 -0
  115. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/functions.py +0 -0
  116. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/gpu.py +0 -0
  117. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/image.pyi +0 -0
  118. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/io_streams.py +0 -0
  119. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/io_streams.pyi +0 -0
  120. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/mount.py +0 -0
  121. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/mount.pyi +0 -0
  122. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/network_file_system.py +0 -0
  123. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/network_file_system.pyi +0 -0
  124. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/object.py +0 -0
  125. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/output.py +0 -0
  126. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/parallel_map.py +0 -0
  127. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/parallel_map.pyi +0 -0
  128. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/partial_function.py +0 -0
  129. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/partial_function.pyi +0 -0
  130. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/proxy.py +0 -0
  131. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/proxy.pyi +0 -0
  132. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/py.typed +0 -0
  133. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/queue.py +0 -0
  134. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/queue.pyi +0 -0
  135. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/2023.12.312.txt +0 -0
  136. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/2023.12.txt +0 -0
  137. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/2024.04.txt +0 -0
  138. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/2024.10.txt +0 -0
  139. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/PREVIEW.txt +0 -0
  140. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/README.md +0 -0
  141. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/requirements/base-images.json +0 -0
  142. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/retries.py +0 -0
  143. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/running_app.py +0 -0
  144. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/schedule.py +0 -0
  145. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/scheduler_placement.py +0 -0
  146. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/secret.py +0 -0
  147. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/secret.pyi +0 -0
  148. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/snapshot.py +0 -0
  149. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/snapshot.pyi +0 -0
  150. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/stream_type.py +0 -0
  151. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/token_flow.py +0 -0
  152. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/token_flow.pyi +0 -0
  153. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal/volume.pyi +0 -0
  154. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal.egg-info/SOURCES.txt +0 -0
  155. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal.egg-info/dependency_links.txt +0 -0
  156. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal.egg-info/entry_points.txt +0 -0
  157. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal.egg-info/requires.txt +0 -0
  158. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal.egg-info/top_level.txt +0 -0
  159. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_docs/__init__.py +0 -0
  160. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_docs/gen_cli_docs.py +0 -0
  161. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_docs/gen_reference_docs.py +0 -0
  162. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_docs/mdmd/__init__.py +0 -0
  163. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_docs/mdmd/mdmd.py +0 -0
  164. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_docs/mdmd/signatures.py +0 -0
  165. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/__init__.py +0 -0
  166. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/api.proto +0 -0
  167. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/api_grpc.py +0 -0
  168. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/api_pb2.py +0 -0
  169. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/api_pb2.pyi +0 -0
  170. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/api_pb2_grpc.py +0 -0
  171. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/api_pb2_grpc.pyi +0 -0
  172. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/modal_api_grpc.py +0 -0
  173. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/modal_options_grpc.py +0 -0
  174. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/options.proto +0 -0
  175. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/options_grpc.py +0 -0
  176. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/options_pb2.py +0 -0
  177. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/options_pb2.pyi +0 -0
  178. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/options_pb2_grpc.py +0 -0
  179. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/options_pb2_grpc.pyi +0 -0
  180. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_proto/py.typed +0 -0
  181. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/modal_version/__main__.py +0 -0
  182. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/pyproject.toml +0 -0
  183. {modal-1.0.0.dev3 → modal-1.0.0.dev5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.0.dev3
3
+ Version: 1.0.0.dev5
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -10,7 +10,6 @@ from typing_extensions import Self
10
10
 
11
11
  from ._resolver import Resolver
12
12
  from ._utils.async_utils import aclosing
13
- from ._utils.deprecation import deprecation_warning
14
13
  from .client import _Client
15
14
  from .config import config, logger
16
15
  from .exception import ExecutionError, InvalidError
@@ -237,19 +236,6 @@ class _Object:
237
236
 
238
237
  return self._deps if self._deps is not None else default_deps
239
238
 
240
- async def resolve(self, client: Optional[_Client] = None):
241
- """mdmd:hidden"""
242
- obj = self.__class__.__name__.strip("_")
243
- deprecation_warning(
244
- (2025, 1, 16),
245
- f"The `{obj}.resolve` method is deprecated and will be removed in a future release."
246
- f" Please use `{obj}.hydrate()` or `await {obj}.hydrate.aio()` instead."
247
- "\n\nNote that it is rarely necessary to explicitly hydrate objects, as most methods"
248
- " will lazily hydrate when needed.",
249
- show_source=False, # synchronicity interferes with attributing source correctly
250
- )
251
- await self.hydrate(client)
252
-
253
239
  async def hydrate(self, client: Optional[_Client] = None) -> Self:
254
240
  """Synchronize the local object with its identity on the Modal server.
255
241
 
@@ -1037,44 +1037,6 @@ class _App:
1037
1037
 
1038
1038
  return wrapper
1039
1039
 
1040
- async def spawn_sandbox(
1041
- self,
1042
- *entrypoint_args: str,
1043
- image: Optional[_Image] = None, # The image to run as the container for the sandbox.
1044
- mounts: Sequence[_Mount] = (), # Mounts to attach to the sandbox.
1045
- secrets: Sequence[_Secret] = (), # Environment variables to inject into the sandbox.
1046
- network_file_systems: dict[Union[str, PurePosixPath], _NetworkFileSystem] = {},
1047
- timeout: Optional[int] = None, # Maximum execution time of the sandbox in seconds.
1048
- workdir: Optional[str] = None, # Working directory of the sandbox.
1049
- gpu: GPU_T = None,
1050
- cloud: Optional[str] = None,
1051
- region: Optional[Union[str, Sequence[str]]] = None, # Region or regions to run the sandbox on.
1052
- # Specify, in fractional CPU cores, how many CPU cores to request.
1053
- # Or, pass (request, limit) to additionally specify a hard limit in fractional CPU cores.
1054
- # CPU throttling will prevent a container from exceeding its specified limit.
1055
- cpu: Optional[Union[float, tuple[float, float]]] = None,
1056
- # Specify, in MiB, a memory request which is the minimum memory required.
1057
- # Or, pass (request, limit) to additionally specify a hard limit in MiB.
1058
- memory: Optional[Union[int, tuple[int, int]]] = None,
1059
- block_network: bool = False, # Whether to block network access
1060
- volumes: dict[
1061
- Union[str, PurePosixPath], Union[_Volume, _CloudBucketMount]
1062
- ] = {}, # Mount points for Modal Volumes and CloudBucketMounts
1063
- pty_info: Optional[api_pb2.PTYInfo] = None,
1064
- _experimental_scheduler_placement: Optional[
1065
- SchedulerPlacement
1066
- ] = None, # Experimental controls over fine-grained scheduling (alpha).
1067
- ) -> None:
1068
- """mdmd:hidden"""
1069
- arglist = ", ".join(repr(s) for s in entrypoint_args)
1070
- message = (
1071
- "`App.spawn_sandbox` is deprecated.\n\n"
1072
- "Sandboxes can be created using the `Sandbox` object:\n\n"
1073
- f"```\nsb = Sandbox.create({arglist}, app=app)\n```\n\n"
1074
- "See https://modal.com/docs/guide/sandbox for more info on working with sandboxes."
1075
- )
1076
- deprecation_error((2024, 7, 5), message)
1077
-
1078
1040
  def include(self, /, other_app: "_App") -> typing_extensions.Self:
1079
1041
  """Include another App's objects in this one.
1080
1042
 
@@ -20,7 +20,6 @@ import modal.schedule
20
20
  import modal.scheduler_placement
21
21
  import modal.secret
22
22
  import modal.volume
23
- import modal_proto.api_pb2
24
23
  import pathlib
25
24
  import synchronicity.combined_types
26
25
  import typing
@@ -263,30 +262,6 @@ class _App:
263
262
  _experimental_buffer_containers: typing.Optional[int] = None,
264
263
  allow_cross_region_volumes: typing.Optional[bool] = None,
265
264
  ) -> collections.abc.Callable[[typing.Union[CLS_T, modal._partial_function._PartialFunction]], CLS_T]: ...
266
- async def spawn_sandbox(
267
- self,
268
- *entrypoint_args: str,
269
- image: typing.Optional[modal.image._Image] = None,
270
- mounts: collections.abc.Sequence[modal.mount._Mount] = (),
271
- secrets: collections.abc.Sequence[modal.secret._Secret] = (),
272
- network_file_systems: dict[
273
- typing.Union[str, pathlib.PurePosixPath], modal.network_file_system._NetworkFileSystem
274
- ] = {},
275
- timeout: typing.Optional[int] = None,
276
- workdir: typing.Optional[str] = None,
277
- gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
278
- cloud: typing.Optional[str] = None,
279
- region: typing.Union[str, collections.abc.Sequence[str], None] = None,
280
- cpu: typing.Union[float, tuple[float, float], None] = None,
281
- memory: typing.Union[int, tuple[int, int], None] = None,
282
- block_network: bool = False,
283
- volumes: dict[
284
- typing.Union[str, pathlib.PurePosixPath],
285
- typing.Union[modal.volume._Volume, modal.cloud_bucket_mount._CloudBucketMount],
286
- ] = {},
287
- pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
288
- _experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
289
- ) -> None: ...
290
265
  def include(self, /, other_app: _App) -> typing_extensions.Self: ...
291
266
  def _logs(
292
267
  self, client: typing.Optional[modal.client._Client] = None
@@ -537,61 +512,6 @@ class App:
537
512
  _experimental_buffer_containers: typing.Optional[int] = None,
538
513
  allow_cross_region_volumes: typing.Optional[bool] = None,
539
514
  ) -> collections.abc.Callable[[typing.Union[CLS_T, modal.partial_function.PartialFunction]], CLS_T]: ...
540
-
541
- class __spawn_sandbox_spec(typing_extensions.Protocol[SUPERSELF]):
542
- def __call__(
543
- self,
544
- /,
545
- *entrypoint_args: str,
546
- image: typing.Optional[modal.image.Image] = None,
547
- mounts: collections.abc.Sequence[modal.mount.Mount] = (),
548
- secrets: collections.abc.Sequence[modal.secret.Secret] = (),
549
- network_file_systems: dict[
550
- typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
551
- ] = {},
552
- timeout: typing.Optional[int] = None,
553
- workdir: typing.Optional[str] = None,
554
- gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
555
- cloud: typing.Optional[str] = None,
556
- region: typing.Union[str, collections.abc.Sequence[str], None] = None,
557
- cpu: typing.Union[float, tuple[float, float], None] = None,
558
- memory: typing.Union[int, tuple[int, int], None] = None,
559
- block_network: bool = False,
560
- volumes: dict[
561
- typing.Union[str, pathlib.PurePosixPath],
562
- typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
563
- ] = {},
564
- pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
565
- _experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
566
- ) -> None: ...
567
- async def aio(
568
- self,
569
- /,
570
- *entrypoint_args: str,
571
- image: typing.Optional[modal.image.Image] = None,
572
- mounts: collections.abc.Sequence[modal.mount.Mount] = (),
573
- secrets: collections.abc.Sequence[modal.secret.Secret] = (),
574
- network_file_systems: dict[
575
- typing.Union[str, pathlib.PurePosixPath], modal.network_file_system.NetworkFileSystem
576
- ] = {},
577
- timeout: typing.Optional[int] = None,
578
- workdir: typing.Optional[str] = None,
579
- gpu: typing.Union[None, str, modal.gpu._GPUConfig] = None,
580
- cloud: typing.Optional[str] = None,
581
- region: typing.Union[str, collections.abc.Sequence[str], None] = None,
582
- cpu: typing.Union[float, tuple[float, float], None] = None,
583
- memory: typing.Union[int, tuple[int, int], None] = None,
584
- block_network: bool = False,
585
- volumes: dict[
586
- typing.Union[str, pathlib.PurePosixPath],
587
- typing.Union[modal.volume.Volume, modal.cloud_bucket_mount.CloudBucketMount],
588
- ] = {},
589
- pty_info: typing.Optional[modal_proto.api_pb2.PTYInfo] = None,
590
- _experimental_scheduler_placement: typing.Optional[modal.scheduler_placement.SchedulerPlacement] = None,
591
- ) -> None: ...
592
-
593
- spawn_sandbox: __spawn_sandbox_spec[typing_extensions.Self]
594
-
595
515
  def include(self, /, other_app: App) -> typing_extensions.Self: ...
596
516
 
597
517
  class ___logs_spec(typing_extensions.Protocol[SUPERSELF]):
@@ -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 = "1.0.0.dev3",
34
+ version: str = "1.0.0.dev5",
35
35
  ): ...
36
36
  def is_closed(self) -> bool: ...
37
37
  @property
@@ -94,7 +94,7 @@ class Client:
94
94
  server_url: str,
95
95
  client_type: int,
96
96
  credentials: typing.Optional[tuple[str, str]],
97
- version: str = "1.0.0.dev3",
97
+ version: str = "1.0.0.dev5",
98
98
  ): ...
99
99
  def is_closed(self) -> bool: ...
100
100
  @property
@@ -6,7 +6,6 @@ from typing import Generic, Optional, TypeVar
6
6
  from modal_proto import api_pb2
7
7
 
8
8
  from ._utils.async_utils import TaskContext, synchronize_api
9
- from ._utils.deprecation import deprecation_error
10
9
  from ._utils.grpc_utils import retry_transient_errors
11
10
  from ._utils.shell_utils import stream_from_stdin, write_to_fd
12
11
  from .client import _Client
@@ -118,18 +117,11 @@ class _ContainerProcess(Generic[T]):
118
117
  self._returncode = resp.exit_code
119
118
  return self._returncode
120
119
 
121
- async def attach(self, *, pty: Optional[bool] = None):
120
+ async def attach(self):
122
121
  if platform.system() == "Windows":
123
122
  print("interactive exec is not currently supported on Windows.")
124
123
  return
125
124
 
126
- if pty is not None:
127
- deprecation_error(
128
- (2024, 12, 9),
129
- "The `pty` argument to `modal.container_process.attach(pty=...)` is deprecated, "
130
- "as only PTY mode is supported. Please remove the argument.",
131
- )
132
-
133
125
  from rich.console import Console
134
126
 
135
127
  console = Console()
@@ -35,7 +35,7 @@ class _ContainerProcess(typing.Generic[T]):
35
35
  def returncode(self) -> int: ...
36
36
  async def poll(self) -> typing.Optional[int]: ...
37
37
  async def wait(self) -> int: ...
38
- async def attach(self, *, pty: typing.Optional[bool] = None): ...
38
+ async def attach(self): ...
39
39
 
40
40
  SUPERSELF = typing.TypeVar("SUPERSELF", covariant=True)
41
41
 
@@ -80,7 +80,7 @@ class ContainerProcess(typing.Generic[T]):
80
80
  wait: __wait_spec[typing_extensions.Self]
81
81
 
82
82
  class __attach_spec(typing_extensions.Protocol[SUPERSELF]):
83
- def __call__(self, /, *, pty: typing.Optional[bool] = None): ...
84
- async def aio(self, /, *, pty: typing.Optional[bool] = None): ...
83
+ def __call__(self, /): ...
84
+ async def aio(self, /): ...
85
85
 
86
86
  attach: __attach_spec[typing_extensions.Self]
@@ -234,11 +234,11 @@ class Function(
234
234
 
235
235
  _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
236
236
 
237
- class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
237
+ class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
238
238
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
239
239
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
240
240
 
241
- remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
241
+ remote: __remote_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
242
242
 
243
243
  class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
244
244
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]: ...
@@ -253,12 +253,12 @@ class Function(
253
253
  self, *args: modal._functions.P.args, **kwargs: modal._functions.P.kwargs
254
254
  ) -> modal._functions.OriginalReturnType: ...
255
255
 
256
- class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
256
+ class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
257
257
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
258
258
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
259
259
 
260
260
  _experimental_spawn: ___experimental_spawn_spec[
261
- modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
261
+ modal._functions.ReturnType, modal._functions.P, typing_extensions.Self
262
262
  ]
263
263
 
264
264
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
@@ -267,11 +267,11 @@ class Function(
267
267
 
268
268
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
269
269
 
270
- class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
270
+ class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER, SUPERSELF]):
271
271
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
272
272
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]: ...
273
273
 
274
- spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
274
+ spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P, typing_extensions.Self]
275
275
 
276
276
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]: ...
277
277
 
@@ -1011,13 +1011,16 @@ class _Image(_Object, type_prefix="im"):
1011
1011
  pkgs = _flatten_str_args("pip_install", "packages", packages)
1012
1012
  if not pkgs:
1013
1013
  return self
1014
+ elif not _validate_packages(pkgs):
1015
+ raise InvalidError(
1016
+ "Package list for `Image.pip_install` cannot contain other arguments;"
1017
+ " try the `extra_options` parameter instead."
1018
+ )
1014
1019
 
1015
1020
  def build_dockerfile(version: ImageBuilderVersion) -> DockerfileSpec:
1016
1021
  package_args = shlex.join(sorted(pkgs))
1017
1022
  extra_args = _make_pip_install_args(find_links, index_url, extra_index_url, pre, extra_options)
1018
1023
  commands = ["FROM base", f"RUN python -m pip install {package_args} {extra_args}"]
1019
- if not _validate_packages(pkgs):
1020
- _warn_invalid_packages(commands[-1].split("RUN ")[-1])
1021
1024
  if version > "2023.12": # Back-compat for legacy trailing space with empty extra_args
1022
1025
  commands = [cmd.strip() for cmd in commands]
1023
1026
  return DockerfileSpec(commands=commands, context_files={})
@@ -124,12 +124,6 @@ class Object:
124
124
  @property
125
125
  def deps(self) -> collections.abc.Callable[..., collections.abc.Sequence[Object]]: ...
126
126
 
127
- class __resolve_spec(typing_extensions.Protocol[SUPERSELF]):
128
- def __call__(self, /, client: typing.Optional[modal.client.Client] = None): ...
129
- async def aio(self, /, client: typing.Optional[modal.client.Client] = None): ...
130
-
131
- resolve: __resolve_spec[typing_extensions.Self]
132
-
133
127
  class __hydrate_spec(typing_extensions.Protocol[SUPERSELF]):
134
128
  def __call__(self, /, client: typing.Optional[modal.client.Client] = None) -> SUPERSELF: ...
135
129
  async def aio(self, /, client: typing.Optional[modal.client.Client] = None) -> SUPERSELF: ...
@@ -27,7 +27,6 @@ from ._pty import get_pty_info
27
27
  from ._resolver import Resolver
28
28
  from ._traceback import print_server_warnings, traceback_contains_remote_call
29
29
  from ._utils.async_utils import TaskContext, gather_cancel_on_exc, synchronize_api
30
- from ._utils.deprecation import deprecation_error
31
30
  from ._utils.git_utils import get_git_commit_info
32
31
  from ._utils.grpc_utils import retry_transient_errors
33
32
  from ._utils.name_utils import check_object_name, is_valid_tag
@@ -632,24 +631,7 @@ async def _interactive_shell(
632
631
  raise
633
632
 
634
633
 
635
- def _run_stub(*args: Any, **kwargs: Any):
636
- """mdmd:hidden
637
- `run_stub` has been renamed to `run_app` and is deprecated. Please update your code.
638
- """
639
- deprecation_error(
640
- (2024, 5, 1), "`run_stub` has been renamed to `run_app` and is deprecated. Please update your code."
641
- )
642
-
643
-
644
- def _deploy_stub(*args: Any, **kwargs: Any):
645
- """mdmd:hidden"""
646
- message = "`deploy_stub` has been renamed to `deploy_app`. Please update your code."
647
- deprecation_error((2024, 5, 1), message)
648
-
649
-
650
634
  run_app = synchronize_api(_run_app)
651
635
  serve_update = synchronize_api(_serve_update)
652
636
  deploy_app = synchronize_api(_deploy_app)
653
637
  interactive_shell = synchronize_api(_interactive_shell)
654
- run_stub = synchronize_api(_run_stub)
655
- deploy_stub = synchronize_api(_deploy_stub)
@@ -83,8 +83,6 @@ async def _deploy_app(
83
83
  async def _interactive_shell(
84
84
  _app: _App, cmds: list[str], environment_name: str = "", pty: bool = True, **kwargs: typing.Any
85
85
  ) -> None: ...
86
- def _run_stub(*args: typing.Any, **kwargs: typing.Any): ...
87
- def _deploy_stub(*args: typing.Any, **kwargs: typing.Any): ...
88
86
 
89
87
  class __run_app_spec(typing_extensions.Protocol):
90
88
  def __call__(
@@ -153,6 +151,3 @@ class __interactive_shell_spec(typing_extensions.Protocol):
153
151
  ) -> None: ...
154
152
 
155
153
  interactive_shell: __interactive_shell_spec
156
-
157
- def run_stub(*args: typing.Any, **kwargs: typing.Any): ...
158
- def deploy_stub(*args: typing.Any, **kwargs: typing.Any): ...
@@ -762,23 +762,3 @@ class _Sandbox(_Object, type_prefix="sb"):
762
762
 
763
763
 
764
764
  Sandbox = synchronize_api(_Sandbox)
765
-
766
-
767
- def __getattr__(name):
768
- if name == "LogsReader":
769
- deprecation_error(
770
- (2024, 8, 12),
771
- "`modal.sandbox.LogsReader` is deprecated. Please import `modal.io_streams.StreamReader` instead.",
772
- )
773
- from .io_streams import StreamReader
774
-
775
- return StreamReader
776
- elif name == "StreamWriter":
777
- deprecation_error(
778
- (2024, 8, 12),
779
- "`modal.sandbox.StreamWriter` is deprecated. Please import `modal.io_streams.StreamWriter` instead.",
780
- )
781
- from .io_streams import StreamWriter
782
-
783
- return StreamWriter
784
- raise AttributeError(f"module {__name__} has no attribute {name}")
@@ -484,6 +484,4 @@ class Sandbox(modal.object.Object):
484
484
 
485
485
  list: __list_spec
486
486
 
487
- def __getattr__(name): ...
488
-
489
487
  _default_image: modal.image._Image
@@ -11,7 +11,6 @@ from synchronicity.async_wrap import asynccontextmanager
11
11
  from modal._output import OutputManager
12
12
 
13
13
  from ._utils.async_utils import TaskContext, asyncify, synchronize_api, synchronizer
14
- from ._utils.deprecation import deprecation_error
15
14
  from ._utils.logger import logger
16
15
  from ._watcher import watch
17
16
  from .cli.import_refs import ImportRef, import_app_from_ref
@@ -122,9 +121,4 @@ async def _serve_app(
122
121
  yield app
123
122
 
124
123
 
125
- def _serve_stub(*args, **kwargs):
126
- deprecation_error((2024, 5, 1), "`serve_stub` is deprecated. Please use `serve_app` instead.")
127
-
128
-
129
124
  serve_app = synchronize_api(_serve_app)
130
- serve_stub = synchronize_api(_serve_stub)
@@ -33,7 +33,6 @@ def _serve_app(
33
33
  _watcher: typing.Optional[collections.abc.AsyncGenerator[set[str], None]] = None,
34
34
  environment_name: typing.Optional[str] = None,
35
35
  ) -> typing.AsyncContextManager[_App]: ...
36
- def _serve_stub(*args, **kwargs): ...
37
36
 
38
37
  class __serve_app_spec(typing_extensions.Protocol):
39
38
  def __call__(
@@ -56,5 +55,3 @@ class __serve_app_spec(typing_extensions.Protocol):
56
55
  ) -> typing.AsyncContextManager[_App]: ...
57
56
 
58
57
  serve_app: __serve_app_spec
59
-
60
- def serve_stub(*args, **kwargs): ...
@@ -27,7 +27,7 @@ from grpclib import GRPCError, Status
27
27
  from synchronicity.async_wrap import asynccontextmanager
28
28
 
29
29
  import modal_proto.api_pb2
30
- from modal.exception import VolumeUploadTimeoutError
30
+ from modal.exception import InvalidError, VolumeUploadTimeoutError
31
31
  from modal_proto import api_pb2
32
32
 
33
33
  from ._object import EPHEMERAL_OBJECT_HEARTBEAT_SLEEP, _get_environment_name, _Object, live_method, live_method_gen
@@ -49,7 +49,7 @@ from ._utils.blob_utils import (
49
49
  get_file_upload_spec_from_fileobj,
50
50
  get_file_upload_spec_from_path,
51
51
  )
52
- from ._utils.deprecation import deprecation_error, deprecation_warning
52
+ from ._utils.deprecation import deprecation_warning
53
53
  from ._utils.grpc_utils import retry_transient_errors
54
54
  from ._utils.http_utils import ClientSessionRegistry
55
55
  from ._utils.name_utils import check_object_name
@@ -364,21 +364,14 @@ class _Volume(_Object, type_prefix="vo"):
364
364
  recursively.
365
365
  """
366
366
  if path.endswith("**"):
367
- msg = (
367
+ raise InvalidError(
368
368
  "Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
369
369
  "Please pass recursive=True instead. For the CLI, just remove the glob suffix."
370
370
  )
371
- deprecation_error(
372
- (2024, 4, 23),
373
- msg,
374
- )
375
371
  elif path.endswith("*"):
376
- deprecation_error(
377
- (2024, 4, 23),
378
- (
379
- "Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
380
- "Please remove the glob `*` suffix."
381
- ),
372
+ raise InvalidError(
373
+ "Glob patterns in `volume get` and `Volume.listdir()` are deprecated. "
374
+ "Please remove the glob `*` suffix."
382
375
  )
383
376
 
384
377
  req = api_pb2.VolumeListFilesRequest(volume_id=self.object_id, path=path, recursive=recursive)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.0.dev3
3
+ Version: 1.0.0.dev5
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.0.0.dev3"
4
+ __version__ = "1.0.0.dev5"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes