modAL 1.2.6__tar.gz → 1.2.6.dev0__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 (196) hide show
  1. {modal-1.2.6 → modal-1.2.6.dev0}/PKG-INFO +1 -1
  2. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_output.py +2 -2
  3. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/container_io_manager.py +1 -1
  4. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/user_code_imports.py +1 -1
  5. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_traceback.py +1 -1
  6. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/task_command_router_client.py +13 -21
  7. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/network_file_system.py +1 -1
  8. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/run.py +1 -1
  9. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/volume.py +1 -1
  10. {modal-1.2.6 → modal-1.2.6.dev0}/modal/client.pyi +10 -2
  11. {modal-1.2.6 → modal-1.2.6.dev0}/modal/container_process.py +2 -2
  12. {modal-1.2.6 → modal-1.2.6.dev0}/modal/io_streams.py +1 -1
  13. {modal-1.2.6 → modal-1.2.6.dev0}/modal/mount.py +8 -8
  14. {modal-1.2.6 → modal-1.2.6.dev0}/modal.egg-info/PKG-INFO +1 -1
  15. {modal-1.2.6 → modal-1.2.6.dev0}/modal_version/__init__.py +1 -1
  16. {modal-1.2.6 → modal-1.2.6.dev0}/modal_version/__main__.py +1 -1
  17. {modal-1.2.6 → modal-1.2.6.dev0}/pyproject.toml +1 -11
  18. {modal-1.2.6 → modal-1.2.6.dev0}/LICENSE +0 -0
  19. {modal-1.2.6 → modal-1.2.6.dev0}/README.md +0 -0
  20. {modal-1.2.6 → modal-1.2.6.dev0}/modal/__init__.py +0 -0
  21. {modal-1.2.6 → modal-1.2.6.dev0}/modal/__main__.py +0 -0
  22. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_billing.py +0 -0
  23. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_clustered_functions.py +0 -0
  24. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_clustered_functions.pyi +0 -0
  25. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_container_entrypoint.py +0 -0
  26. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_functions.py +0 -0
  27. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_grpc_client.py +0 -0
  28. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_ipython.py +0 -0
  29. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_load_context.py +0 -0
  30. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_location.py +0 -0
  31. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_object.py +0 -0
  32. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_partial_function.py +0 -0
  33. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_pty.py +0 -0
  34. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_resolver.py +0 -0
  35. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_resources.py +0 -0
  36. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/__init__.py +0 -0
  37. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/asgi.py +0 -0
  38. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/container_io_manager.pyi +0 -0
  39. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/execution_context.py +0 -0
  40. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/execution_context.pyi +0 -0
  41. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  42. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/telemetry.py +0 -0
  43. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_runtime/user_code_event_loop.py +0 -0
  44. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_serialization.py +0 -0
  45. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_tunnel.py +0 -0
  46. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_tunnel.pyi +0 -0
  47. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_type_manager.py +0 -0
  48. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/__init__.py +0 -0
  49. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/app_utils.py +0 -0
  50. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/async_utils.py +0 -0
  51. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/auth_token_manager.py +0 -0
  52. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/blob_utils.py +0 -0
  53. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/bytes_io_segment_payload.py +0 -0
  54. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/deprecation.py +0 -0
  55. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/docker_utils.py +0 -0
  56. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/function_utils.py +0 -0
  57. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/git_utils.py +0 -0
  58. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/grpc_testing.py +0 -0
  59. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/grpc_utils.py +0 -0
  60. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/hash_utils.py +0 -0
  61. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/http_utils.py +0 -0
  62. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/jwt_utils.py +0 -0
  63. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/logger.py +0 -0
  64. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/mount_utils.py +0 -0
  65. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/name_utils.py +0 -0
  66. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/package_utils.py +0 -0
  67. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/pattern_utils.py +0 -0
  68. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/rand_pb_testing.py +0 -0
  69. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/shell_utils.py +0 -0
  70. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_utils/time_utils.py +0 -0
  71. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_vendor/__init__.py +0 -0
  72. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  73. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_vendor/cloudpickle.py +0 -0
  74. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_vendor/tblib.py +0 -0
  75. {modal-1.2.6 → modal-1.2.6.dev0}/modal/_watcher.py +0 -0
  76. {modal-1.2.6 → modal-1.2.6.dev0}/modal/app.py +0 -0
  77. {modal-1.2.6 → modal-1.2.6.dev0}/modal/app.pyi +0 -0
  78. {modal-1.2.6 → modal-1.2.6.dev0}/modal/billing.py +0 -0
  79. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/2023.12.312.txt +0 -0
  80. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/2023.12.txt +0 -0
  81. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/2024.04.txt +0 -0
  82. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/2024.10.txt +0 -0
  83. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/2025.06.txt +0 -0
  84. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/PREVIEW.txt +0 -0
  85. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/README.md +0 -0
  86. {modal-1.2.6 → modal-1.2.6.dev0}/modal/builder/base-images.json +0 -0
  87. {modal-1.2.6 → modal-1.2.6.dev0}/modal/call_graph.py +0 -0
  88. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/__init__.py +0 -0
  89. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/_download.py +0 -0
  90. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/_traceback.py +0 -0
  91. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/app.py +0 -0
  92. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/cluster.py +0 -0
  93. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/config.py +0 -0
  94. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/container.py +0 -0
  95. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/dict.py +0 -0
  96. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/entry_point.py +0 -0
  97. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/environment.py +0 -0
  98. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/import_refs.py +0 -0
  99. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/launch.py +0 -0
  100. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/profile.py +0 -0
  101. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/programs/__init__.py +0 -0
  102. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/programs/launch_instance_ssh.py +0 -0
  103. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/programs/run_jupyter.py +0 -0
  104. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/programs/run_marimo.py +0 -0
  105. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/programs/vscode.py +0 -0
  106. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/queues.py +0 -0
  107. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/secret.py +0 -0
  108. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/shell.py +0 -0
  109. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/token.py +0 -0
  110. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cli/utils.py +0 -0
  111. {modal-1.2.6 → modal-1.2.6.dev0}/modal/client.py +0 -0
  112. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cloud_bucket_mount.py +0 -0
  113. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cloud_bucket_mount.pyi +0 -0
  114. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cls.py +0 -0
  115. {modal-1.2.6 → modal-1.2.6.dev0}/modal/cls.pyi +0 -0
  116. {modal-1.2.6 → modal-1.2.6.dev0}/modal/config.py +0 -0
  117. {modal-1.2.6 → modal-1.2.6.dev0}/modal/container_process.pyi +0 -0
  118. {modal-1.2.6 → modal-1.2.6.dev0}/modal/dict.py +0 -0
  119. {modal-1.2.6 → modal-1.2.6.dev0}/modal/dict.pyi +0 -0
  120. {modal-1.2.6 → modal-1.2.6.dev0}/modal/environments.py +0 -0
  121. {modal-1.2.6 → modal-1.2.6.dev0}/modal/environments.pyi +0 -0
  122. {modal-1.2.6 → modal-1.2.6.dev0}/modal/exception.py +0 -0
  123. {modal-1.2.6 → modal-1.2.6.dev0}/modal/experimental/__init__.py +0 -0
  124. {modal-1.2.6 → modal-1.2.6.dev0}/modal/experimental/flash.py +0 -0
  125. {modal-1.2.6 → modal-1.2.6.dev0}/modal/experimental/flash.pyi +0 -0
  126. {modal-1.2.6 → modal-1.2.6.dev0}/modal/experimental/ipython.py +0 -0
  127. {modal-1.2.6 → modal-1.2.6.dev0}/modal/file_io.py +0 -0
  128. {modal-1.2.6 → modal-1.2.6.dev0}/modal/file_io.pyi +0 -0
  129. {modal-1.2.6 → modal-1.2.6.dev0}/modal/file_pattern_matcher.py +0 -0
  130. {modal-1.2.6 → modal-1.2.6.dev0}/modal/functions.py +0 -0
  131. {modal-1.2.6 → modal-1.2.6.dev0}/modal/functions.pyi +0 -0
  132. {modal-1.2.6 → modal-1.2.6.dev0}/modal/gpu.py +0 -0
  133. {modal-1.2.6 → modal-1.2.6.dev0}/modal/image.py +0 -0
  134. {modal-1.2.6 → modal-1.2.6.dev0}/modal/image.pyi +0 -0
  135. {modal-1.2.6 → modal-1.2.6.dev0}/modal/io_streams.pyi +0 -0
  136. {modal-1.2.6 → modal-1.2.6.dev0}/modal/mount.pyi +0 -0
  137. {modal-1.2.6 → modal-1.2.6.dev0}/modal/network_file_system.py +0 -0
  138. {modal-1.2.6 → modal-1.2.6.dev0}/modal/network_file_system.pyi +0 -0
  139. {modal-1.2.6 → modal-1.2.6.dev0}/modal/object.py +0 -0
  140. {modal-1.2.6 → modal-1.2.6.dev0}/modal/object.pyi +0 -0
  141. {modal-1.2.6 → modal-1.2.6.dev0}/modal/output.py +0 -0
  142. {modal-1.2.6 → modal-1.2.6.dev0}/modal/parallel_map.py +0 -0
  143. {modal-1.2.6 → modal-1.2.6.dev0}/modal/parallel_map.pyi +0 -0
  144. {modal-1.2.6 → modal-1.2.6.dev0}/modal/partial_function.py +0 -0
  145. {modal-1.2.6 → modal-1.2.6.dev0}/modal/partial_function.pyi +0 -0
  146. {modal-1.2.6 → modal-1.2.6.dev0}/modal/proxy.py +0 -0
  147. {modal-1.2.6 → modal-1.2.6.dev0}/modal/proxy.pyi +0 -0
  148. {modal-1.2.6 → modal-1.2.6.dev0}/modal/py.typed +0 -0
  149. {modal-1.2.6 → modal-1.2.6.dev0}/modal/queue.py +0 -0
  150. {modal-1.2.6 → modal-1.2.6.dev0}/modal/queue.pyi +0 -0
  151. {modal-1.2.6 → modal-1.2.6.dev0}/modal/retries.py +0 -0
  152. {modal-1.2.6 → modal-1.2.6.dev0}/modal/runner.py +0 -0
  153. {modal-1.2.6 → modal-1.2.6.dev0}/modal/runner.pyi +0 -0
  154. {modal-1.2.6 → modal-1.2.6.dev0}/modal/running_app.py +0 -0
  155. {modal-1.2.6 → modal-1.2.6.dev0}/modal/sandbox.py +0 -0
  156. {modal-1.2.6 → modal-1.2.6.dev0}/modal/sandbox.pyi +0 -0
  157. {modal-1.2.6 → modal-1.2.6.dev0}/modal/schedule.py +0 -0
  158. {modal-1.2.6 → modal-1.2.6.dev0}/modal/scheduler_placement.py +0 -0
  159. {modal-1.2.6 → modal-1.2.6.dev0}/modal/secret.py +0 -0
  160. {modal-1.2.6 → modal-1.2.6.dev0}/modal/secret.pyi +0 -0
  161. {modal-1.2.6 → modal-1.2.6.dev0}/modal/serving.py +0 -0
  162. {modal-1.2.6 → modal-1.2.6.dev0}/modal/serving.pyi +0 -0
  163. {modal-1.2.6 → modal-1.2.6.dev0}/modal/snapshot.py +0 -0
  164. {modal-1.2.6 → modal-1.2.6.dev0}/modal/snapshot.pyi +0 -0
  165. {modal-1.2.6 → modal-1.2.6.dev0}/modal/stream_type.py +0 -0
  166. {modal-1.2.6 → modal-1.2.6.dev0}/modal/token_flow.py +0 -0
  167. {modal-1.2.6 → modal-1.2.6.dev0}/modal/token_flow.pyi +0 -0
  168. {modal-1.2.6 → modal-1.2.6.dev0}/modal/volume.py +0 -0
  169. {modal-1.2.6 → modal-1.2.6.dev0}/modal/volume.pyi +0 -0
  170. {modal-1.2.6 → modal-1.2.6.dev0}/modal.egg-info/SOURCES.txt +0 -0
  171. {modal-1.2.6 → modal-1.2.6.dev0}/modal.egg-info/dependency_links.txt +0 -0
  172. {modal-1.2.6 → modal-1.2.6.dev0}/modal.egg-info/entry_points.txt +0 -0
  173. {modal-1.2.6 → modal-1.2.6.dev0}/modal.egg-info/requires.txt +0 -0
  174. {modal-1.2.6 → modal-1.2.6.dev0}/modal.egg-info/top_level.txt +0 -0
  175. {modal-1.2.6 → modal-1.2.6.dev0}/modal_docs/__init__.py +0 -0
  176. {modal-1.2.6 → modal-1.2.6.dev0}/modal_docs/gen_cli_docs.py +0 -0
  177. {modal-1.2.6 → modal-1.2.6.dev0}/modal_docs/gen_reference_docs.py +0 -0
  178. {modal-1.2.6 → modal-1.2.6.dev0}/modal_docs/mdmd/__init__.py +0 -0
  179. {modal-1.2.6 → modal-1.2.6.dev0}/modal_docs/mdmd/mdmd.py +0 -0
  180. {modal-1.2.6 → modal-1.2.6.dev0}/modal_docs/mdmd/signatures.py +0 -0
  181. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/__init__.py +0 -0
  182. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/api.proto +0 -0
  183. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/api_grpc.py +0 -0
  184. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/api_pb2.py +0 -0
  185. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/api_pb2.pyi +0 -0
  186. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/api_pb2_grpc.py +0 -0
  187. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/api_pb2_grpc.pyi +0 -0
  188. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/modal_api_grpc.py +0 -0
  189. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/py.typed +0 -0
  190. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/task_command_router.proto +0 -0
  191. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/task_command_router_grpc.py +0 -0
  192. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/task_command_router_pb2.py +0 -0
  193. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/task_command_router_pb2.pyi +0 -0
  194. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/task_command_router_pb2_grpc.py +0 -0
  195. {modal-1.2.6 → modal-1.2.6.dev0}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
  196. {modal-1.2.6 → modal-1.2.6.dev0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.6
3
+ Version: 1.2.6.dev0
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.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 # noqa: T201
559
+ print("\r", end="") # move cursor to beginning of line
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.") # noqa: T201
626
+ print("ERROR: concurrent PTY shells are not supported.")
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() # noqa: T100
1010
+ breakpoint()
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 # noqa: T100
246
+ import pdb
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) # noqa: T201
122
+ print(*notes, sep="\n", file=sys.stderr)
123
123
 
