modal 1.0.0.dev14__tar.gz → 1.0.0.dev16__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.dev14 → modal-1.0.0.dev16}/PKG-INFO +1 -1
  2. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/__init__.py +10 -2
  3. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_functions.py +3 -35
  4. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/app.py +0 -32
  5. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/app.pyi +0 -29
  6. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/client.pyi +2 -2
  7. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/exception.py +1 -1
  8. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/functions.pyi +2 -22
  9. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal.egg-info/PKG-INFO +1 -1
  10. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_version/__init__.py +1 -1
  11. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/LICENSE +0 -0
  12. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/README.md +0 -0
  13. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/__main__.py +0 -0
  14. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_clustered_functions.py +0 -0
  15. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_clustered_functions.pyi +0 -0
  16. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_container_entrypoint.py +0 -0
  17. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_ipython.py +0 -0
  18. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_location.py +0 -0
  19. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_object.py +0 -0
  20. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_output.py +0 -0
  21. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_partial_function.py +0 -0
  22. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_pty.py +0 -0
  23. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_resolver.py +0 -0
  24. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_resources.py +0 -0
  25. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/__init__.py +0 -0
  26. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/asgi.py +0 -0
  27. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/container_io_manager.py +0 -0
  28. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/container_io_manager.pyi +0 -0
  29. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/execution_context.py +0 -0
  30. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/execution_context.pyi +0 -0
  31. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  32. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/telemetry.py +0 -0
  33. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_runtime/user_code_imports.py +0 -0
  34. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_serialization.py +0 -0
  35. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_traceback.py +0 -0
  36. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_tunnel.py +0 -0
  37. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_tunnel.pyi +0 -0
  38. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_type_manager.py +0 -0
  39. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/__init__.py +0 -0
  40. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/app_utils.py +0 -0
  41. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/async_utils.py +0 -0
  42. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/blob_utils.py +0 -0
  43. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/bytes_io_segment_payload.py +0 -0
  44. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/deprecation.py +0 -0
  45. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/docker_utils.py +0 -0
  46. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/function_utils.py +0 -0
  47. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/git_utils.py +0 -0
  48. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/grpc_testing.py +0 -0
  49. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/grpc_utils.py +0 -0
  50. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/hash_utils.py +0 -0
  51. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/http_utils.py +0 -0
  52. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/jwt_utils.py +0 -0
  53. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/logger.py +0 -0
  54. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/mount_utils.py +0 -0
  55. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/name_utils.py +0 -0
  56. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/package_utils.py +0 -0
  57. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/pattern_utils.py +0 -0
  58. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/rand_pb_testing.py +0 -0
  59. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_utils/shell_utils.py +0 -0
  60. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_vendor/__init__.py +0 -0
  61. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  62. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_vendor/cloudpickle.py +0 -0
  63. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_vendor/tblib.py +0 -0
  64. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/_watcher.py +0 -0
  65. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/call_graph.py +0 -0
  66. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/__init__.py +0 -0
  67. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/_download.py +0 -0
  68. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/_traceback.py +0 -0
  69. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/app.py +0 -0
  70. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/cluster.py +0 -0
  71. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/config.py +0 -0
  72. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/container.py +0 -0
  73. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/dict.py +0 -0
  74. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/entry_point.py +0 -0
  75. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/environment.py +0 -0
  76. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/import_refs.py +0 -0
  77. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/launch.py +0 -0
  78. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/network_file_system.py +0 -0
  79. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/profile.py +0 -0
  80. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/programs/__init__.py +0 -0
  81. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/programs/run_jupyter.py +0 -0
  82. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/programs/vscode.py +0 -0
  83. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/queues.py +0 -0
  84. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/run.py +0 -0
  85. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/secret.py +0 -0
  86. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/token.py +0 -0
  87. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/utils.py +0 -0
  88. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cli/volume.py +0 -0
  89. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/client.py +0 -0
  90. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cloud_bucket_mount.py +0 -0
  91. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cloud_bucket_mount.pyi +0 -0
  92. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cls.py +0 -0
  93. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/cls.pyi +0 -0
  94. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/config.py +0 -0
  95. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/container_process.py +0 -0
  96. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/container_process.pyi +0 -0
  97. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/dict.py +0 -0
  98. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/dict.pyi +0 -0
  99. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/environments.py +0 -0
  100. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/environments.pyi +0 -0
  101. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/experimental/__init__.py +0 -0
  102. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/experimental/ipython.py +0 -0
  103. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/file_io.py +0 -0
  104. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/file_io.pyi +0 -0
  105. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/file_pattern_matcher.py +0 -0
  106. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/functions.py +0 -0
  107. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/gpu.py +0 -0
  108. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/image.py +0 -0
  109. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/image.pyi +0 -0
  110. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/io_streams.py +0 -0
  111. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/io_streams.pyi +0 -0
  112. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/mount.py +0 -0
  113. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/mount.pyi +0 -0
  114. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/network_file_system.py +0 -0
  115. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/network_file_system.pyi +0 -0
  116. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/object.py +0 -0
  117. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/object.pyi +0 -0
  118. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/output.py +0 -0
  119. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/parallel_map.py +0 -0
  120. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/parallel_map.pyi +0 -0
  121. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/partial_function.py +0 -0
  122. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/partial_function.pyi +0 -0
  123. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/proxy.py +0 -0
  124. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/proxy.pyi +0 -0
  125. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/py.typed +0 -0
  126. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/queue.py +0 -0
  127. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/queue.pyi +0 -0
  128. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/2023.12.312.txt +0 -0
  129. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/2023.12.txt +0 -0
  130. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/2024.04.txt +0 -0
  131. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/2024.10.txt +0 -0
  132. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/PREVIEW.txt +0 -0
  133. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/README.md +0 -0
  134. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/requirements/base-images.json +0 -0
  135. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/retries.py +0 -0
  136. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/runner.py +0 -0
  137. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/runner.pyi +0 -0
  138. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/running_app.py +0 -0
  139. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/sandbox.py +0 -0
  140. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/sandbox.pyi +0 -0
  141. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/schedule.py +0 -0
  142. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/scheduler_placement.py +0 -0
  143. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/secret.py +0 -0
  144. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/secret.pyi +0 -0
  145. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/serving.py +0 -0
  146. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/serving.pyi +0 -0
  147. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/snapshot.py +0 -0
  148. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/snapshot.pyi +0 -0
  149. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/stream_type.py +0 -0
  150. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/token_flow.py +0 -0
  151. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/token_flow.pyi +0 -0
  152. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/volume.py +0 -0
  153. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal/volume.pyi +0 -0
  154. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal.egg-info/SOURCES.txt +0 -0
  155. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal.egg-info/dependency_links.txt +0 -0
  156. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal.egg-info/entry_points.txt +0 -0
  157. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal.egg-info/requires.txt +0 -0
  158. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal.egg-info/top_level.txt +0 -0
  159. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_docs/__init__.py +0 -0
  160. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_docs/gen_cli_docs.py +0 -0
  161. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_docs/gen_reference_docs.py +0 -0
  162. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_docs/mdmd/__init__.py +0 -0
  163. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_docs/mdmd/mdmd.py +0 -0
  164. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_docs/mdmd/signatures.py +0 -0
  165. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/__init__.py +0 -0
  166. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/api.proto +0 -0
  167. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/api_grpc.py +0 -0
  168. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/api_pb2.py +0 -0
  169. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/api_pb2.pyi +0 -0
  170. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/api_pb2_grpc.py +0 -0
  171. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/api_pb2_grpc.pyi +0 -0
  172. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/modal_api_grpc.py +0 -0
  173. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/modal_options_grpc.py +0 -0
  174. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/options.proto +0 -0
  175. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/options_grpc.py +0 -0
  176. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/options_pb2.py +0 -0
  177. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/options_pb2.pyi +0 -0
  178. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/options_pb2_grpc.py +0 -0
  179. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/options_pb2_grpc.pyi +0 -0
  180. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_proto/py.typed +0 -0
  181. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/modal_version/__main__.py +0 -0
  182. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/pyproject.toml +0 -0
  183. {modal-1.0.0.dev14 → modal-1.0.0.dev16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.0.dev14
3
+ Version: 1.0.0.dev16
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -11,7 +11,7 @@ from modal_version import __version__
11
11
  try:
12
12
  from ._runtime.execution_context import current_function_call_id, current_input_id, interact, is_local
13
13
  from ._tunnel import Tunnel, forward
14
- from .app import App, Stub
14
+ from .app import App
15
15
  from .client import Client
16
16
  from .cloud_bucket_mount import CloudBucketMount
17
17
  from .cls import Cls, parameter
@@ -54,6 +54,7 @@ except Exception:
54
54
  print()
55
55
  raise
56
56
 
57
+
57
58
  __all__ = [
58
59
  "__version__",
59
60
  "App",
@@ -77,7 +78,6 @@ __all__ = [
77
78
  "SandboxSnapshot",
78
79
  "SchedulerPlacement",
79
80
  "Secret",
80
- "Stub",
81
81
  "Tunnel",
82
82
  "Volume",
83
83
  "asgi_app",
@@ -99,3 +99,11 @@ __all__ = [
99
99
  "web_server",
100
100
  "wsgi_app",
101
101
  ]
102
+
103
+
104
+ def __getattr__(name):
105
+ if name == "Stub":
106
+ raise AttributeError(
107
+ "Module 'modal' has no attribute 'Stub'. Use `modal.App` instead. This is a simple name change."
108
+ )
109
+ raise AttributeError(f"module 'modal' has no attribute '{name}'")
@@ -1508,20 +1508,6 @@ Use the `Function.get_web_url()` method instead.
1508
1508
  async for res in invocation.run_generator():
1509
1509
  yield res
1510
1510
 
1511
- @synchronizer.no_io_translation
1512
- async def _call_generator_nowait(self, args, kwargs):
1513
- deprecation_warning(
1514
- (2024, 12, 11),
1515
- "Calling spawn on a generator function is deprecated and will soon raise an exception.",
1516
- )
1517
- return await _Invocation.create(
1518
- self,
1519
- args,
1520
- kwargs,
1521
- client=self.client,
1522
- function_call_invocation_type=api_pb2.FUNCTION_CALL_INVOCATION_TYPE_ASYNC,
1523
- )
1524
-
1525
1511
  @synchronizer.no_io_translation
1526
1512
  @live_method
1527
1513
  async def remote(self, *args: P.args, **kwargs: P.kwargs) -> ReturnType:
@@ -1634,7 +1620,7 @@ Use the `Function.get_web_url()` method instead.
1634
1620
  """
1635
1621
  self._check_no_web_url("_experimental_spawn")
1636
1622
  if self._is_generator:
1637
- invocation = await self._call_generator_nowait(args, kwargs)
1623
+ raise InvalidError("Cannot `spawn` a generator function.")
1638
1624
  else:
1639
1625
  invocation = await self._call_function_nowait(
1640
1626
  args, kwargs, function_call_invocation_type=api_pb2.FUNCTION_CALL_INVOCATION_TYPE_ASYNC
@@ -1666,14 +1652,13 @@ Use the `Function.get_web_url()` method instead.
1666
1652
  """
1667
1653
  self._check_no_web_url("spawn")
1668
1654
  if self._is_generator:
1669
- invocation = await self._call_generator_nowait(args, kwargs)
1655
+ raise InvalidError("Cannot `spawn` a generator function.")
1670
1656
  else:
1671
1657
  invocation = await self._call_function_nowait(args, kwargs, api_pb2.FUNCTION_CALL_INVOCATION_TYPE_ASYNC)
1672
1658
 
1673
1659
  fc: _FunctionCall[ReturnType] = _FunctionCall._new_hydrated(
1674
1660
  invocation.function_call_id, invocation.client, None
1675
1661
  )
1676
- fc._is_generator = self._is_generator if self._is_generator else False
1677
1662
  return fc
1678
1663
 
1679
1664
  def get_raw_f(self) -> Callable[..., Any]:
@@ -1732,22 +1717,8 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
1732
1717
 
1733
1718
  The returned coroutine is not cancellation-safe.
1734
1719
  """
1735
-
1736
- if self._is_generator:
1737
- raise Exception("Cannot get the result of a generator function call. Use `get_gen` instead.")
1738
-
1739
1720
  return await self._invocation().poll_function(timeout=timeout)
1740
1721
 
1741
- async def get_gen(self) -> AsyncGenerator[Any, None]:
1742
- """
1743
- Calls the generator remotely, executing it with the given arguments and returning the execution's result.
1744
- """
1745
- if not self._is_generator:
1746
- raise Exception("Cannot iterate over a non-generator function call. Use `get` instead.")
1747
-
1748
- async for res in self._invocation().run_generator():
1749
- yield res
1750
-
1751
1722
  async def get_call_graph(self) -> list[InputInfo]:
1752
1723
  """Returns a structure representing the call graph from a given root
1753
1724
  call ID, along with the status of execution for each node.
@@ -1778,9 +1749,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
1778
1749
  await retry_transient_errors(self._client.stub.FunctionCallCancel, request)
1779
1750
 
1780
1751
  @staticmethod
1781
- async def from_id(
1782
- function_call_id: str, client: Optional[_Client] = None, is_generator: bool = False
1783
- ) -> "_FunctionCall[Any]":
1752
+ async def from_id(function_call_id: str, client: Optional[_Client] = None) -> "_FunctionCall[Any]":
1784
1753
  """Instantiate a FunctionCall object from an existing ID.
1785
1754
 
1786
1755
  Examples:
@@ -1803,7 +1772,6 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
1803
1772
  client = await _Client.from_env()
1804
1773
 
1805
1774
  fc: _FunctionCall[Any] = _FunctionCall._new_hydrated(function_call_id, client, None)
1806
- fc._is_generator = is_generator
1807
1775
  return fc
1808
1776
 
1809
1777
  @staticmethod
@@ -1,7 +1,6 @@
1
1
  # Copyright Modal Labs 2022
2
2
  import inspect
3
3
  import typing
4
- import warnings
5
4
  from collections.abc import AsyncGenerator, Coroutine, Sequence
6
5
  from pathlib import PurePosixPath
7
6
  from textwrap import dedent
@@ -78,11 +77,6 @@ class _LocalEntrypoint:
78
77
  def app(self) -> "_App":
79
78
  return self._app
80
79
 
81
- @property
82
- def stub(self) -> "_App":
83
- # Deprecated soon, only for backwards compatibility
84
- return self._app
85
-
86
80
 
87
81
  LocalEntrypoint = synchronize_api(_LocalEntrypoint)
88
82
 
@@ -781,12 +775,6 @@ class _App:
781
775
  rdma = None
782
776
  i6pn_enabled = i6pn
783
777
 
784
- if info.function_name.endswith(".app"):
785
- warnings.warn(
786
- "Beware: the function name is `app`. Modal will soon rename `Stub` to `App`, "
787
- "so you might run into issues if you have code like `app = modal.App()` in the same scope"
788
- )
789
-
790
778
  if is_generator is None:
791
779
  is_generator = inspect.isgeneratorfunction(raw_f) or inspect.isasyncgenfunction(raw_f)
792
780
 
@@ -1096,23 +1084,3 @@ class _App:
1096
1084
 
1097
1085
 
1098
1086
  App = synchronize_api(_App)
1099
-
1100
-
1101
- class _Stub(_App):
1102
- """mdmd:hidden
1103
- This enables using a "Stub" class instead of "App".
1104
-
1105
- For most of Modal's history, the app class was called "Stub", so this exists for
1106
- backwards compatibility, in order to facilitate moving from "Stub" to "App".
1107
- """
1108
-
1109
- def __new__(cls, *args, **kwargs):
1110
- deprecation_warning(
1111
- (2024, 4, 29),
1112
- 'The use of "Stub" has been deprecated in favor of "App".'
1113
- " This is a pure name change with no other implications.",
1114
- )
1115
- return _App(*args, **kwargs)
1116
-
1117
-
1118
- Stub = synchronize_api(_Stub)
@@ -33,8 +33,6 @@ class _LocalEntrypoint:
33
33
  def info(self) -> modal._utils.function_utils.FunctionInfo: ...
34
34
  @property
35
35
  def app(self) -> _App: ...
36
- @property
37
- def stub(self) -> _App: ...
38
36
 
39
37
  class LocalEntrypoint:
40
38
  _info: modal._utils.function_utils.FunctionInfo
@@ -46,8 +44,6 @@ class LocalEntrypoint:
46
44
  def info(self) -> modal._utils.function_utils.FunctionInfo: ...
47
45
  @property
48
46
  def app(self) -> App: ...
49
- @property
50
- def stub(self) -> App: ...
51
47
 
52
48
  def check_sequence(items: typing.Sequence[typing.Any], item_type: type[typing.Any], error_msg: str) -> None: ...
53
49
 
@@ -520,29 +516,4 @@ class App:
520
516
  @classmethod
521
517
  def _reset_container_app(cls): ...
522
518
 
523
- class _Stub(_App):
524
- @staticmethod
525
- def __new__(
526
- cls,
527
- name: typing.Optional[str] = None,
528
- *,
529
- image: typing.Optional[modal.image._Image] = None,
530
- mounts: collections.abc.Sequence[modal.mount._Mount] = [],
531
- secrets: collections.abc.Sequence[modal.secret._Secret] = [],
532
- volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume._Volume] = {},
533
- include_source: typing.Optional[bool] = None,
534
- ): ...
535
-
536
- class Stub(App):
537
- def __init__(
538
- self,
539
- name: typing.Optional[str] = None,
540
- *,
541
- image: typing.Optional[modal.image.Image] = None,
542
- mounts: collections.abc.Sequence[modal.mount.Mount] = [],
543
- secrets: collections.abc.Sequence[modal.secret.Secret] = [],
544
- volumes: dict[typing.Union[str, pathlib.PurePosixPath], modal.volume.Volume] = {},
545
- include_source: typing.Optional[bool] = None,
546
- ) -> None: ...
547
-
548
519
  _default_image: modal.image._Image
@@ -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.dev14",
34
+ version: str = "1.0.0.dev16",
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.dev14",
97
+ version: str = "1.0.0.dev16",
98
98
  ): ...
99
99
  def is_closed(self) -> bool: ...
100
100
  @property
@@ -116,7 +116,7 @@ class InternalFailure(Error):
116
116
 
117
117
  class _CliUserExecutionError(Exception):
118
118
  """mdmd:hidden
119
- Private wrapper for exceptions during when importing or running stubs from the CLI.
119
+ Private wrapper for exceptions during when importing or running Apps from the CLI.
120
120
 
121
121
  This intentionally does not inherit from `modal.exception.Error` because it
122
122
  is a private type that should never bubble up to users. Exceptions raised in
@@ -228,12 +228,6 @@ class Function(
228
228
 
229
229
  _call_generator: ___call_generator_spec[typing_extensions.Self]
230
230
 
231
- class ___call_generator_nowait_spec(typing_extensions.Protocol[SUPERSELF]):
232
- def __call__(self, /, args, kwargs): ...
233
- async def aio(self, /, args, kwargs): ...
234
-
235
- _call_generator_nowait: ___call_generator_nowait_spec[typing_extensions.Self]
236
-
237
231
  class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
238
232
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
239
233
  async def aio(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER: ...
@@ -350,12 +344,6 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
350
344
 
351
345
  get: __get_spec[modal._functions.ReturnType, typing_extensions.Self]
352
346
 
353
- class __get_gen_spec(typing_extensions.Protocol[SUPERSELF]):
354
- def __call__(self, /) -> typing.Generator[typing.Any, None, None]: ...
355
- def aio(self, /) -> collections.abc.AsyncGenerator[typing.Any, None]: ...
356
-
357
- get_gen: __get_gen_spec[typing_extensions.Self]
358
-
359
347
  class __get_call_graph_spec(typing_extensions.Protocol[SUPERSELF]):
360
348
  def __call__(self, /) -> list[modal.call_graph.InputInfo]: ...
361
349
  async def aio(self, /) -> list[modal.call_graph.InputInfo]: ...
@@ -370,18 +358,10 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
370
358
 
371
359
  class __from_id_spec(typing_extensions.Protocol):
372
360
  def __call__(
373
- self,
374
- /,
375
- function_call_id: str,
376
- client: typing.Optional[modal.client.Client] = None,
377
- is_generator: bool = False,
361
+ self, /, function_call_id: str, client: typing.Optional[modal.client.Client] = None
378
362
  ) -> FunctionCall[typing.Any]: ...
379
363
  async def aio(
380
- self,
381
- /,
382
- function_call_id: str,
383
- client: typing.Optional[modal.client.Client] = None,
384
- is_generator: bool = False,
364
+ self, /, function_call_id: str, client: typing.Optional[modal.client.Client] = None
385
365
  ) -> FunctionCall[typing.Any]: ...
386
366
 
387
367
  from_id: __from_id_spec
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.0.dev14
3
+ Version: 1.0.0.dev16
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.dev14"
4
+ __version__ = "1.0.0.dev16"
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