modal 1.2.6.dev0__tar.gz → 1.2.6.dev2__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.2.6.dev0 → modal-1.2.6.dev2}/PKG-INFO +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_output.py +2 -2
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/container_io_manager.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/user_code_imports.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_traceback.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/network_file_system.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/run.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/volume.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/client.pyi +2 -2
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/container_process.py +2 -2
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/functions.pyi +6 -6
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/io_streams.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/mount.py +8 -8
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal.egg-info/PKG-INFO +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_version/__init__.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_version/__main__.py +1 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/pyproject.toml +10 -1
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/LICENSE +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/README.md +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/__main__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_billing.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_clustered_functions.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_clustered_functions.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_container_entrypoint.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_functions.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_grpc_client.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_ipython.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_load_context.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_location.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_object.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_partial_function.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_pty.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_resolver.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_resources.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/asgi.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/container_io_manager.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/execution_context.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/execution_context.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/gpu_memory_snapshot.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/telemetry.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_runtime/user_code_event_loop.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_serialization.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_tunnel.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_tunnel.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_type_manager.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/app_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/async_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/auth_token_manager.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/blob_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/bytes_io_segment_payload.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/deprecation.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/docker_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/function_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/git_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/grpc_testing.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/grpc_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/hash_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/http_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/jwt_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/logger.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/mount_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/name_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/package_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/pattern_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/rand_pb_testing.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/shell_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/task_command_router_client.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_utils/time_utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_vendor/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_vendor/a2wsgi_wsgi.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_vendor/cloudpickle.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_vendor/tblib.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/_watcher.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/app.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/app.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/billing.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/2023.12.312.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/2023.12.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/2024.04.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/2024.10.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/2025.06.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/PREVIEW.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/README.md +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/builder/base-images.json +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/call_graph.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/_download.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/_traceback.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/app.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/cluster.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/config.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/container.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/dict.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/entry_point.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/environment.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/import_refs.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/launch.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/profile.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/programs/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/programs/launch_instance_ssh.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/programs/run_jupyter.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/programs/run_marimo.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/programs/vscode.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/queues.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/secret.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/shell.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/token.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cli/utils.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/client.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cloud_bucket_mount.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cloud_bucket_mount.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cls.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/cls.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/config.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/container_process.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/dict.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/dict.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/environments.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/environments.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/exception.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/experimental/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/experimental/flash.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/experimental/flash.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/experimental/ipython.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/file_io.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/file_io.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/file_pattern_matcher.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/functions.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/gpu.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/image.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/image.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/io_streams.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/mount.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/network_file_system.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/network_file_system.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/object.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/object.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/output.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/parallel_map.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/parallel_map.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/partial_function.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/partial_function.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/proxy.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/proxy.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/py.typed +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/queue.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/queue.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/retries.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/runner.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/runner.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/running_app.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/sandbox.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/sandbox.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/schedule.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/scheduler_placement.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/secret.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/secret.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/serving.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/serving.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/snapshot.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/snapshot.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/stream_type.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/token_flow.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/token_flow.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/volume.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal/volume.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal.egg-info/SOURCES.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal.egg-info/dependency_links.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal.egg-info/entry_points.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal.egg-info/requires.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal.egg-info/top_level.txt +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_docs/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_docs/gen_cli_docs.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_docs/gen_reference_docs.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_docs/mdmd/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_docs/mdmd/mdmd.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_docs/mdmd/signatures.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/__init__.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/api.proto +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/api_grpc.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/api_pb2.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/api_pb2.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/api_pb2_grpc.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/api_pb2_grpc.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/modal_api_grpc.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/py.typed +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/task_command_router.proto +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/task_command_router_grpc.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/task_command_router_pb2.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/task_command_router_pb2.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/task_command_router_pb2_grpc.py +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
- {modal-1.2.6.dev0 → modal-1.2.6.dev2}/setup.cfg +0 -0
|
@@ -556,7 +556,7 @@ async def get_app_logs_loop(
|
|
|
556
556
|
async def stop_pty_shell():
|
|
557
557
|
nonlocal pty_shell_finish_event, pty_shell_input_task
|
|
558
558
|
if pty_shell_finish_event:
|
|
559
|
-
print("\r", end="") # move cursor to beginning of line
|
|
559
|
+
print("\r", end="") # move cursor to beginning of line # noqa: T201
|
|
560
560
|
pty_shell_finish_event.set()
|
|
561
561
|
pty_shell_finish_event = None
|
|
562
562
|
|
|
@@ -623,7 +623,7 @@ async def get_app_logs_loop(
|
|
|
623
623
|
# This corresponds to the `modal run -i` use case where a breakpoint
|
|
624
624
|
# triggers and the task drops into an interactive PTY mode
|
|
625
625
|
if pty_shell_finish_event:
|
|
626
|
-
print("ERROR: concurrent PTY shells are not supported.")
|
|
626
|
+
print("ERROR: concurrent PTY shells are not supported.") # noqa: T201
|
|
627
627
|
else:
|
|
628
628
|
pty_shell_stdout = output_mgr._stdout
|
|
629
629
|
pty_shell_finish_event = asyncio.Event()
|
|
@@ -1007,7 +1007,7 @@ class _ContainerIOManager:
|
|
|
1007
1007
|
# Start a debugger if the worker tells us to
|
|
1008
1008
|
if int(restored_state.get("snapshot_debug", 0)):
|
|
1009
1009
|
logger.debug("Entering snapshot debugger")
|
|
1010
|
-
breakpoint()
|
|
1010
|
+
breakpoint() # noqa: T100
|
|
1011
1011
|
|
|
1012
1012
|
# Local ContainerIOManager state.
|
|
1013
1013
|
for key in ["task_id", "function_id"]:
|
|
@@ -243,7 +243,7 @@ def create_breakpoint_wrapper(container_io_manager: "modal._runtime.container_io
|
|
|
243
243
|
def breakpoint_wrapper():
|
|
244
244
|
# note: it would be nice to not have breakpoint_wrapper() included in the backtrace
|
|
245
245
|
container_io_manager.interact(from_breakpoint=True)
|
|
246
|
-
import pdb
|
|
246
|
+
import pdb # noqa: T100
|
|
247
247
|
|
|
248
248
|
current_frame = inspect.currentframe()
|
|
249
249
|
if current_frame is not None:
|
|
@@ -119,7 +119,7 @@ def print_exception(exc: Optional[type[BaseException]], value: Optional[BaseExce
|
|
|
119
119
|
traceback.print_exception(exc, value, tb)
|
|
120
120
|
if sys.version_info < (3, 11) and value is not None: # type: ignore
|
|
121
121
|
notes = getattr(value, "__notes__", [])
|
|
122
|
-
print(*notes, sep="\n", file=sys.stderr)
|
|
122
|
+
print(*notes, sep="\n", file=sys.stderr) # noqa: T201
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
def print_server_warnings(server_warnings: Iterable[api_pb2.Warning]):
|
|
@@ -292,7 +292,7 @@ def _get_click_command_for_local_entrypoint(app: App, entrypoint: LocalEntrypoin
|
|
|
292
292
|
@click.pass_context
|
|
293
293
|
def f(ctx, *args, **kwargs):
|
|
294
294
|
if ctx.obj["detach"]:
|
|
295
|
-
print(
|
|
295
|
+
print( # noqa: T201
|
|
296
296
|
"Note that running a local entrypoint in detached mode only keeps the last "
|
|
297
297
|
"triggered Modal function alive after the parent process has been killed or disconnected."
|
|
298
298
|
)
|
|
@@ -148,7 +148,7 @@ async def ls(
|
|
|
148
148
|
if not json and not sys.stdout.isatty():
|
|
149
149
|
# Legacy behavior -- I am not sure why exactly we did this originally but I don't want to break it
|
|
150
150
|
for entry in entries:
|
|
151
|
-
print(entry.path)
|
|
151
|
+
print(entry.path) # noqa: T201
|
|
152
152
|
else:
|
|
153
153
|
rows = []
|
|
154
154
|
for entry in entries:
|
|
@@ -32,7 +32,7 @@ class _Client:
|
|
|
32
32
|
server_url: str,
|
|
33
33
|
client_type: int,
|
|
34
34
|
credentials: typing.Optional[tuple[str, str]],
|
|
35
|
-
version: str = "1.2.6.
|
|
35
|
+
version: str = "1.2.6.dev2",
|
|
36
36
|
):
|
|
37
37
|
"""mdmd:hidden
|
|
38
38
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -163,7 +163,7 @@ class Client:
|
|
|
163
163
|
server_url: str,
|
|
164
164
|
client_type: int,
|
|
165
165
|
credentials: typing.Optional[tuple[str, str]],
|
|
166
|
-
version: str = "1.2.6.
|
|
166
|
+
version: str = "1.2.6.dev2",
|
|
167
167
|
):
|
|
168
168
|
"""mdmd:hidden
|
|
169
169
|
The Modal client object is not intended to be instantiated directly by users.
|
|
@@ -146,7 +146,7 @@ class _ContainerProcessThroughServer(Generic[T]):
|
|
|
146
146
|
async def attach(self):
|
|
147
147
|
"""mdmd:hidden"""
|
|
148
148
|
if platform.system() == "Windows":
|
|
149
|
-
print("interactive exec is not currently supported on Windows.")
|
|
149
|
+
print("interactive exec is not currently supported on Windows.") # noqa: T201
|
|
150
150
|
return
|
|
151
151
|
|
|
152
152
|
from ._output import make_console
|
|
@@ -347,7 +347,7 @@ class _ContainerProcessThroughCommandRouter(Generic[T]):
|
|
|
347
347
|
|
|
348
348
|
async def attach(self):
|
|
349
349
|
if platform.system() == "Windows":
|
|
350
|
-
print("interactive exec is not currently supported on Windows.")
|
|
350
|
+
print("interactive exec is not currently supported on Windows.") # noqa: T201
|
|
351
351
|
return
|
|
352
352
|
|
|
353
353
|
from ._output import make_console
|
|
@@ -409,7 +409,7 @@ class Function(
|
|
|
409
409
|
|
|
410
410
|
_call_generator: ___call_generator_spec[typing_extensions.Self]
|
|
411
411
|
|
|
412
|
-
class __remote_spec(typing_extensions.Protocol[
|
|
412
|
+
class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
413
413
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
|
|
414
414
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
415
415
|
...
|
|
@@ -418,7 +418,7 @@ class Function(
|
|
|
418
418
|
"""Calls the function remotely, executing it with the given arguments and returning the execution's result."""
|
|
419
419
|
...
|
|
420
420
|
|
|
421
|
-
remote: __remote_spec[modal._functions.
|
|
421
|
+
remote: __remote_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
422
422
|
|
|
423
423
|
class __remote_gen_spec(typing_extensions.Protocol[SUPERSELF]):
|
|
424
424
|
def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
|
|
@@ -445,7 +445,7 @@ class Function(
|
|
|
445
445
|
"""
|
|
446
446
|
...
|
|
447
447
|
|
|
448
|
-
class ___experimental_spawn_spec(typing_extensions.Protocol[
|
|
448
|
+
class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
449
449
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
450
450
|
"""[Experimental] Calls the function with the given arguments, without waiting for the results.
|
|
451
451
|
|
|
@@ -469,7 +469,7 @@ class Function(
|
|
|
469
469
|
...
|
|
470
470
|
|
|
471
471
|
_experimental_spawn: ___experimental_spawn_spec[
|
|
472
|
-
modal._functions.
|
|
472
|
+
modal._functions.P, modal._functions.ReturnType, typing_extensions.Self
|
|
473
473
|
]
|
|
474
474
|
|
|
475
475
|
class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER, SUPERSELF]):
|
|
@@ -478,7 +478,7 @@ class Function(
|
|
|
478
478
|
|
|
479
479
|
_spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P, typing_extensions.Self]
|
|
480
480
|
|
|
481
|
-
class __spawn_spec(typing_extensions.Protocol[
|
|
481
|
+
class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER, SUPERSELF]):
|
|
482
482
|
def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
|
|
483
483
|
"""Calls the function with the given arguments, without waiting for the results.
|
|
484
484
|
|
|
@@ -499,7 +499,7 @@ class Function(
|
|
|
499
499
|
"""
|
|
500
500
|
...
|
|
501
501
|
|
|
502
|
-
spawn: __spawn_spec[modal._functions.
|
|
502
|
+
spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType, typing_extensions.Self]
|
|
503
503
|
|
|
504
504
|
def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
|
|
505
505
|
"""Return the inner Python object wrapped by this Modal Function."""
|
|
@@ -183,7 +183,7 @@ class _StreamReaderThroughServer(Generic[T]):
|
|
|
183
183
|
async for message, batch_index in iterator:
|
|
184
184
|
if self._stream_type == StreamType.STDOUT and message:
|
|
185
185
|
# TODO: rearchitect this, since these bytes aren't necessarily decodable
|
|
186
|
-
print(message.decode("utf-8"), end="")
|
|
186
|
+
print(message.decode("utf-8"), end="") # noqa: T201
|
|
187
187
|
elif self._stream_type == StreamType.PIPE:
|
|
188
188
|
self._container_process_buffer.append(message)
|
|
189
189
|
|
|
@@ -775,13 +775,13 @@ async def _create_single_client_dependency_mount(
|
|
|
775
775
|
if check_if_exists:
|
|
776
776
|
try:
|
|
777
777
|
await Mount.from_name(mount_name, namespace=api_pb2.DEPLOYMENT_NAMESPACE_GLOBAL).hydrate.aio(client)
|
|
778
|
-
print(f"➖ Found existing mount {mount_name} in global namespace.")
|
|
778
|
+
print(f"➖ Found existing mount {mount_name} in global namespace.") # noqa: T201
|
|
779
779
|
return
|
|
780
780
|
except modal.exception.NotFoundError:
|
|
781
781
|
pass
|
|
782
782
|
|
|
783
783
|
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpd:
|
|
784
|
-
print(f"📦 Building {mount_name}.")
|
|
784
|
+
print(f"📦 Building {mount_name}.") # noqa: T201
|
|
785
785
|
requirements = os.path.join(os.path.dirname(__file__), f"builder/{builder_version}.txt")
|
|
786
786
|
cmd = " ".join(
|
|
787
787
|
[
|
|
@@ -810,11 +810,11 @@ async def _create_single_client_dependency_mount(
|
|
|
810
810
|
await proc.wait()
|
|
811
811
|
if proc.returncode:
|
|
812
812
|
stdout, stderr = await proc.communicate()
|
|
813
|
-
print(stdout.decode("utf-8"))
|
|
814
|
-
print(stderr.decode("utf-8"))
|
|
813
|
+
print(stdout.decode("utf-8")) # noqa: T201
|
|
814
|
+
print(stderr.decode("utf-8")) # noqa: T201
|
|
815
815
|
raise RuntimeError(f"Subprocess failed with {proc.returncode}")
|
|
816
816
|
|
|
817
|
-
print(f"🌐 Downloaded and unpacked {mount_name} packages to {tmpd}.")
|
|
817
|
+
print(f"🌐 Downloaded and unpacked {mount_name} packages to {tmpd}.") # noqa: T201
|
|
818
818
|
|
|
819
819
|
python_mount = Mount._from_local_dir(tmpd, remote_path=REMOTE_PACKAGES_PATH)
|
|
820
820
|
|
|
@@ -838,11 +838,11 @@ async def _create_single_client_dependency_mount(
|
|
|
838
838
|
allow_overwrite=allow_overwrite,
|
|
839
839
|
client=client,
|
|
840
840
|
)
|
|
841
|
-
print(f"✅ Deployed mount {mount_name} to global namespace.")
|
|
841
|
+
print(f"✅ Deployed mount {mount_name} to global namespace.") # noqa: T201
|
|
842
842
|
except GRPCError as e:
|
|
843
|
-
print(f"⚠️ Mount creation failed with {e.status}: {e.message}")
|
|
843
|
+
print(f"⚠️ Mount creation failed with {e.status}: {e.message}") # noqa: T201
|
|
844
844
|
else:
|
|
845
|
-
print(f"Dry run - skipping deployment of mount {mount_name}")
|
|
845
|
+
print(f"Dry run - skipping deployment of mount {mount_name}") # noqa: T201
|
|
846
846
|
|
|
847
847
|
|
|
848
848
|
async def _create_client_dependency_mounts(
|
|
@@ -104,14 +104,23 @@ select = [
|
|
|
104
104
|
'W',
|
|
105
105
|
'I',
|
|
106
106
|
'RUF006', # asyncio-dangling-task
|
|
107
|
+
'T10', # flake8-debugger
|
|
108
|
+
'T20', # flake8-print
|
|
107
109
|
]
|
|
108
110
|
preview = true
|
|
109
111
|
explicit-preview-rules = true
|
|
110
112
|
extend-select = ['PLR1702']
|
|
111
113
|
|
|
112
114
|
[tool.ruff.lint.per-file-ignores]
|
|
113
|
-
"*_test.py" = ['E712']
|
|
115
|
+
"*_test.py" = ['E712', 'T201']
|
|
116
|
+
"test/**" = ['T201']
|
|
114
117
|
"test/supports/notebooks/*.py" = ['E402']
|
|
118
|
+
"modal/cli/programs/*" = ['T201']
|
|
119
|
+
"modal_docs/**" = ['T201']
|
|
120
|
+
"modal_global_objects/**" = ['T201']
|
|
121
|
+
"tasks.py" = ['T201']
|
|
122
|
+
"modal/__init__.py" = ['T201']
|
|
123
|
+
"modal/experimental/ipython.py" = ['T201']
|
|
115
124
|
|
|
116
125
|
[tool.ruff.lint.isort]
|
|
117
126
|
combine-as-imports = true
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|