124
124
 
125
125
  def print_server_warnings(server_warnings: Iterable[api_pb2.Warning]):
@@ -403,10 +403,7 @@ class TaskCommandRouterClient:
403
403
  )
404
404
  return
405
405
 
406
- logger.debug(f"Refreshing JWT for exec with task ID {self._task_id}")
407
406
  resp = await fetch_command_router_access(self._server_client, self._task_id)
408
- logger.debug(f"Finished refreshing JWT for exec with task ID {self._task_id}")
409
-
410
407
  # Ensure the server URL remains stable for the lifetime of this client.
411
408
  assert resp.url == self._server_url, "Task router URL changed during session"
412
409
  self._jwt = resp.jwt
@@ -437,9 +434,7 @@ class TaskCommandRouterClient:
437
434
  delay_secs = self.stream_stdio_retry_delay_secs
438
435
  delay_factor = self.stream_stdio_retry_delay_factor
439
436
  num_retries_remaining = self.stream_stdio_max_retries
440
- # Flag to prevent infinite auth retries in the event that the JWT
441
- # refresh yields an invalid JWT somehow or that the JWT is otherwise invalid.
442
- did_auth_retry = False
437
+ num_auth_retries = 0
443
438
 
444
439
  async def sleep_and_update_delay_and_num_retries_remaining(e: Exception):
