modal 1.5.5.dev16__tar.gz → 1.5.5.dev17__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.
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/PKG-INFO +1 -1
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_functions.py +33 -2
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_object.py +30 -3
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_serialization.py +2 -5
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/deprecation.py +29 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/app.py +30 -4
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/launch.py +2 -6
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/run.py +10 -14
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/shell.py +2 -2
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/client.pyi +2 -2
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cls.py +9 -2
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/exception.py +13 -2
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/functions.pyi +6 -6
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/object.pyi +7 -1
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/runner.py +1 -1
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/sandbox.py +0 -10
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/sandbox.pyi +0 -30
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/api_pb2.py +814 -814
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/api_pb2.pyi +14 -5
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/task_command_router_pb2.py +34 -34
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/task_command_router_pb2.pyi +15 -3
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_version/__init__.py +1 -1
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/LICENSE +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/README.md +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/__main__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_billing.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_clustered_functions.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_clustered_functions.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_container_entrypoint.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_environments.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_function_variants.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_grpc_client.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_image.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_ipython.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_load_context.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_location.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_logs.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_logs_manager.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_logs_manager.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_output/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_output/manager.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_output/pty.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_output/rich.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_output/status.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_partial_function.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_resolver.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_resources.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/asgi.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/container_io_manager.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/execution_context.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/task_lifecycle_manager.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/task_lifecycle_manager.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/telemetry.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/user_code_event_loop.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_runtime/user_code_imports.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_server.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_supports_logs.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_traceback.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_tunnel.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_tunnel.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_type_manager.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/app_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/async_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/blob_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/browser_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/curl_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/display_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/docker_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/function_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/git_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/hash_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/http_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/logger.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/mount_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/name_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/package_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/proxy_support.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/sandbox_fs_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/shell_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/task_command_router_client.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_utils/time_utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_vendor/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_vendor/tblib.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_vendor/version.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_watcher.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/_workspace.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/app.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/billing.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/billing.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/2023.12.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/2024.04.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/2024.10.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/2025.06.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/README.md +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/builder/base-images.json +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/call_graph.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/_download.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/_help.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/_traceback.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/app.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/billing.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/bootstrap.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/changelog.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/cluster.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/config.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/container.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/curl.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/dashboard.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/dict.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/endpoint.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/entry_point.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/environment.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/image.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/import_refs.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/logo.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/network_file_system.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/profile.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/programs/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/programs/vscode.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/queues.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/secret.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/selector.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/skills.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/token.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/utils.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/volume.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cli/workspace.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/client.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/cls.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/config.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/container_process.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/container_process.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/dict.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/dict.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/environments.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/environments.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/experimental/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/experimental/flash.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/experimental/flash.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/experimental/ipython.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/file_io.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/file_io.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/file_pattern_matcher.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/functions.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/image.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/image.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/io_streams.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/io_streams.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/mount.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/mount.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/network_file_system.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/network_file_system.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/object.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/output.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/parallel_map.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/parallel_map.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/partial_function.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/partial_function.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/proxy.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/proxy.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/py.typed +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/queue.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/queue.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/retries.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/runner.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/running_app.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/sandbox_fs.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/sandbox_fs.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/schedule.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/scheduler_placement.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/secret.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/secret.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/server.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/server.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/serving.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/serving.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/skills/modal/SKILL.md +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/snapshot.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/snapshot.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/stream_type.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/token_flow.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/token_flow.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/types.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/volume.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/volume.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/workspace.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal/workspace.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal.egg-info/requires.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal.egg-info/top_level.txt +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/gen_cli_docs_main.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/gen_reference_docs_main.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/mdmd/types.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_docs/reference_intro.md +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/__init__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/api_grpc.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/py.typed +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/task_command_router_grpc.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/task_command_router_pb2_grpc.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/modal_version/__main__.py +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/pyproject.toml +0 -0
- {modal-1.5.5.dev16 → modal-1.5.5.dev17}/setup.cfg +0 -0
|
@@ -46,6 +46,7 @@ from ._utils.async_utils import (
|
|
|
46
46
|
warn_if_generator_is_not_consumed,
|
|
47
47
|
)
|
|
48
48
|
from ._utils.blob_utils import MAX_ASYNC_OBJECT_SIZE_BYTES, MAX_OBJECT_SIZE_BYTES
|
|
49
|
+
from ._utils.deprecation import with_deprecation_warning
|
|
49
50
|
from ._utils.function_utils import (
|
|
50
51
|
ATTEMPT_TIMEOUT_GRACE_PERIOD,
|
|
51
52
|
OUTPUTS_TIMEOUT,
|
|
@@ -1194,7 +1195,10 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1194
1195
|
|
|
1195
1196
|
return obj
|
|
1196
1197
|
|
|
1197
|
-
from_local =
|
|
1198
|
+
from_local = with_deprecation_warning(
|
|
1199
|
+
(2026, 8, 26),
|
|
1200
|
+
"`Function.from_local` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1201
|
+
)(_from_local)
|
|
1198
1202
|
"""mdmd:hidden"""
|
|
1199
1203
|
|
|
1200
1204
|
async def _update_autoscaler(
|
|
@@ -1389,6 +1393,10 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1389
1393
|
)
|
|
1390
1394
|
|
|
1391
1395
|
@property
|
|
1396
|
+
@with_deprecation_warning(
|
|
1397
|
+
(2026, 8, 26),
|
|
1398
|
+
"`Function.tag` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1399
|
+
)
|
|
1392
1400
|
def tag(self) -> str:
|
|
1393
1401
|
"""mdmd:hidden"""
|
|
1394
1402
|
return self._tag_
|
|
@@ -1407,12 +1415,20 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1407
1415
|
return self._app
|
|
1408
1416
|
|
|
1409
1417
|
@property
|
|
1418
|
+
@with_deprecation_warning(
|
|
1419
|
+
(2026, 8, 26),
|
|
1420
|
+
"`Function.stub` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1421
|
+
)
|
|
1410
1422
|
def stub(self) -> "modal.app._App":
|
|
1411
1423
|
"""mdmd:hidden"""
|
|
1412
1424
|
# Deprecated soon, only for backwards compatibility
|
|
1413
1425
|
return self.app
|
|
1414
1426
|
|
|
1415
1427
|
@property
|
|
1428
|
+
@with_deprecation_warning(
|
|
1429
|
+
(2026, 8, 26),
|
|
1430
|
+
"`Function.info` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1431
|
+
)
|
|
1416
1432
|
def info(self) -> FunctionInfo:
|
|
1417
1433
|
"""mdmd:hidden"""
|
|
1418
1434
|
return self._info_
|
|
@@ -1423,6 +1439,10 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1423
1439
|
return self._info
|
|
1424
1440
|
|
|
1425
1441
|
@property
|
|
1442
|
+
@with_deprecation_warning(
|
|
1443
|
+
(2026, 8, 26),
|
|
1444
|
+
"`Function.spec` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1445
|
+
)
|
|
1426
1446
|
def spec(self) -> _FunctionSpec:
|
|
1427
1447
|
"""mdmd:hidden"""
|
|
1428
1448
|
return self._spec_
|
|
@@ -1443,7 +1463,10 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1443
1463
|
assert hasattr(self, "_raw_f") and hasattr(self, "_build_args") and self._raw_f is not None
|
|
1444
1464
|
return f"{inspect.getsource(self._raw_f)}\n{repr(self._build_args)}"
|
|
1445
1465
|
|
|
1446
|
-
get_build_def =
|
|
1466
|
+
get_build_def = with_deprecation_warning(
|
|
1467
|
+
(2026, 8, 26),
|
|
1468
|
+
"`Function.get_build_def` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1469
|
+
)(_get_build_def)
|
|
1447
1470
|
"""mdmd:hidden"""
|
|
1448
1471
|
|
|
1449
1472
|
# Live handle methods
|
|
@@ -1693,6 +1716,10 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
1693
1716
|
return self._apply_dynamic_config(options, "with_batching")
|
|
1694
1717
|
|
|
1695
1718
|
@property
|
|
1719
|
+
@with_deprecation_warning(
|
|
1720
|
+
(2026, 8, 26),
|
|
1721
|
+
"`Function.is_generator` is deprecated and will be removed in `modal` version 1.6.0",
|
|
1722
|
+
)
|
|
1696
1723
|
async def is_generator(self) -> bool:
|
|
1697
1724
|
"""mdmd:hidden"""
|
|
1698
1725
|
return await self._is_generator_
|
|
@@ -2032,6 +2059,10 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
|
|
|
2032
2059
|
fc._function_id = self.object_id
|
|
2033
2060
|
return fc
|
|
2034
2061
|
|
|
2062
|
+
@with_deprecation_warning(
|
|
2063
|
+
(2026, 8, 26),
|
|
2064
|
+
"`Function.get_raw_f` is deprecated and will be removed in `modal` version 1.6.0",
|
|
2065
|
+
)
|
|
2035
2066
|
def get_raw_f(self) -> Callable[..., Any]:
|
|
2036
2067
|
"""Return the inner Python object wrapped by this Modal Function.
|
|
2037
2068
|
|
|
@@ -9,11 +9,11 @@ from typing import ClassVar
|
|
|
9
9
|
from google.protobuf.message import Message
|
|
10
10
|
from typing_extensions import Self
|
|
11
11
|
|
|
12
|
-
from modal._traceback import suppress_tb_frame
|
|
13
|
-
|
|
14
12
|
from ._load_context import LoadContext
|
|
15
13
|
from ._resolver import Resolver
|
|
14
|
+
from ._traceback import suppress_tb_frame
|
|
16
15
|
from ._utils.async_utils import TaskContext, aclosing
|
|
16
|
+
from ._utils.deprecation import deprecation_warning
|
|
17
17
|
from .client import _Client
|
|
18
18
|
from .config import config, logger
|
|
19
19
|
from .exception import ExecutionError, InvalidError
|
|
@@ -91,13 +91,21 @@ class _Object:
|
|
|
91
91
|
# For hydrated objects
|
|
92
92
|
_object_id: str | None
|
|
93
93
|
_client: _Client | None
|
|
94
|
-
|
|
94
|
+
__is_hydrated: bool
|
|
95
95
|
_is_rehydrated: bool
|
|
96
96
|
|
|
97
97
|
# Not all object subclasses have a meaningful "name" concept
|
|
98
98
|
# So whether they expose this is a matter of having a name property
|
|
99
99
|
_name: str | None
|
|
100
100
|
|
|
101
|
+
@property
|
|
102
|
+
def _is_hydrated(self) -> bool:
|
|
103
|
+
return self.__is_hydrated
|
|
104
|
+
|
|
105
|
+
@_is_hydrated.setter
|
|
106
|
+
def _is_hydrated(self, value: bool):
|
|
107
|
+
self.__is_hydrated = value
|
|
108
|
+
|
|
101
109
|
@classmethod
|
|
102
110
|
def __init_subclass__(cls, type_prefix: str | None = None):
|
|
103
111
|
super().__init_subclass__()
|
|
@@ -281,9 +289,18 @@ class _Object:
|
|
|
281
289
|
def __repr__(self):
|
|
282
290
|
return self._rep
|
|
283
291
|
|
|
292
|
+
@property
|
|
293
|
+
def _class_name(self):
|
|
294
|
+
return self.__class__.__name__.removeprefix("_")
|
|
295
|
+
|
|
284
296
|
@property
|
|
285
297
|
def local_uuid(self):
|
|
286
298
|
"""mdmd:hidden"""
|
|
299
|
+
deprecation_warning(
|
|
300
|
+
(2026, 8, 26),
|
|
301
|
+
f"`{self._class_name}.local_uuid` is deprecated and will be removed in `modal` version 1.6.0",
|
|
302
|
+
)
|
|
303
|
+
|
|
287
304
|
return self._local_uuid
|
|
288
305
|
|
|
289
306
|
@property
|
|
@@ -308,11 +325,21 @@ class _Object:
|
|
|
308
325
|
@property
|
|
309
326
|
def is_hydrated(self) -> bool:
|
|
310
327
|
"""mdmd:hidden"""
|
|
328
|
+
deprecation_warning(
|
|
329
|
+
(2026, 8, 26),
|
|
330
|
+
f"`{self._class_name}.is_hydrated` is deprecated and will be removed in `modal` version 1.6.0",
|
|
331
|
+
)
|
|
332
|
+
|
|
311
333
|
return self._is_hydrated
|
|
312
334
|
|
|
313
335
|
@property
|
|
314
336
|
def deps(self) -> Callable[..., Sequence["_Object"]]:
|
|
315
337
|
"""mdmd:hidden"""
|
|
338
|
+
deprecation_warning(
|
|
339
|
+
(2026, 8, 26),
|
|
340
|
+
f"`{self._class_name}.deps` is deprecated and will be removed in `modal` version 1.6.0",
|
|
341
|
+
)
|
|
342
|
+
|
|
316
343
|
return self._deps_
|
|
317
344
|
|
|
318
345
|
@property
|
|
@@ -4,7 +4,7 @@ import io
|
|
|
4
4
|
import pickle
|
|
5
5
|
import typing
|
|
6
6
|
from inspect import Parameter
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
from modal._traceback import extract_traceback
|
|
10
10
|
from modal.config import config
|
|
@@ -43,11 +43,8 @@ class Pickler(cloudpickle.Pickler):
|
|
|
43
43
|
|
|
44
44
|
if isinstance(obj, _Object):
|
|
45
45
|
flag = "_o"
|
|
46
|
-
is_hydrated = obj._is_hydrated
|
|
47
46
|
elif isinstance(obj, Object):
|
|
48
47
|
flag = "o"
|
|
49
|
-
inner = cast(_Object, synchronizer._translate_in(obj))
|
|
50
|
-
is_hydrated = inner._is_hydrated
|
|
51
48
|
elif isinstance(obj, PartialFunction):
|
|
52
49
|
# Special case for PartialObject since it's a synchronicity wrapped object
|
|
53
50
|
# that's set on serialized classes.
|
|
@@ -70,7 +67,7 @@ class Pickler(cloudpickle.Pickler):
|
|
|
70
67
|
else:
|
|
71
68
|
return
|
|
72
69
|
|
|
73
|
-
if not
|
|
70
|
+
if not obj._is_hydrated:
|
|
74
71
|
raise InvalidError(f"Can't serialize object {obj} which hasn't been hydrated.")
|
|
75
72
|
|
|
76
73
|
return (obj.object_id, flag, obj._get_metadata())
|
|
@@ -118,3 +118,32 @@ def handle_deprecated_parameters(func: Callable[P, R]) -> Callable[P, R]:
|
|
|
118
118
|
return func(*args, **kwargs)
|
|
119
119
|
|
|
120
120
|
return wrapper
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def with_deprecation_warning(
|
|
124
|
+
deprecated_on: tuple[int, int, int], msg: str, *, show_source: bool = True
|
|
125
|
+
) -> Callable[[Callable[P, R]], Callable[P, R]]:
|
|
126
|
+
def decorator(method: Callable[P, R]) -> Callable[P, R]:
|
|
127
|
+
is_static = False
|
|
128
|
+
if isinstance(method, staticmethod):
|
|
129
|
+
is_static = True
|
|
130
|
+
method = method.__wrapped__
|
|
131
|
+
|
|
132
|
+
# Note: despite `wrapped` being synchronous, this also works with async functions, in that if
|
|
133
|
+
# a function returns a coroutine, then this function will also return a coroutine. So, when
|
|
134
|
+
# called from an async context, the return can be awaited without issues. However, code that
|
|
135
|
+
# introspects `wrapped` with, e.g. inspect.iscoroutinefunction(), will not pick up on the
|
|
136
|
+
# fact that it returns a coroutine unless it unwraps `wrapped` and tries to introspect `method`
|
|
137
|
+
# directly. Synchronicity already does this (https://github.com/modal-labs/synchronicity/blob/441085df7dfa953c86304d06da5e0e74cebbe858/src/synchronicity/async_wrap.py#L42-L57),
|
|
138
|
+
# but this is fixable on Python >= 3.12, which adds `inspect.markcoroutinefunction`.
|
|
139
|
+
@functools.wraps(method)
|
|
140
|
+
def wrapped(*args: P.args, **kwargs: P.kwargs) -> R:
|
|
141
|
+
deprecation_warning(deprecated_on, msg, show_source=show_source)
|
|
142
|
+
return method(*args, **kwargs)
|
|
143
|
+
|
|
144
|
+
if is_static:
|
|
145
|
+
return staticmethod(wrapped)
|
|
146
|
+
|
|
147
|
+
return wrapped
|
|
148
|
+
|
|
149
|
+
return decorator
|
|
@@ -33,10 +33,7 @@ from ._partial_function import (
|
|
|
33
33
|
from ._server import _Server, validate_http_server_config
|
|
34
34
|
from ._supports_logs import _LogQueryData
|
|
35
35
|
from ._utils.async_utils import synchronize_api
|
|
36
|
-
from ._utils.deprecation import
|
|
37
|
-
deprecation_warning,
|
|
38
|
-
handle_deprecated_parameters,
|
|
39
|
-
)
|
|
36
|
+
from ._utils.deprecation import deprecation_warning, handle_deprecated_parameters, with_deprecation_warning
|
|
40
37
|
from ._utils.function_utils import (
|
|
41
38
|
FunctionInfo,
|
|
42
39
|
is_flash_object,
|
|
@@ -274,6 +271,10 @@ class _App:
|
|
|
274
271
|
return self._name
|
|
275
272
|
|
|
276
273
|
@property
|
|
274
|
+
@with_deprecation_warning(
|
|
275
|
+
(2026, 8, 26),
|
|
276
|
+
"`App.is_interactive` is deprecated and will be removed in `modal` version 1.6.0",
|
|
277
|
+
)
|
|
277
278
|
def is_interactive(self) -> bool:
|
|
278
279
|
"""mdmd:hidden"""
|
|
279
280
|
return self._is_interactive_
|
|
@@ -383,6 +384,11 @@ class _App:
|
|
|
383
384
|
raise InvalidError("App is not running")
|
|
384
385
|
return f"https://modal.com/id/{self._app_id}"
|
|
385
386
|
|
|
387
|
+
@with_deprecation_warning(
|
|
388
|
+
(2026, 8, 26),
|
|
389
|
+
"`App.set_description` is deprecated and will be removed in `modal` version 1.6.0. "
|
|
390
|
+
"Set `App.description` directly instead",
|
|
391
|
+
)
|
|
386
392
|
def set_description(self, description: str):
|
|
387
393
|
"""mdmd:hidden
|
|
388
394
|
Set the description of the App before it starts running.
|
|
@@ -396,6 +402,10 @@ class _App:
|
|
|
396
402
|
raise InvalidError(f"App attribute `{key}` with value {value!r} is not a valid Modal object")
|
|
397
403
|
|
|
398
404
|
@property
|
|
405
|
+
@with_deprecation_warning(
|
|
406
|
+
(2026, 8, 26),
|
|
407
|
+
"`App.image` is deprecated and will be removed in `modal` version 1.6.0",
|
|
408
|
+
)
|
|
399
409
|
def image(self) -> _Image:
|
|
400
410
|
"""mdmd:hidden
|
|
401
411
|
Retrieve the Image that will be used as the default for any Functions registered to the App.
|
|
@@ -668,6 +678,10 @@ class _App:
|
|
|
668
678
|
obj._hydrate(object_id, client, handle_metadata)
|
|
669
679
|
|
|
670
680
|
@property
|
|
681
|
+
@with_deprecation_warning(
|
|
682
|
+
(2026, 8, 26),
|
|
683
|
+
"`App.registered_functions` is deprecated and will be removed in `modal` version 1.6.0",
|
|
684
|
+
)
|
|
671
685
|
def registered_functions(self) -> dict[str, _Function]:
|
|
672
686
|
"""mdmd:hidden
|
|
673
687
|
All modal.Function objects registered on the app.
|
|
@@ -680,6 +694,10 @@ class _App:
|
|
|
680
694
|
return self._local_state.functions
|
|
681
695
|
|
|
682
696
|
@property
|
|
697
|
+
@with_deprecation_warning(
|
|
698
|
+
(2026, 8, 26),
|
|
699
|
+
"`App.registered_classes` is deprecated and will be removed in `modal` version 1.6.0",
|
|
700
|
+
)
|
|
683
701
|
def registered_classes(self) -> dict[str, _Cls]:
|
|
684
702
|
"""mdmd:hidden
|
|
685
703
|
All modal.Cls objects registered on the app.
|
|
@@ -692,6 +710,10 @@ class _App:
|
|
|
692
710
|
return self._local_state.classes
|
|
693
711
|
|
|
694
712
|
@property
|
|
713
|
+
@with_deprecation_warning(
|
|
714
|
+
(2026, 8, 26),
|
|
715
|
+
"`App.registered_entrypoints` is deprecated and will be removed in `modal` version 1.6.0",
|
|
716
|
+
)
|
|
695
717
|
def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
|
|
696
718
|
"""mdmd:hidden
|
|
697
719
|
All local CLI entrypoints registered on the app.
|
|
@@ -703,6 +725,10 @@ class _App:
|
|
|
703
725
|
return self._local_state.local_entrypoints
|
|
704
726
|
|
|
705
727
|
@property
|
|
728
|
+
@with_deprecation_warning(
|
|
729
|
+
(2026, 8, 26),
|
|
730
|
+
"`App.registered_web_endpoints` is deprecated and will be removed in `modal` version 1.6.0",
|
|
731
|
+
)
|
|
706
732
|
def registered_web_endpoints(self) -> list[str]:
|
|
707
733
|
"""mdmd:hidden
|
|
708
734
|
Names of Web Functions registered on the app.
|
|
@@ -4,15 +4,12 @@ import inspect
|
|
|
4
4
|
import json
|
|
5
5
|
import os
|
|
6
6
|
from pathlib import Path
|
|
7
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
8
8
|
|
|
9
9
|
import click
|
|
10
10
|
import rich.panel
|
|
11
11
|
from rich.markdown import Markdown
|
|
12
12
|
|
|
13
|
-
from modal.app import _App
|
|
14
|
-
|
|
15
|
-
from .._utils.async_utils import synchronizer
|
|
16
13
|
from ..exception import _CliUserExecutionError
|
|
17
14
|
from ..output import OutputManager
|
|
18
15
|
from ..runner import run_app
|
|
@@ -43,8 +40,7 @@ def _launch_program(
|
|
|
43
40
|
entrypoint = module.main
|
|
44
41
|
|
|
45
42
|
app = _get_runnable_app(entrypoint)
|
|
46
|
-
|
|
47
|
-
inner._description = description if description else base_cmd
|
|
43
|
+
app.description = description if description else base_cmd
|
|
48
44
|
|
|
49
45
|
# `launch/` scripts must have a `local_entrypoint()` with no args, for simplicity here.
|
|
50
46
|
func = entrypoint.info.raw_f
|
|
@@ -8,15 +8,14 @@ import time
|
|
|
8
8
|
import typing
|
|
9
9
|
from collections.abc import Callable
|
|
10
10
|
from dataclasses import dataclass
|
|
11
|
-
from typing import Any,
|
|
11
|
+
from typing import Any, get_args
|
|
12
12
|
|
|
13
13
|
import click
|
|
14
14
|
from click import ClickException
|
|
15
15
|
from typing_extensions import TypedDict
|
|
16
16
|
|
|
17
17
|
from .._environments import ensure_env
|
|
18
|
-
from ..
|
|
19
|
-
from ..app import App, LocalEntrypoint, _App
|
|
18
|
+
from ..app import App, LocalEntrypoint
|
|
20
19
|
from ..cls import _get_class_constructor_signature
|
|
21
20
|
from ..config import config
|
|
22
21
|
from ..exception import ExecutionError, InvalidError, _CliUserExecutionError
|
|
@@ -261,12 +260,12 @@ def _get_signature(func: typing.Any) -> inspect.Signature:
|
|
|
261
260
|
|
|
262
261
|
|
|
263
262
|
def _get_click_command_for_function(app: App, function: Function, ctx: click.Context):
|
|
264
|
-
if function.
|
|
263
|
+
if function._is_generator_:
|
|
265
264
|
raise InvalidError("`modal run` is not supported for generator functions")
|
|
266
265
|
|
|
267
|
-
assert function.
|
|
268
|
-
sig: inspect.Signature = _get_signature(function.
|
|
269
|
-
type_hints = safe_get_type_hints(function.
|
|
266
|
+
assert function._info_.raw_f
|
|
267
|
+
sig: inspect.Signature = _get_signature(function._info_.raw_f)
|
|
268
|
+
type_hints = safe_get_type_hints(function._info_.raw_f)
|
|
270
269
|
signature: CliRunnableSignature = _get_cli_runnable_signature(sig, type_hints)
|
|
271
270
|
|
|
272
271
|
def _inner(args, click_kwargs):
|
|
@@ -467,10 +466,8 @@ class RunGroup(ModalGroup):
|
|
|
467
466
|
raise ClickException(f"{help_header}\n\n{help_footer}")
|
|
468
467
|
|
|
469
468
|
app = _get_runnable_app(runnable)
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
if inner._description is None:
|
|
473
|
-
inner._description = _get_clean_app_description(func_ref)
|
|
469
|
+
if app.description is None:
|
|
470
|
+
app.description = _get_clean_app_description(func_ref)
|
|
474
471
|
|
|
475
472
|
if isinstance(runnable, LocalEntrypoint):
|
|
476
473
|
click_command = _get_click_command_for_local_entrypoint(app, runnable)
|
|
@@ -674,10 +671,9 @@ def serve(
|
|
|
674
671
|
|
|
675
672
|
OutputManager.get().set_timestamps(timestamps)
|
|
676
673
|
app = import_app_from_ref(import_ref, base_cmd="modal serve")
|
|
677
|
-
inner = cast(_App, synchronizer._translate_in(app))
|
|
678
674
|
|
|
679
|
-
if
|
|
680
|
-
|
|
675
|
+
if app.description is None:
|
|
676
|
+
app.description = _get_clean_app_description(app_ref)
|
|
681
677
|
with serve_app(app, import_ref, name=name, environment_name=env):
|
|
682
678
|
if timeout is None:
|
|
683
679
|
timeout = config["serve_timeout"]
|
|
@@ -182,9 +182,9 @@ def _function_spec_from_ref(ref: str, use_module_mode: bool) -> _FunctionSpec:
|
|
|
182
182
|
if isinstance(runnable, MethodReference):
|
|
183
183
|
# TODO: let users specify a class instead of a method, since they use the same environment
|
|
184
184
|
class_service_function = runnable.cls._get_class_service_function()
|
|
185
|
-
return class_service_function.
|
|
185
|
+
return class_service_function._spec_
|
|
186
186
|
elif isinstance(runnable, Function):
|
|
187
|
-
return runnable.
|
|
187
|
+
return runnable._spec_
|
|
188
188
|
|
|
189
189
|
raise ValueError("Referenced entity is not a Modal Function or Cls")
|
|
190
190
|
|
|
@@ -77,7 +77,7 @@ class _Client:
|
|
|
77
77
|
server_url: str,
|
|
78
78
|
client_type: int,
|
|
79
79
|
credentials: typing.Optional[tuple[str, str]],
|
|
80
|
-
version: str = "1.5.5.
|
|
80
|
+
version: str = "1.5.5.dev17",
|
|
81
81
|
*,
|
|
82
82
|
oauth_credentials: typing.Optional[_OAuthCredentials] = None,
|
|
83
83
|
):
|
|
@@ -277,7 +277,7 @@ class Client:
|
|
|
277
277
|
server_url: str,
|
|
278
278
|
client_type: int,
|
|
279
279
|
credentials: typing.Optional[tuple[str, str]],
|
|
280
|
-
version: str = "1.5.5.
|
|
280
|
+
version: str = "1.5.5.dev17",
|
|
281
281
|
*,
|
|
282
282
|
oauth_credentials: typing.Optional[_OAuthCredentials] = None,
|
|
283
283
|
):
|
|
@@ -27,6 +27,7 @@ from ._utils.async_utils import synchronize_api, synchronizer
|
|
|
27
27
|
from ._utils.deprecation import (
|
|
28
28
|
deprecation_warning,
|
|
29
29
|
handle_deprecated_parameters,
|
|
30
|
+
with_deprecation_warning,
|
|
30
31
|
)
|
|
31
32
|
from .client import _Client
|
|
32
33
|
from .cloud_bucket_mount import _CloudBucketMount
|
|
@@ -600,7 +601,10 @@ More information on class parameterization can be found here: https://modal.com/
|
|
|
600
601
|
except TypeError as exc:
|
|
601
602
|
raise InvalidError(f"Class parameter '{k}': {exc}")
|
|
602
603
|
|
|
603
|
-
validate_construction_mechanism =
|
|
604
|
+
validate_construction_mechanism = with_deprecation_warning(
|
|
605
|
+
(2026, 8, 26),
|
|
606
|
+
"`Cls.validate_construction_mechanism` is deprecated and will be removed in `modal` version 1.6.0",
|
|
607
|
+
)(_validate_construction_mechanism)
|
|
604
608
|
"""mdmd:hidden"""
|
|
605
609
|
|
|
606
610
|
@staticmethod
|
|
@@ -645,7 +649,10 @@ More information on class parameterization can be found here: https://modal.com/
|
|
|
645
649
|
cls._name = user_cls.__name__
|
|
646
650
|
return cls
|
|
647
651
|
|
|
648
|
-
from_local =
|
|
652
|
+
from_local = with_deprecation_warning(
|
|
653
|
+
(2026, 8, 26),
|
|
654
|
+
"`Cls.from_local` is deprecated and will be removed in `modal` version 1.6.0",
|
|
655
|
+
)(_from_local)
|
|
649
656
|
"""mdmd:hidden"""
|
|
650
657
|
|
|
651
658
|
@classmethod
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
Modal-specific exception types.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Notes on `grpclib.GRPCError` migration**
|
|
6
6
|
|
|
7
7
|
Historically, the Modal SDK could propagate `grpclib.GRPCError` exceptions out
|
|
8
8
|
to user code. As of v1.3, we are in the process of gracefully migrating to
|
|
@@ -82,14 +82,17 @@ class _GRPCErrorWrapper(grpclib.GRPCError):
|
|
|
82
82
|
_grpc_details: Any
|
|
83
83
|
|
|
84
84
|
def __init__(self, message: str | None = None):
|
|
85
|
+
"""mdmd:hidden"""
|
|
85
86
|
# Override GRPCError's init and repr to behave more like a regular Exception
|
|
86
87
|
# (We don't customize these anywhere in our custom error types currently).
|
|
87
88
|
self._message = message or ""
|
|
88
89
|
|
|
89
90
|
def __repr__(self) -> str:
|
|
91
|
+
"""mdmd:hidden"""
|
|
90
92
|
return f"{type(self).__name__}({self._message!r})"
|
|
91
93
|
|
|
92
94
|
def _attribute_warning(self) -> None:
|
|
95
|
+
"""mdmd:hidden"""
|
|
93
96
|
from ._utils.deprecation import deprecation_warning # Avoid circular import
|
|
94
97
|
|
|
95
98
|
exc_type = type(self).__name__
|
|
@@ -102,6 +105,7 @@ class _GRPCErrorWrapper(grpclib.GRPCError):
|
|
|
102
105
|
|
|
103
106
|
@property
|
|
104
107
|
def message(self) -> str:
|
|
108
|
+
"""mdmd:hidden"""
|
|
105
109
|
self._attribute_warning()
|
|
106
110
|
return self._grpc_message
|
|
107
111
|
|
|
@@ -111,6 +115,7 @@ class _GRPCErrorWrapper(grpclib.GRPCError):
|
|
|
111
115
|
|
|
112
116
|
@property
|
|
113
117
|
def status(self) -> grpclib.Status:
|
|
118
|
+
"""mdmd:hidden"""
|
|
114
119
|
self._attribute_warning()
|
|
115
120
|
return self._grpc_status
|
|
116
121
|
|
|
@@ -120,6 +125,7 @@ class _GRPCErrorWrapper(grpclib.GRPCError):
|
|
|
120
125
|
|
|
121
126
|
@property
|
|
122
127
|
def details(self) -> Any:
|
|
128
|
+
"""mdmd:hidden"""
|
|
123
129
|
self._attribute_warning()
|
|
124
130
|
return self._grpc_details
|
|
125
131
|
|
|
@@ -276,6 +282,7 @@ class _CliUserExecutionError(Exception):
|
|
|
276
282
|
"""
|
|
277
283
|
|
|
278
284
|
def __init__(self, user_source: str):
|
|
285
|
+
"""mdmd:hidden"""
|
|
279
286
|
# `user_source` should be the filepath for the user code that is the source of the exception.
|
|
280
287
|
# This is used by our exception handler to show the traceback starting from that point.
|
|
281
288
|
self.user_source = user_source
|
|
@@ -389,8 +396,12 @@ class SandboxFilesystemPathAlreadyExistsError(SandboxFilesystemError):
|
|
|
389
396
|
|
|
390
397
|
|
|
391
398
|
class ImageBuildError(RemoteError):
|
|
392
|
-
"""Raised when an
|
|
399
|
+
"""Raised when an Image build fails.
|
|
400
|
+
|
|
401
|
+
Use the `image_id` attribute to reference the failed Image, e.g. to fetch build logs.
|
|
402
|
+
"""
|
|
393
403
|
|
|
394
404
|
def __init__(self, message: str, image_id: str):
|
|
405
|
+
"""mdmd:hidden"""
|
|
395
406
|
super().__init__(message)
|
|
396
407
|
self.image_id = image_id
|
|
@@ -619,7 +619,7 @@ class Function(
|
|
|
619
619
|
|
|
620
620
|
_call_generator: ___call_generator_spec
|
|
621
621
|
|
|
622
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
622
|
+
class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
|
623
623
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
624
624
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result.
|
|
625
625
|
|
|
@@ -644,7 +644,7 @@ class Function(
|
|
|
644
644
|
"""
|
|
645
645
|
...
|
|
646
646
|
|
|
647
|
-
remote: __remote_spec[modal._functions.
|
|
647
|
+
remote: __remote_spec[modal._functions.ReturnType, modal._functions.P]
|
|
648
648
|
|
|
649
649
|
class __remote_gen_spec(typing_extensions.Protocol):
|
|
650
650
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -694,7 +694,7 @@ class Function(
|
|
|
694
694
|
"""
|
|
695
695
|
...
|
|
696
696
|
|
|
697
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
697
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
|
698
698
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
699
699
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
700
700
|
|
|
@@ -727,7 +727,7 @@ class Function(
|
|
|
727
727
|
"""
|
|
728
728
|
...
|
|
729
729
|
|
|
730
|
-
_experimental_spawn: ___experimental_spawn_spec[modal._functions.
|
|
730
|
+
_experimental_spawn: ___experimental_spawn_spec[modal._functions.ReturnType, modal._functions.P]
|
|
731
731
|
|
|
732
732
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER]):
|
|
733
733
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
|
|
@@ -735,7 +735,7 @@ class Function(
|
|
|
735
735
|
|
|
736
736
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P]
|
|
737
737
|
|
|
738
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
738
|
+
class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
|
|
739
739
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
740
740
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
741
741
|
|
|
@@ -768,7 +768,7 @@ class Function(
|
|
|
768
768
|
"""
|
|
769
769
|
...
|
|
770
770
|
|
|
771
|
-
spawn: __spawn_spec[modal._functions.
|
|
771
|
+
spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P]
|
|
772
772
|
|
|
773
773
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
774
774
|
"""Return the inner Python object wrapped by this Modal Function.
|
|
@@ -33,7 +33,7 @@ class Object:
|
|
|
33
33
|
_load_context_overrides: modal._load_context.LoadContext
|
|
34
34
|
_object_id: typing.Optional[str]
|
|
35
35
|
_client: typing.Optional[modal.client.Client]
|
|
36
|
-
|
|
36
|
+
_Object__is_hydrated: bool
|
|
37
37
|
_is_rehydrated: bool
|
|
38
38
|
_name: typing.Optional[str]
|
|
39
39
|
|
|
@@ -41,6 +41,10 @@ class Object:
|
|
|
41
41
|
"""mdmd:hidden"""
|
|
42
42
|
...
|
|
43
43
|
|
|
44
|
+
@property
|
|
45
|
+
def _is_hydrated(self) -> bool: ...
|
|
46
|
+
@_is_hydrated.setter
|
|
47
|
+
def _is_hydrated(self, value: bool): ...
|
|
44
48
|
@classmethod
|
|
45
49
|
def __init_subclass__(cls, type_prefix: typing.Optional[str] = None): ...
|
|
46
50
|
def _init(
|
|
@@ -152,6 +156,8 @@ class Object:
|
|
|
152
156
|
def _hydrate_from_other(self, other: typing_extensions.Self): ...
|
|
153
157
|
def __repr__(self): ...
|
|
154
158
|
@property
|
|
159
|
+
def _class_name(self): ...
|
|
160
|
+
@property
|
|
155
161
|
def local_uuid(self):
|
|
156
162
|
"""mdmd:hidden"""
|
|
157
163
|
...
|
|
@@ -185,7 +185,7 @@ async def _create_all_objects(
|
|
|
185
185
|
# this is to ensure that directly referenced functions from the global scope has
|
|
186
186
|
# ids associated with them when they are serialized into other functions
|
|
187
187
|
await resolver.preload(obj, load_context, existing_object_id)
|
|
188
|
-
if obj.
|
|
188
|
+
if obj._is_hydrated:
|
|
189
189
|
tag_to_object_id[tag] = obj.object_id
|
|
190
190
|
|
|
191
191
|
async def _load(tag, obj):
|
|
@@ -1480,16 +1480,6 @@ class _Sandbox(_Object, type_prefix="sb"):
|
|
|
1480
1480
|
SnapshotCreationError: If no exit snapshot image will be produced.
|
|
1481
1481
|
NotFoundError: If the sandbox does not exist.
|
|
1482
1482
|
PermissionDeniedError: If the caller cannot access the sandbox.
|
|
1483
|
-
InternalError: If persisted snapshot state is malformed, or if polls
|
|
1484
|
-
keep failing on an internal server error while the caller still
|
|
1485
|
-
has budget left.
|
|
1486
|
-
ServiceError: If polls keep failing on a transient client/server
|
|
1487
|
-
communication failure while the caller still has budget left.
|
|
1488
|
-
ConnectionError: If polls keep outliving their network deadline
|
|
1489
|
-
while the caller still has budget left.
|
|
1490
|
-
ResourceExhaustedError: If the server rate-limits polling without
|
|
1491
|
-
providing a retry instruction. Instructed backoffs are honored
|
|
1492
|
-
within the caller's budget and do not raise.
|
|
1493
1483
|
"""
|
|
1494
1484
|
if timeout is not None and timeout < 0:
|
|
1495
1485
|
raise InvalidError("timeout must be non-negative or None")
|