445
440
  nonlocal delay_secs, num_retries_remaining
@@ -463,28 +458,25 @@ class TaskCommandRouterClient:
463
458
  file_descriptor=file_descriptor,
464
459
  )
465
460
 
466
- # Auth retry is scoped to a single refresh per streaming attempt. While auth metadata is
467
- # sent on request start, UNAUTHENTICATED may sometimes surface during iteration,
468
- # so we handle it at both send and receive boundaries.
461
+ # Scope auth retry strictly to the initial send (where headers/auth are sent).
469
462
  try:
470
463
  await s.send_message(req, end=True)
471
- async for item in s:
472
- # We successfully authenticated after a JWT refresh, reset the auth retry flag.
473
- if did_auth_retry:
474
- did_auth_retry = False
475
- # Reset retry backoff after any successful chunk.
476
- delay_secs = self.stream_stdio_retry_delay_secs
477
- offset += len(item.data)
478
- yield item
479
464
  except GRPCError as exc:
480
- if exc.status == Status.UNAUTHENTICATED and not did_auth_retry:
465
+ if exc.status == Status.UNAUTHENTICATED and num_auth_retries < 1:
481
466
  await self._refresh_jwt()
482
- # Mark that we've retried authentication for this streaming attempt, to
483
- # prevent subsequent retries.
484
- did_auth_retry = True
467
+ num_auth_retries += 1
485
468
  continue
486
469
  raise
487
470
 
471
+ # We successfully authenticated, reset the auth retry count.
472
+ num_auth_retries = 0
473
+
474
+ async for item in s:
475
+ # Reset retry backoff after any successful chunk.
476
+ delay_secs = self.stream_stdio_retry_delay_secs
477
+ offset += len(item.data)
478
+ yield item
479
+
488
480
  # We successfully streamed all output.
489
481
  return
490
482
  except GRPCError as e:
@@ -102,7 +102,7 @@ async def ls(
102
102
  console.print(table)
103
103
  else:
104
104
  for entry in entries:
105
- print(entry.path) # noqa: T201
105
+ print(entry.path)
106
106
 
107
107
 
108
108
  @nfs_cli.command(
@@ -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( # noqa: T201
295
+ print(
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) # noqa: T201
151
+ print(entry.path)
152
152
  else:
153
153
  rows = []
154
154
  for entry in entries:
@@ -28,7 +28,11 @@ class _Client:
28
28
  _snapshotted: bool
29
29
 
30
30
  def __init__(
31
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "1.2.6"
31
+ self,
32
+ server_url: str,
33
+ client_type: int,
34
+ credentials: typing.Optional[tuple[str, str]],
35
+ version: str = "1.2.6.dev0",
32
36
  ):
33
37
  """mdmd:hidden
34
38
  The Modal client object is not intended to be instantiated directly by users.
@@ -155,7 +159,11 @@ class Client:
155
159
  _snapshotted: bool
156
160
 
157
161
  def __init__(
158
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "1.2.6"
162
+ self,
163
+ server_url: str,
164
+ client_type: int,
165
+ credentials: typing.Optional[tuple[str, str]],
166
+ version: str = "1.2.6.dev0",
159
167
  ):
160
168
  """mdmd:hidden
161
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.") # noqa: T201
149
+ print("interactive exec is not currently supported on Windows.")
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.") # noqa: T201
350
+ print("interactive exec is not currently supported on Windows.")
351
351
  return
352
352
 
353
353
  from ._output import make_console
@@ -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="") # noqa: T201
186
+ print(message.decode("utf-8"), end="")
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.") # noqa: T201
778
+ print(f"➖ Found existing mount {mount_name} in global namespace.")
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}.") # noqa: T201
784
+ print(f"📦 Building {mount_name}.")
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")) # noqa: T201
814
- print(stderr.decode("utf-8")) # noqa: T201
813
+ print(stdout.decode("utf-8"))
814
+ print(stderr.decode("utf-8"))
815
815
  raise RuntimeError(f"Subprocess failed with {proc.returncode}")
816
816
 
817
- print(f"🌐 Downloaded and unpacked {mount_name} packages to {tmpd}.") # noqa: T201
817
+ print(f"🌐 Downloaded and unpacked {mount_name} packages to {tmpd}.")
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.") # noqa: T201
841
+ print(f"✅ Deployed mount {mount_name} to global namespace.")
842
842
  except GRPCError as e:
843
- print(f"⚠️ Mount creation failed with {e.status}: {e.message}") # noqa: T201
843
+ print(f"⚠️ Mount creation failed with {e.status}: {e.message}")
844
844
  else:
845
- print(f"Dry run - skipping deployment of mount {mount_name}") # noqa: T201
845
+ print(f"Dry run - skipping deployment of mount {mount_name}")
846
846
 
847
847
 
848
848
  async def _create_client_dependency_mounts(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.6
3
+ Version: 1.2.6.dev0
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.2.6"
4
+ __version__ = "1.2.6.dev0"
@@ -2,4 +2,4 @@
2
2
  from . import __version__
3
3
 
4
4
  if __name__ == "__main__":
5
- print(__version__) # noqa: T201
5
+ print(__version__)
@@ -81,7 +81,6 @@ filterwarnings = [
81
81
  "ignore:Type google._upb.*MapContainer uses PyType_Spec.*Python 3.14:DeprecationWarning",
82
82
  "error::modal.exception.DeprecationError",
83
83
  "ignore:There is no current event loop:DeprecationWarning", # pytest-asyncio internals
84
- "ignore:distutils Version classes are deprecated:DeprecationWarning", # pytest-freezegun internals
85
84
  ]
86
85
 
87
86
  [tool.ruff]
@@ -105,23 +104,14 @@ select = [
105
104
  'W',
106
105
  'I',
107
106
  'RUF006', # asyncio-dangling-task
108
- 'T10', # flake8-debugger
109
- 'T20', # flake8-print
110
107
  ]
111
108
  preview = true
112
109
  explicit-preview-rules = true
113
110
  extend-select = ['PLR1702']
114
111
 
115
112
  [tool.ruff.lint.per-file-ignores]
116
- "*_test.py" = ['E712', 'T201']
117
- "test/**" = ['T201']
113
+ "*_test.py" = ['E712']
118
114
  "test/supports/notebooks/*.py" = ['E402']
119
- "modal/cli/programs/*" = ['T201']
120
- "modal_docs/**" = ['T201']
121
- "modal_global_objects/**" = ['T201']
122
- "tasks.py" = ['T201']
123
- "modal/__init__.py" = ['T201']
124
- "modal/experimental/ipython.py" = ['T201']
125
115
 
126
116
  [tool.ruff.lint.isort]
127
117
  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